| 1 |
include/master-slave.inc |
| 2 |
[connection master] |
| 3 |
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); |
| 4 |
SET GLOBAL max_binlog_cache_size = 4096; |
| 5 |
SET GLOBAL binlog_cache_size = 4096; |
| 6 |
SET GLOBAL max_binlog_stmt_cache_size = 4096; |
| 7 |
SET GLOBAL binlog_stmt_cache_size = 4096; |
| 8 |
disconnect master; |
| 9 |
connect master,127.0.0.1,root,,test,$MASTER_MYPORT,; |
| 10 |
CREATE TABLE t1(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb; |
| 11 |
CREATE TABLE t2(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=MyIsam; |
| 12 |
CREATE TABLE t3(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb; |
| 13 |
######################################################################################## |
| 14 |
# 1 - SINGLE STATEMENT |
| 15 |
######################################################################################## |
| 16 |
connection master; |
| 17 |
*** Single statement on transactional table *** |
| 18 |
Got one of the listed errors |
| 19 |
*** Single statement on non-transactional table *** |
| 20 |
Got one of the listed errors |
| 21 |
include/wait_for_slave_sql_error_and_skip.inc [errno=1590] |
| 22 |
*** Single statement on both transactional and non-transactional tables. *** |
| 23 |
Got one of the listed errors |
| 24 |
include/wait_for_slave_sql_error_and_skip.inc [errno=1590] |
| 25 |
include/diff_tables.inc [master:t1,slave:t1] |
| 26 |
######################################################################################## |
| 27 |
# 2 - BEGIN - IMPLICIT COMMIT by DDL |
| 28 |
######################################################################################## |
| 29 |
connection master; |
| 30 |
TRUNCATE TABLE t1; |
| 31 |
TRUNCATE TABLE t2; |
| 32 |
TRUNCATE TABLE t3; |
| 33 |
set default_storage_engine=innodb; |
| 34 |
BEGIN; |
| 35 |
Got one of the listed errors |
| 36 |
Got one of the listed errors |
| 37 |
Got one of the listed errors |
| 38 |
INSERT INTO t1 (a, data) VALUES (7, 's');; |
| 39 |
INSERT INTO t2 (a, data) VALUES (8, 's');; |
| 40 |
INSERT INTO t1 (a, data) VALUES (9, 's');; |
| 41 |
ALTER TABLE t3 ADD COLUMN d int; |
| 42 |
BEGIN; |
| 43 |
Got one of the listed errors |
| 44 |
Got one of the listed errors |
| 45 |
INSERT INTO t1 (a, data) VALUES (19, 's');; |
| 46 |
INSERT INTO t2 (a, data) VALUES (20, 's');; |
| 47 |
INSERT INTO t1 (a, data) VALUES (21, 's');; |
| 48 |
CREATE TABLE t4 SELECT * FROM t1; |
| 49 |
Got one of the listed errors |
| 50 |
BEGIN; |
| 51 |
Got one of the listed errors |
| 52 |
Got one of the listed errors |
| 53 |
INSERT INTO t1 (a, data) VALUES (27, 's');; |
| 54 |
INSERT INTO t2 (a, data) VALUES (28, 's');; |
| 55 |
INSERT INTO t1 (a, data) VALUES (29, 's');; |
| 56 |
CREATE TABLE t5 (a int); |
| 57 |
connection slave; |
| 58 |
include/diff_tables.inc [master:t1,slave:t1] |
| 59 |
######################################################################################## |
| 60 |
# 3 - BEGIN - COMMIT |
| 61 |
######################################################################################## |
| 62 |
connection master; |
| 63 |
TRUNCATE TABLE t1; |
| 64 |
TRUNCATE TABLE t2; |
| 65 |
TRUNCATE TABLE t3; |
| 66 |
BEGIN; |
| 67 |
Got one of the listed errors |
| 68 |
Got one of the listed errors |
| 69 |
Got one of the listed errors |
| 70 |
COMMIT; |
| 71 |
connection slave; |
| 72 |
include/diff_tables.inc [master:t1,slave:t1] |
| 73 |
######################################################################################## |
| 74 |
# 4 - BEGIN - ROLLBACK |
| 75 |
######################################################################################## |
| 76 |
connection master; |
| 77 |
TRUNCATE TABLE t1; |
| 78 |
TRUNCATE TABLE t2; |
| 79 |
TRUNCATE TABLE t3; |
| 80 |
BEGIN; |
| 81 |
Got one of the listed errors |
| 82 |
Got one of the listed errors |
| 83 |
Got one of the listed errors |
| 84 |
ROLLBACK; |
| 85 |
Warnings: |
| 86 |
Warning 1196 Some non-transactional changed tables couldn't be rolled back |
| 87 |
connection slave; |
| 88 |
include/diff_tables.inc [master:t1,slave:t1] |
| 89 |
######################################################################################## |
| 90 |
# 5 - PROCEDURE |
| 91 |
######################################################################################## |
| 92 |
connection master; |
| 93 |
TRUNCATE TABLE t1; |
| 94 |
TRUNCATE TABLE t2; |
| 95 |
TRUNCATE TABLE t3; |
| 96 |
CREATE PROCEDURE p1(pd VARCHAR(30000)) |
| 97 |
BEGIN |
| 98 |
INSERT INTO t1 (a, data) VALUES (1, pd); |
| 99 |
INSERT INTO t1 (a, data) VALUES (2, pd); |
| 100 |
INSERT INTO t1 (a, data) VALUES (3, pd); |
| 101 |
INSERT INTO t1 (a, data) VALUES (4, pd); |
| 102 |
INSERT INTO t1 (a, data) VALUES (5, 's'); |
| 103 |
END// |
| 104 |
TRUNCATE TABLE t1; |
| 105 |
TRUNCATE TABLE t1; |
| 106 |
BEGIN; |
| 107 |
Got one of the listed errors |
| 108 |
COMMIT; |
| 109 |
TRUNCATE TABLE t1; |
| 110 |
BEGIN; |
| 111 |
Got one of the listed errors |
| 112 |
ROLLBACK; |
| 113 |
connection slave; |
| 114 |
include/diff_tables.inc [master:t1,slave:t1] |
| 115 |
######################################################################################## |
| 116 |
# 6 - XID |
| 117 |
######################################################################################## |
| 118 |
connection master; |
| 119 |
TRUNCATE TABLE t1; |
| 120 |
TRUNCATE TABLE t2; |
| 121 |
TRUNCATE TABLE t3; |
| 122 |
BEGIN; |
| 123 |
Got one of the listed errors |
| 124 |
Got one of the listed errors |
| 125 |
Got one of the listed errors |
| 126 |
INSERT INTO t1 (a, data) VALUES (7, 's');; |
| 127 |
INSERT INTO t2 (a, data) VALUES (8, 's');; |
| 128 |
INSERT INTO t1 (a, data) VALUES (9, 's');; |
| 129 |
ROLLBACK TO sv; |
| 130 |
Warnings: |
| 131 |
Warning 1196 Some non-transactional changed tables couldn't be rolled back |
| 132 |
COMMIT; |
| 133 |
connection slave; |
| 134 |
include/diff_tables.inc [master:t1,slave:t1] |
| 135 |
######################################################################################## |
| 136 |
# 7 - NON-TRANS TABLE |
| 137 |
######################################################################################## |
| 138 |
connection master; |
| 139 |
TRUNCATE TABLE t1; |
| 140 |
TRUNCATE TABLE t2; |
| 141 |
TRUNCATE TABLE t3; |
| 142 |
BEGIN; |
| 143 |
Got one of the listed errors |
| 144 |
Got one of the listed errors |
| 145 |
Got one of the listed errors |
| 146 |
INSERT INTO t1 (a, data) VALUES (8, 's');; |
| 147 |
INSERT INTO t1 (a, data) VALUES (9, 's');; |
| 148 |
INSERT INTO t2 (a, data) VALUES (10, 's');; |
| 149 |
INSERT INTO t1 (a, data) VALUES (11, 's');; |
| 150 |
COMMIT; |
| 151 |
BEGIN; |
| 152 |
Got one of the listed errors |
| 153 |
COMMIT; |
| 154 |
connection slave; |
| 155 |
include/diff_tables.inc [master:t1,slave:t1] |
| 156 |
######################################################################## |
| 157 |
# 8 - Bug#55375(Regression Bug) Transaction bigger than |
| 158 |
# max_binlog_cache_size crashes slave |
| 159 |
######################################################################## |
| 160 |
# [ On Slave ] |
| 161 |
SET GLOBAL max_binlog_cache_size = 4096; |
| 162 |
SET GLOBAL binlog_cache_size = 4096; |
| 163 |
SET GLOBAL max_binlog_stmt_cache_size = 4096; |
| 164 |
SET GLOBAL binlog_stmt_cache_size = 4096; |
| 165 |
include/stop_slave.inc |
| 166 |
include/start_slave.inc |
| 167 |
CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage.*"); |
| 168 |
CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_stmt_cache_size' bytes of storage.*"); |
| 169 |
CALL mtr.add_suppression("Writing one row to the row-based binary log failed.*"); |
| 170 |
CALL mtr.add_suppression("Slave SQL.*The incident LOST_EVENTS occurred on the master. Message: error writing to the binary log"); |
| 171 |
connection master; |
| 172 |
TRUNCATE t1; |
| 173 |
connection slave; |
| 174 |
connection master; |
| 175 |
SET GLOBAL max_binlog_cache_size= ORIGINAL_VALUE; |
| 176 |
SET GLOBAL binlog_cache_size= ORIGINAL_VALUE; |
| 177 |
SET GLOBAL max_binlog_stmt_cache_size= ORIGINAL_VALUE; |
| 178 |
SET GLOBAL binlog_stmt_cache_size= ORIGINAL_VALUE; |
| 179 |
disconnect master; |
| 180 |
connect master,127.0.0.1,root,,test,$MASTER_MYPORT,; |
| 181 |
BEGIN; |
| 182 |
Repeat statement 'INSERT INTO t1 VALUES($n, repeat("a", 32))' 128 times |
| 183 |
COMMIT; |
| 184 |
connection slave; |
| 185 |
include/wait_for_slave_sql_error.inc [errno=1534] |
| 186 |
SELECT count(*) FROM t1; |
| 187 |
count(*) |
| 188 |
0 |
| 189 |
include/show_binlog_events.inc |
| 190 |
SET GLOBAL max_binlog_cache_size= ORIGINAL_VALUE; |
| 191 |
SET GLOBAL binlog_cache_size= ORIGINAL_VALUE; |
| 192 |
SET GLOBAL max_binlog_stmt_cache_size= ORIGINAL_VALUE; |
| 193 |
SET GLOBAL binlog_stmt_cache_size= ORIGINAL_VALUE; |
| 194 |
include/stop_slave_io.inc |
| 195 |
include/start_slave.inc |
| 196 |
connection master; |
| 197 |
connection slave; |
| 198 |
SELECT count(*) FROM t1; |
| 199 |
count(*) |
| 200 |
128 |
| 201 |
######################################################################################## |
| 202 |
# CLEAN |
| 203 |
######################################################################################## |
| 204 |
connection master; |
| 205 |
DROP TABLE t1; |
| 206 |
DROP TABLE t2; |
| 207 |
DROP TABLE t3; |
| 208 |
DROP TABLE IF EXISTS t4; |
| 209 |
DROP TABLE t5; |
| 210 |
DROP PROCEDURE p1; |
| 211 |
include/rpl_end.inc |