mysql>delimiter $
mysql>SET AUTOCOMMIT = 0$$
mysql> create procedure test()
begin
declare i decimal (10) default 0 ;
dd:loop
INSERT INTO `million` (`categ_id`, `categ_fid`, `SortPath`, `address`, `p_identifier`, `pro_specification`, `name`, `add_date`, `picture_url`, `thumb_url`, `is_display_front`, `create_html_time`, `hit`, `buy_sum`, `athor`, `templete _style`, `is_hot`, `is_new`, `is_best`) VALUES
(268, 2, '0,262,268,', 0, '2342', '423423', '123123', '2012-01-09 09:55:43', 'upload/product/20111205153432_53211.jpg', 'upload/product/thumb_20111205153432_53211.jpg', 1, 0, 0, 0, 'admin', '0', 0, 0, 0);
commit;
set i = i+1;
if i= 1000000 then leave dd;
end if;
end loop dd ;
end;$
mysql>delimiter ;
mysql> call test;
|