Skip to content

Instantly share code, notes, and snippets.

@NorikDavtian
Last active January 7, 2022 03:43
Show Gist options
  • Save NorikDavtian/e7e5231f31b2a99825220b2703d86e7c to your computer and use it in GitHub Desktop.
Save NorikDavtian/e7e5231f31b2a99825220b2703d86e7c to your computer and use it in GitHub Desktop.
DELIMITER $$
CREATE PROCEDURE LOADGEN(SIZE INT)
DETERMINISTIC
READS SQL DATA
BEGIN
DECLARE i INT unsigned DEFAULT 1;
WHILE (i <= SIZE)
DO
INSERT INTO ping(name) VALUES ('ping');
INSERT INTO ping(name) VALUES ('pong');
SET i = i + 1;
END WHILE;
END $$
DELIMITER ;
@NorikDavtian
Copy link
Author

NorikDavtian commented Jan 7, 2022

CALL LOADGEN(10);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment