mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / mysql-test / suite / rpl / t / rpl_innodb_bug30888.test
blob9bfce61804b985f6f73320600e85e5569305af64
1 --source include/have_innodb.inc
2 --source include/have_binlog_format_mixed_or_row.inc
3 --source include/master-slave.inc
5 # Set the default connection to 'master'
7 --vertical_results
9 #let $engine_type= 'myisam';
10 let $engine_type= 'innodb';
12 ######## Creat Table Section #########
13 use test;
15 eval CREATE TABLE test.regular_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
16                            dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
17                            fkid MEDIUMINT, filler VARCHAR(255),
18                            PRIMARY KEY(id)) ENGINE=$engine_type;
20 ######## Create SPs, Functions, Views and Triggers Section ##############
22 delimiter |;
23 CREATE PROCEDURE test.proc_norm()
24 BEGIN
25    DECLARE ins_count INT DEFAULT 1000; 
26    DECLARE del_count INT;
27    DECLARE cur_user VARCHAR(255);
28    DECLARE local_uuid VARCHAR(255);
29    DECLARE local_time TIMESTAMP;
31    SET local_time= NOW();
32    SET cur_user= CURRENT_USER();
33    SET local_uuid= UUID();
35    WHILE ins_count > 0 DO
36      INSERT INTO test.regular_tbl VALUES (NULL, NOW(), USER() , UUID(),
37                                    ins_count,'Going to test MBR for MySQL');
38      SET ins_count = ins_count - 1;
39    END WHILE;
40    
41    SELECT MAX(id) FROM test.regular_tbl INTO del_count;
42    WHILE del_count > 0 DO
43      DELETE FROM test.regular_tbl WHERE id = del_count;
44      SET del_count = del_count - 2;
45    END WHILE;
46 END|   
48 delimiter ;|
50 ############ Finish Setup Section ###################
53 ############ Test Section ###################
55 CALL test.proc_norm();
57 --sync_slave_with_master
59 ###### CLEAN UP SECTION ##############
61 connection master;
62 DROP PROCEDURE test.proc_norm;
63 DROP TABLE test.regular_tbl;
65 --source include/rpl_end.inc