CREATE TABLE t1
(
id
int(11) NOT NULL AUTO_INCREMENT,
a
int(11) DEFAULT NULL,
b
int(11) DEFAULT NULL,
PRIMARY KEY (id
),
KEY idx_a
(a
)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
drop PROCEDURE if EXISTS insert_t1;
delimiter ; ;
create PROCEDURE insert_t1()
BEGIN
DECLARE i int;
set i=1;
WHILE(i<10000) DO
INSERT into t1(a,b) VALUES(i,i);
set i=i+1;
END WHILE;
END;
delimiter ;;
CALL insert_t1();