Loading client/mysqlbinlog.cc +2 −3 Original line number Diff line number Diff line Loading @@ -1171,11 +1171,10 @@ static int dump_local_log_entries(const char* logname) { /* if binlog wasn't closed properly ("in use" flag is set) don't complain about a corruption, but issue a "ROLLBACK" to annihilate half-logged transaction. Otherwise, treat it as EOF and move to the next binlog. about a corruption, but treat it as EOF and move to the next binlog. */ if (description_event->flags & LOG_EVENT_BINLOG_IN_USE_F) fprintf(result_file, "ROLLBACK;\n"); file->error= 0; else if (file->error) { fprintf(stderr, Loading mysql-test/r/ctype_ucs.result +1 −1 Original line number Diff line number Diff line Loading @@ -527,8 +527,8 @@ show binlog events from 96; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 96 User var 1 136 @`v`=_ucs2 0x006100620063 COLLATE ucs2_general_ci master-bin.000001 136 Query 1 226 use `test`; insert into t2 values (@v) flush logs; /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; SET @`v`:=_ucs2 0x006100620063 COLLATE `ucs2_general_ci`; use test; SET TIMESTAMP=10000; Loading mysql-test/r/mysqlbinlog.result +5 −2 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ flush logs; --- Local -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1000000000; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading Loading @@ -47,6 +48,7 @@ insert into t1 values ("Alas"); --- --database -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; SET INSERT_ID=1; --- --position -- Loading @@ -60,6 +62,7 @@ insert into t1 values ("Alas"); --- Remote -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1000000000; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading Loading @@ -92,6 +95,7 @@ insert into t1 values ("Alas"); --- --database -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; SET INSERT_ID=1; --- --position -- Loading @@ -105,13 +109,12 @@ insert into t1 values ("Alas"); --- reading stdin -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1065204671; BEGIN; ROLLBACK; /*!40019 SET @@session.max_insert_delayed_threads=0*/; use test; SET TIMESTAMP=1065204671; BEGIN; ROLLBACK; drop table t1, t2; mysql-test/r/mysqlbinlog2.result +21 −4 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ insert into t1 values(null, "f"); --- Local -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading @@ -40,6 +41,7 @@ insert into t1 values(null, "e"); --- offset -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; SET INSERT_ID=1; use test; SET TIMESTAMP=1579609942; Loading Loading @@ -75,6 +77,7 @@ insert into t1 values(null, "e"); --- stop-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading @@ -93,6 +96,7 @@ insert into t1 values(null, "c"); --- start-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; SET INSERT_ID=3; use test; SET TIMESTAMP=1579609944; Loading @@ -109,6 +113,7 @@ insert into t1 values(null, "e"); --- stop-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading @@ -124,6 +129,7 @@ insert into t1 values(null, "b"); --- Local with 2 binlogs on command line -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading Loading @@ -152,10 +158,10 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.uniq SET @@session.sql_mode=0; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); ROLLBACK; --- offset -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; SET INSERT_ID=1; use test; SET TIMESTAMP=1579609942; Loading @@ -182,7 +188,6 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.uniq SET @@session.sql_mode=0; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); ROLLBACK; --- start-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; Loading @@ -203,10 +208,10 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.uniq SET @@session.sql_mode=0; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); ROLLBACK; --- stop-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading @@ -232,6 +237,7 @@ SET INSERT_ID=6; --- start-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; SET INSERT_ID=3; use test; SET TIMESTAMP=1579609944; Loading @@ -252,10 +258,10 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.uniq SET @@session.sql_mode=0; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); ROLLBACK; --- stop-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading @@ -271,6 +277,7 @@ insert into t1 values(null, "b"); --- Remote -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading @@ -295,6 +302,7 @@ insert into t1 values(null, "e"); --- offset -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; SET INSERT_ID=1; use test; SET TIMESTAMP=1579609942; Loading Loading @@ -330,6 +338,7 @@ insert into t1 values(null, "e"); --- stop-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading @@ -348,6 +357,7 @@ insert into t1 values(null, "c"); --- start-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; SET INSERT_ID=3; use test; SET TIMESTAMP=1579609944; Loading @@ -364,6 +374,7 @@ insert into t1 values(null, "e"); --- stop-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading @@ -379,6 +390,7 @@ insert into t1 values(null, "b"); --- Remote with 2 binlogs on command line -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading Loading @@ -410,6 +422,7 @@ insert into t1 values(null, "f"); --- offset -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; SET INSERT_ID=1; use test; SET TIMESTAMP=1579609942; Loading Loading @@ -459,6 +472,7 @@ insert into t1 values(null, "f"); --- stop-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading @@ -484,6 +498,7 @@ SET INSERT_ID=6; --- start-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; SET INSERT_ID=3; use test; SET TIMESTAMP=1579609944; Loading @@ -507,6 +522,7 @@ insert into t1 values(null, "f"); --- stop-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading @@ -522,6 +538,7 @@ insert into t1 values(null, "b"); --- to-last-log -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading mysql-test/r/rpl_charset.result +1 −1 Original line number Diff line number Diff line Loading @@ -175,6 +175,7 @@ select hex(c1), hex(c2) from t1; hex(c1) hex(c2) CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; SET TIMESTAMP=1000000000; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; Loading Loading @@ -244,5 +245,4 @@ CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255)); SET TIMESTAMP=1000000000; SET @@session.character_set_client=7,@@session.collation_connection=51,@@session.collation_server=30; INSERT INTO t1 (c1, c2) VALUES (', ',', '); ROLLBACK; drop table t1; Loading
client/mysqlbinlog.cc +2 −3 Original line number Diff line number Diff line Loading @@ -1171,11 +1171,10 @@ static int dump_local_log_entries(const char* logname) { /* if binlog wasn't closed properly ("in use" flag is set) don't complain about a corruption, but issue a "ROLLBACK" to annihilate half-logged transaction. Otherwise, treat it as EOF and move to the next binlog. about a corruption, but treat it as EOF and move to the next binlog. */ if (description_event->flags & LOG_EVENT_BINLOG_IN_USE_F) fprintf(result_file, "ROLLBACK;\n"); file->error= 0; else if (file->error) { fprintf(stderr, Loading
mysql-test/r/ctype_ucs.result +1 −1 Original line number Diff line number Diff line Loading @@ -527,8 +527,8 @@ show binlog events from 96; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 96 User var 1 136 @`v`=_ucs2 0x006100620063 COLLATE ucs2_general_ci master-bin.000001 136 Query 1 226 use `test`; insert into t2 values (@v) flush logs; /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; SET @`v`:=_ucs2 0x006100620063 COLLATE `ucs2_general_ci`; use test; SET TIMESTAMP=10000; Loading
mysql-test/r/mysqlbinlog.result +5 −2 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ flush logs; --- Local -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1000000000; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading Loading @@ -47,6 +48,7 @@ insert into t1 values ("Alas"); --- --database -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; SET INSERT_ID=1; --- --position -- Loading @@ -60,6 +62,7 @@ insert into t1 values ("Alas"); --- Remote -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1000000000; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading Loading @@ -92,6 +95,7 @@ insert into t1 values ("Alas"); --- --database -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; SET INSERT_ID=1; --- --position -- Loading @@ -105,13 +109,12 @@ insert into t1 values ("Alas"); --- reading stdin -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1065204671; BEGIN; ROLLBACK; /*!40019 SET @@session.max_insert_delayed_threads=0*/; use test; SET TIMESTAMP=1065204671; BEGIN; ROLLBACK; drop table t1, t2;
mysql-test/r/mysqlbinlog2.result +21 −4 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ insert into t1 values(null, "f"); --- Local -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading @@ -40,6 +41,7 @@ insert into t1 values(null, "e"); --- offset -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; SET INSERT_ID=1; use test; SET TIMESTAMP=1579609942; Loading Loading @@ -75,6 +77,7 @@ insert into t1 values(null, "e"); --- stop-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading @@ -93,6 +96,7 @@ insert into t1 values(null, "c"); --- start-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; SET INSERT_ID=3; use test; SET TIMESTAMP=1579609944; Loading @@ -109,6 +113,7 @@ insert into t1 values(null, "e"); --- stop-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading @@ -124,6 +129,7 @@ insert into t1 values(null, "b"); --- Local with 2 binlogs on command line -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading Loading @@ -152,10 +158,10 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.uniq SET @@session.sql_mode=0; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); ROLLBACK; --- offset -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; SET INSERT_ID=1; use test; SET TIMESTAMP=1579609942; Loading @@ -182,7 +188,6 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.uniq SET @@session.sql_mode=0; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); ROLLBACK; --- start-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; Loading @@ -203,10 +208,10 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.uniq SET @@session.sql_mode=0; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); ROLLBACK; --- stop-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading @@ -232,6 +237,7 @@ SET INSERT_ID=6; --- start-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; SET INSERT_ID=3; use test; SET TIMESTAMP=1579609944; Loading @@ -252,10 +258,10 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.uniq SET @@session.sql_mode=0; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8; insert into t1 values(null, "f"); ROLLBACK; --- stop-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading @@ -271,6 +277,7 @@ insert into t1 values(null, "b"); --- Remote -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading @@ -295,6 +302,7 @@ insert into t1 values(null, "e"); --- offset -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; SET INSERT_ID=1; use test; SET TIMESTAMP=1579609942; Loading Loading @@ -330,6 +338,7 @@ insert into t1 values(null, "e"); --- stop-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading @@ -348,6 +357,7 @@ insert into t1 values(null, "c"); --- start-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; SET INSERT_ID=3; use test; SET TIMESTAMP=1579609944; Loading @@ -364,6 +374,7 @@ insert into t1 values(null, "e"); --- stop-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading @@ -379,6 +390,7 @@ insert into t1 values(null, "b"); --- Remote with 2 binlogs on command line -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading Loading @@ -410,6 +422,7 @@ insert into t1 values(null, "f"); --- offset -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; SET INSERT_ID=1; use test; SET TIMESTAMP=1579609942; Loading Loading @@ -459,6 +472,7 @@ insert into t1 values(null, "f"); --- stop-position -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading @@ -484,6 +498,7 @@ SET INSERT_ID=6; --- start-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; SET INSERT_ID=3; use test; SET TIMESTAMP=1579609944; Loading @@ -507,6 +522,7 @@ insert into t1 values(null, "f"); --- stop-datetime -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading @@ -522,6 +538,7 @@ insert into t1 values(null, "b"); --- to-last-log -- /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; use test; SET TIMESTAMP=1579609942; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; Loading
mysql-test/r/rpl_charset.result +1 −1 Original line number Diff line number Diff line Loading @@ -175,6 +175,7 @@ select hex(c1), hex(c2) from t1; hex(c1) hex(c2) CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 /*!40019 SET @@session.max_insert_delayed_threads=0*/; ROLLBACK; SET TIMESTAMP=1000000000; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1; SET @@session.sql_mode=0; Loading Loading @@ -244,5 +245,4 @@ CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255)); SET TIMESTAMP=1000000000; SET @@session.character_set_client=7,@@session.collation_connection=51,@@session.collation_server=30; INSERT INTO t1 (c1, c2) VALUES (', ',', '); ROLLBACK; drop table t1;