|
| 1 | +stop slave; |
| 2 | +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; |
| 3 | +reset master; |
| 4 | +reset slave; |
| 5 | +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; |
| 6 | +start slave; |
| 7 | +CREATE TABLE t1(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb; |
| 8 | +CREATE TABLE t2(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=MyIsam; |
| 9 | +CREATE TABLE t3(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb; |
| 10 | +######################################################################################## |
| 11 | +# 1 - SINGLE STATEMENT |
| 12 | +######################################################################################## |
| 13 | +*** Single statement on transactional table *** |
| 14 | +Got one of the listed errors |
| 15 | +*** Single statement on non-transactional table *** |
| 16 | +*** After WL#2687 the difference between STATEMENT/MIXED and ROW will not exist. *** |
| 17 | +Got one of the listed errors |
| 18 | +*** Single statement on both transactional and non-transactional tables. *** |
| 19 | +*** After WL#2687 we will be able to change the order of the tables. *** |
| 20 | +Got one of the listed errors |
| 21 | +SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; |
| 22 | +START SLAVE SQL_THREAD; |
| 23 | +TRUNCATE TABLE t1; |
| 24 | +TRUNCATE TABLE t2; |
| 25 | +TRUNCATE TABLE t3; |
| 26 | +BEGIN; |
| 27 | +Got one of the listed errors |
| 28 | +Got one of the listed errors |
| 29 | +Got one of the listed errors |
| 30 | +BEGIN; |
| 31 | +Got one of the listed errors |
| 32 | +Got one of the listed errors |
| 33 | +Got one of the listed errors |
| 34 | +BEGIN; |
| 35 | +Got one of the listed errors |
| 36 | +Got one of the listed errors |
| 37 | +source include/diff_master_slave.inc; |
| 38 | +######################################################################################## |
| 39 | +# 3 - BEGIN - COMMIT |
| 40 | +######################################################################################## |
| 41 | +TRUNCATE TABLE t1; |
| 42 | +TRUNCATE TABLE t2; |
| 43 | +TRUNCATE TABLE t3; |
| 44 | +BEGIN; |
| 45 | +Got one of the listed errors |
| 46 | +Got one of the listed errors |
| 47 | +Got one of the listed errors |
| 48 | +COMMIT; |
| 49 | +source include/diff_master_slave.inc; |
| 50 | +######################################################################################## |
| 51 | +# 4 - BEGIN - ROLLBACK |
| 52 | +######################################################################################## |
| 53 | +TRUNCATE TABLE t1; |
| 54 | +TRUNCATE TABLE t2; |
| 55 | +TRUNCATE TABLE t3; |
| 56 | +BEGIN; |
| 57 | +Got one of the listed errors |
| 58 | +Got one of the listed errors |
| 59 | +Got one of the listed errors |
| 60 | +ROLLBACK; |
| 61 | +Warnings: |
| 62 | +Warning 1196 Some non-transactional changed tables couldn't be rolled back |
| 63 | +source include/diff_master_slave.inc; |
| 64 | +######################################################################################## |
| 65 | +# 5 - PROCEDURE |
| 66 | +######################################################################################## |
| 67 | +TRUNCATE TABLE t1; |
| 68 | +TRUNCATE TABLE t2; |
| 69 | +TRUNCATE TABLE t3; |
| 70 | +CREATE PROCEDURE p1(pd VARCHAR(30000)) |
| 71 | +BEGIN |
| 72 | +INSERT INTO t1 (a, data) VALUES (1, pd); |
| 73 | +INSERT INTO t1 (a, data) VALUES (2, pd); |
| 74 | +INSERT INTO t1 (a, data) VALUES (3, pd); |
| 75 | +INSERT INTO t1 (a, data) VALUES (4, pd); |
| 76 | +INSERT INTO t1 (a, data) VALUES (5, 's'); |
| 77 | +END// |
| 78 | +TRUNCATE TABLE t1; |
| 79 | +TRUNCATE TABLE t1; |
| 80 | +BEGIN; |
| 81 | +Got one of the listed errors |
| 82 | +COMMIT; |
| 83 | +TRUNCATE TABLE t1; |
| 84 | +BEGIN; |
| 85 | +Got one of the listed errors |
| 86 | +ROLLBACK; |
| 87 | +source include/diff_master_slave.inc; |
| 88 | +######################################################################################## |
| 89 | +# 6 - XID |
| 90 | +######################################################################################## |
| 91 | +TRUNCATE TABLE t1; |
| 92 | +TRUNCATE TABLE t2; |
| 93 | +TRUNCATE TABLE t3; |
| 94 | +BEGIN; |
| 95 | +Got one of the listed errors |
| 96 | +Got one of the listed errors |
| 97 | +Got one of the listed errors |
| 98 | +ROLLBACK TO sv; |
| 99 | +Warnings: |
| 100 | +Warning 1196 Some non-transactional changed tables couldn't be rolled back |
| 101 | +COMMIT; |
| 102 | +source include/diff_master_slave.inc; |
| 103 | +######################################################################################## |
| 104 | +# 7 - NON-TRANS TABLE |
| 105 | +######################################################################################## |
| 106 | +TRUNCATE TABLE t1; |
| 107 | +TRUNCATE TABLE t2; |
| 108 | +TRUNCATE TABLE t3; |
| 109 | +BEGIN; |
| 110 | +Got one of the listed errors |
| 111 | +Got one of the listed errors |
| 112 | +Got one of the listed errors |
| 113 | +Got one of the listed errors |
| 114 | +Got one of the listed errors |
| 115 | +COMMIT; |
| 116 | +BEGIN; |
| 117 | +Got one of the listed errors |
| 118 | +COMMIT; |
| 119 | +######################################################################################## |
| 120 | +# CLEAN |
| 121 | +######################################################################################## |
| 122 | +DROP TABLE t1; |
| 123 | +DROP TABLE t2; |
| 124 | +DROP TABLE t3; |
| 125 | +DROP TABLE IF EXISTS t4; |
| 126 | +DROP TABLE IF EXISTS t5; |
| 127 | +DROP TABLE IF EXISTS t6; |
| 128 | +DROP PROCEDURE p1; |
| 129 | +DROP TABLE t1; |
| 130 | +DROP TABLE t2; |
| 131 | +DROP TABLE t3; |
| 132 | +DROP TABLE IF EXISTS t4; |
| 133 | +DROP TABLE IF EXISTS t5; |
| 134 | +DROP TABLE IF EXISTS t6; |
| 135 | +DROP PROCEDURE p1; |
0 commit comments