CREATE PROCEDURE dowhile()
BEGIN
DECLARE n int;
set n=1;
WHILE n<=1000
do
INSERT into hasindex(num) VALUES (n);
set n=n+1;
END WHILE;
END;
CALL dowhile();
BEGIN
DECLARE n int;
set n=1;
WHILE n<=1000
do
INSERT into hasindex(num) VALUES (n);
set n=n+1;
END WHILE;
END;
CALL dowhile();