Commit c5c49716 authored by unknown's avatar unknown
Browse files

post-review fixes. Now ROLLBACK is done in Format_description_log_event


mysql-test/t/mix_innodb_myisam_binlog.test:
  fix for --ps-protocol
parent 98db5e57
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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;
+5 −2
Original line number Diff line number Diff line
@@ -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;
@@ -47,6 +48,7 @@ insert into t1 values ("Alas");

--- --database --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
ROLLBACK;
SET INSERT_ID=1;

--- --position --
@@ -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;
@@ -92,6 +95,7 @@ insert into t1 values ("Alas");

--- --database --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
ROLLBACK;
SET INSERT_ID=1;

--- --position --
@@ -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;
+21 −4
Original line number Diff line number Diff line
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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*/;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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;
@@ -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