/* In orther to run this test, first you must change in Edit/Preferences/SQL Editor the default values for MySQL Session, so that the connection doesn't expire. This has been tested with this values: 600, 300 and 600 for keep-alive, read time out and connection time out. */ USE test; CREATE TABLE IF NOT EXISTS work_bench_test (id int NOT NULL PRIMARY KEY AUTO_INCREMENT, val int); DROP PROCEDURE IF EXISTS prepare_data; DELIMITER $$ CREATE PROCEDURE prepare_data() BEGIN DECLARE i INT DEFAULT 100; WHILE i < 5000 DO INSERT INTO work_bench_test (val) VALUES (i); SET i = i + 1; END WHILE; END$$ DELIMITER ; CALL prepare_data(); SELECT * FROM work_bench_test;