Skip to content

Commit d0d46be

Browse files
author
Parveez Baig
committed
Merge branch 'mysql-5.6' into mysql-5.7
2 parents c516b60 + 8314278 commit d0d46be

File tree

4 files changed

+87
-4
lines changed

4 files changed

+87
-4
lines changed

mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,54 @@ COMMIT;
371371
--let $diff_tables= master:t1,slave:t1
372372
--source include/diff_tables.inc
373373

374-
--echo ######### 8 - Bug#55375(Regression Bug) Transaction bigger than ##########
374+
--echo ####### 8 - LOAD DATA INFILE INTO TABLE #######
375+
376+
#
377+
# This scenario verifies that load data infile fails when
378+
# binlog cache exceeds max_binlog_cache_size
379+
#
380+
--source include/rpl_connection_master.inc
381+
CREATE TABLE t6 (a varchar(20)) ENGINE=Innodb;
382+
383+
# Save the current binary log position
384+
--let $pos_before= query_get_value(show master status,Position,1)
385+
386+
--disable_query_log
387+
--let $write_var =`SELECT REPEAT('Testing\n', 1000)`
388+
--let $write_to_file = GENERATE
389+
--source include/write_var_to_file.inc
390+
--enable_query_log
391+
392+
# Below transaction generates transaction cache more than
393+
# the max_binlog_cache_size i.e 4096. Hence results in error.
394+
--replace_result $write_to_file temp_file
395+
--error ER_TRANS_CACHE_FULL
396+
eval LOAD DATA INFILE '$write_to_file' INTO TABLE t6;
397+
398+
--exec rm $write_to_file
399+
400+
# Check that the above transaction has not been logged in the binary log
401+
--let $assert_text= assert that the above Event has not been added to binlog
402+
--let $assert_cond= [SHOW MASTER STATUS, Position,1] = $pos_before
403+
--source include/assert.inc
404+
405+
# Check that the table is empty on master
406+
--let $assert_text = Check that the LOAD DATA didn't add any data into the table
407+
--let $assert_cond = [SELECT COUNT(*) FROM t6] = 0
408+
--source include/assert.inc
409+
410+
--source include/sync_slave_sql_with_master.inc
411+
412+
# Check that the table is empty on slave
413+
--let $assert_text = Check that the LOAD DATA didn't add any data into the table
414+
--let $assert_cond = [SELECT COUNT(*) FROM t6] = 0
415+
--source include/assert.inc
416+
417+
--source include/rpl_connection_master.inc
418+
DROP TABLE t6;
419+
--source include/sync_slave_sql_with_master.inc
420+
421+
--echo ######### 9 - Bug#55375(Regression Bug) Transaction bigger than ##########
375422
--echo ######### max_binlog_cache_size crashes slave ##########
376423

377424
--echo # [ On Slave ]

mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,19 @@ BEGIN;
122122
Got one of the listed errors
123123
COMMIT;
124124
include/diff_tables.inc [master:t1,slave:t1]
125-
######### 8 - Bug#55375(Regression Bug) Transaction bigger than ##########
125+
####### 8 - LOAD DATA INFILE INTO TABLE #######
126+
[connection master]
127+
CREATE TABLE t6 (a varchar(20)) ENGINE=Innodb;
128+
LOAD DATA INFILE 'temp_file' INTO TABLE t6;
129+
ERROR HY000: Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again
130+
include/assert.inc [assert that the above Event has not been added to binlog]
131+
include/assert.inc [Check that the LOAD DATA didn't add any data into the table]
132+
include/sync_slave_sql_with_master.inc
133+
include/assert.inc [Check that the LOAD DATA didn't add any data into the table]
134+
[connection master]
135+
DROP TABLE t6;
136+
include/sync_slave_sql_with_master.inc
137+
######### 9 - Bug#55375(Regression Bug) Transaction bigger than ##########
126138
######### max_binlog_cache_size crashes slave ##########
127139
# [ On Slave ]
128140
SET GLOBAL max_binlog_cache_size = 4096;

mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,19 @@ BEGIN;
112112
Got one of the listed errors
113113
COMMIT;
114114
include/diff_tables.inc [master:t1,slave:t1]
115-
######### 8 - Bug#55375(Regression Bug) Transaction bigger than ##########
115+
####### 8 - LOAD DATA INFILE INTO TABLE #######
116+
[connection master]
117+
CREATE TABLE t6 (a varchar(20)) ENGINE=Innodb;
118+
LOAD DATA INFILE 'temp_file' INTO TABLE t6;
119+
ERROR HY000: Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again
120+
include/assert.inc [assert that the above Event has not been added to binlog]
121+
include/assert.inc [Check that the LOAD DATA didn't add any data into the table]
122+
include/sync_slave_sql_with_master.inc
123+
include/assert.inc [Check that the LOAD DATA didn't add any data into the table]
124+
[connection master]
125+
DROP TABLE t6;
126+
include/sync_slave_sql_with_master.inc
127+
######### 9 - Bug#55375(Regression Bug) Transaction bigger than ##########
116128
######### max_binlog_cache_size crashes slave ##########
117129
# [ On Slave ]
118130
SET GLOBAL max_binlog_cache_size = 4096;

mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,19 @@ BEGIN;
122122
Got one of the listed errors
123123
COMMIT;
124124
include/diff_tables.inc [master:t1,slave:t1]
125-
######### 8 - Bug#55375(Regression Bug) Transaction bigger than ##########
125+
####### 8 - LOAD DATA INFILE INTO TABLE #######
126+
[connection master]
127+
CREATE TABLE t6 (a varchar(20)) ENGINE=Innodb;
128+
LOAD DATA INFILE 'temp_file' INTO TABLE t6;
129+
ERROR HY000: Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again
130+
include/assert.inc [assert that the above Event has not been added to binlog]
131+
include/assert.inc [Check that the LOAD DATA didn't add any data into the table]
132+
include/sync_slave_sql_with_master.inc
133+
include/assert.inc [Check that the LOAD DATA didn't add any data into the table]
134+
[connection master]
135+
DROP TABLE t6;
136+
include/sync_slave_sql_with_master.inc
137+
######### 9 - Bug#55375(Regression Bug) Transaction bigger than ##########
126138
######### max_binlog_cache_size crashes slave ##########
127139
# [ On Slave ]
128140
SET GLOBAL max_binlog_cache_size = 4096;

0 commit comments

Comments
 (0)