1 include/master-slave.inc
4 CREATE TABLE test.regular_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
5 dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
6 fkid MEDIUMINT, filler VARCHAR(255),
7 PRIMARY KEY(id)) ENGINE='innodb';
8 CREATE PROCEDURE test.proc_norm()
10 DECLARE ins_count INT DEFAULT 1000;
11 DECLARE del_count INT;
12 DECLARE cur_user VARCHAR(255);
13 DECLARE local_uuid VARCHAR(255);
14 DECLARE local_time TIMESTAMP;
15 SET local_time= NOW();
16 SET cur_user= CURRENT_USER();
17 SET local_uuid= UUID();
18 WHILE ins_count > 0 DO
19 INSERT INTO test.regular_tbl VALUES (NULL, NOW(), USER() , UUID(),
20 ins_count,'Going to test MBR for MySQL');
21 SET ins_count = ins_count - 1;
23 SELECT MAX(id) FROM test.regular_tbl INTO del_count;
24 WHILE del_count > 0 DO
25 DELETE FROM test.regular_tbl WHERE id = del_count;
26 SET del_count = del_count - 2;
29 CALL test.proc_norm();
30 DROP PROCEDURE test.proc_norm;
31 DROP TABLE test.regular_tbl;