DROP PROCEDURE IF EXISTS Insert100kRows;
DELIMITER $$
CREATE PROCEDURE Insert100kRows()
BEGIN
DECLARE result VARCHAR(100) DEFAULT '';
DECLARE i INT DEFAULT 1;
WHILE i <= 10 DO
SET @re = CONCAT(result, CHAR(65 + FLOOR(RAND() * 26)));
set @rn = IF(RAND()>=0.5,1,0);
set @fl = FLOOR(RAND() * 100);
INSERT INTO baiwan_users(name, intro, gender) VALUES(concat(@re,@fl),CONCAT(@re,@rn),@rn);
SET i = i + 1;
END WHILE;
END$$
DELIMITER ;
CALL Insert100kRows();