--let $restart_parameters= "restart: --log-error=$MYSQL_TMP_DIR/satya-mysqld.err" --source include/restart_mysqld.inc --let $i = 1 while ($i <= 2000) { --echo "i is $i" --eval CREATE DATABASE test$i --inc $i } SET GLOBAL innodb_file_per_table=OFF; # Create Insert Procedure DELIMITER |; CREATE PROCEDURE populate(IN db_num INT) BEGIN DECLARE i int DEFAULT 1; DECLARE j int DEFAULT 1; SET @temp =1; WHILE (j <= 100) DO SET @x = j + db_num; SET i = 1; WHILE (i <= 1000) DO SET @SQL = CONCAT('CREATE TABLE test', @x, '.t', i, '(a INT AUTO_INCREMENT PRIMARY KEY)'); PREPARE stmt FROM @SQL; EXECUTE stmt; DEALLOCATE PREPARE stmt; SET @y = i + 1; SET @SQL = CONCAT('CREATE TABLE test', @x, '.t', @y, '(a INT AUTO_INCREMENT PRIMARY KEY, fk INT NOT NULL, FOREIGN KEY (fk) REFERENCES test', @x, '.t', i, ' (a))'); PREPARE stmt FROM @SQL; EXECUTE stmt; DEALLOCATE PREPARE stmt; SET @SQL = CONCAT('SELECT a INTO @temp FROM test', @x, '.t', i); PREPARE stmt FROM @SQL; EXECUTE stmt; DEALLOCATE PREPARE stmt; SET @SQL = CONCAT('SELECT a INTO @temp FROM test', @x, '.t', @y); PREPARE stmt FROM @SQL; EXECUTE stmt; DEALLOCATE PREPARE stmt; SET i = i + 2; END WHILE; SET j = j +1; END WHILE; END| DELIMITER ;| --let $i = 0 while ($i < 20) { --connect (con$i, localhost, root) --inc $i } --let $i = 0 while ($i < 20) { --connection con$i --eval SET @j = $i * 100 --send CALL populate(@j) --inc $i } --let $i = 0 while ($i < 20) { --connection con$i --reap --inc $i } show engine innodb status; --echo # shut server down --exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --shutdown_server 5000 --source include/wait_until_disconnected.inc --let $restart_parameters= --source include/start_mysqld.inc