TRUNCATE TABLE person_parameter;
DELIMITER $$
DROP PROCEDURE IF EXISTS `PERSON_PARAMETER_PROC` $$
CREATE PROCEDURE `PERSON_PARAMETER_PROC`()
BEGIN
DECLARE iloop SMALLINT DEFAULT 0;
DECLARE iNum MEDIUMINT DEFAULT 0;
DECLARE iMod MEDIUMINT DEFAULT 0;#此参数未用到,可以去掉
DECLARE strMemberID VARCHAR(40) DEFAULT 0;
DECLARE Cur_account CURSOR FOR SELECT member_id FROM account;
OPEN Cur_account;
FETCH Cur_account INTO strMemberID;
WHILE iNum<=4000 DO
START TRANSACTION;
WHILE iloop<=1000 DO
INSERT INTO person_parameter(parameter_id, person_id, vaccount_id, real_value, gmt_create, gmt_modified, STATUS, granted_type)
VALUES(1, '*',strMemberID, '10', NOW(), NOW(), 'ENABLED', 'ENTERPRISE');
INSERT INTO person_parameter(parameter_id, person_id, vaccount_id, real_value, gmt_create, gmt_modified, STATUS, granted_type)
VALUES(11, '*',strMemberID, '10', NOW(), NOW(), 'ENABLED', 'ENTERPRISE');
INSERT INTO person_parameter(parameter_id, person_id, vaccount_id, real_value, gmt_create, gmt_modified, STATUS, granted_type)
VALUES(21, '*',strMemberID, '10', NOW(), NOW(), 'ENABLED', 'ENTERPRISE');
INSERT INTO person_parameter(parameter_id, person_id, vaccount_id, real_value, gmt_create, gmt_modified, STATUS, granted_type)
VALUES(1,strMemberID,strMemberID, '10', NOW(), NOW(), 'ENABLED', 'ENTERPRISE');
INSERT INTO person_parameter(parameter_id, person_id, vaccount_id, real_value, gmt_create, gmt_modified, STATUS, granted_type)
VALUES(11,strMemberID,strMemberID, '10', NOW(), NOW(), 'ENABLED', 'ENTERPRISE');
INSERT INTO person_parameter(parameter_id, person_id, vaccount_id, real_value, gmt_create, gmt_modified, STATUS, granted_type)
VALUES(21,strMemberID,strMemberID, '10', NOW(), NOW(), 'ENABLED', 'ENTERPRISE');
FETCH Cur_account INTO strMemberID;
SET iloop=iloop+1;
END WHILE;
COMMIT;
SET iloop=0;
SET iNum=iNum+1;
END WHILE;
CLOSE Cur_account;
END $$
DELIMITER ;
CALL `PERSON_PARAMETER_PROC`();