mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
ed1696f6b9
we store 7 bytes (1 + 2*3) in every Query_log_event. In the future if users want binlog optimized for small size and less safe, we could add --binlog-no-charset (and binlog-no-sql-mode etc): charset info is something by design optional (even if for now we don't offer possibility to disable it): it's not a binlog format change. We try to reduce the number of get_charset() calls in the slave SQL thread to a minimum by caching the charset read from the previous event (which will often be equal to the one of the current event). We don't use SET ONE_SHOT for charset-aware repl (we still do for timezones, will be fixed later). No more errors if one changes the global value of charset vars on master or slave (as we log charset info in all Query_log_event). Not fixing Load_log_event as it will be rewritten soon by Dmitri. Testing how mysqlbinlog behaves in rpl_charset.test. mysqlbinlog needs to know where charset file is (to be able to convert a charset number found in binlog (e.g. in User_var_log_event) to a charset name); mysql-test-run needs to pass the correct value for this option to mysqlbinlog. Many result udpates (adding charset info into every event shifts log_pos in SHOW BINLOG EVENTS). Roughly the same job is to be done for timezones :)
547 lines
18 KiB
Text
547 lines
18 KiB
Text
drop table if exists t1;
|
|
reset master;
|
|
set @a=UNIX_TIMESTAMP("2020-01-21 15:32:22");
|
|
set timestamp=@a;
|
|
create table t1 (a int auto_increment not null primary key, b char(3));
|
|
insert into t1 values(null, "a");
|
|
insert into t1 values(null, "b");
|
|
set timestamp=@a+2;
|
|
insert into t1 values(null, "c");
|
|
set timestamp=@a+4;
|
|
insert into t1 values(null, "d");
|
|
insert into t1 values(null, "e");
|
|
flush logs;
|
|
set timestamp=@a+1;
|
|
insert into t1 values(null, "f");
|
|
|
|
--- Local --
|
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
|
use test;
|
|
SET TIMESTAMP=1579609942;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
SET @@session.sql_mode=0;
|
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
|
|
create table t1 (a int auto_increment not null primary key, b char(3));
|
|
SET INSERT_ID=1;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "a");
|
|
SET INSERT_ID=2;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "b");
|
|
SET INSERT_ID=3;
|
|
SET TIMESTAMP=1579609944;
|
|
insert into t1 values(null, "c");
|
|
SET INSERT_ID=4;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "d");
|
|
SET INSERT_ID=5;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "e");
|
|
|
|
--- offset --
|
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
|
SET INSERT_ID=1;
|
|
use test;
|
|
SET TIMESTAMP=1579609942;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
SET @@session.sql_mode=0;
|
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
|
|
insert into t1 values(null, "a");
|
|
SET INSERT_ID=2;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "b");
|
|
SET INSERT_ID=3;
|
|
SET TIMESTAMP=1579609944;
|
|
insert into t1 values(null, "c");
|
|
SET INSERT_ID=4;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "d");
|
|
SET INSERT_ID=5;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "e");
|
|
|
|
--- start-position --
|
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
|
SET INSERT_ID=4;
|
|
use test;
|
|
SET TIMESTAMP=1579609946;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
SET @@session.sql_mode=0;
|
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
|
|
insert into t1 values(null, "d");
|
|
SET INSERT_ID=5;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "e");
|
|
|
|
--- stop-position --
|
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
|
use test;
|
|
SET TIMESTAMP=1579609942;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
SET @@session.sql_mode=0;
|
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
|
|
create table t1 (a int auto_increment not null primary key, b char(3));
|
|
SET INSERT_ID=1;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "a");
|
|
SET INSERT_ID=2;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "b");
|
|
SET INSERT_ID=3;
|
|
SET TIMESTAMP=1579609944;
|
|
insert into t1 values(null, "c");
|
|
|
|
--- start-datetime --
|
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
|
SET INSERT_ID=3;
|
|
use test;
|
|
SET TIMESTAMP=1579609944;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
SET @@session.sql_mode=0;
|
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
|
|
insert into t1 values(null, "c");
|
|
SET INSERT_ID=4;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "d");
|
|
SET INSERT_ID=5;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "e");
|
|
|
|
--- stop-datetime --
|
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
|
use test;
|
|
SET TIMESTAMP=1579609942;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
SET @@session.sql_mode=0;
|
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
|
|
create table t1 (a int auto_increment not null primary key, b char(3));
|
|
SET INSERT_ID=1;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "a");
|
|
SET INSERT_ID=2;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "b");
|
|
|
|
--- Local with 2 binlogs on command line --
|
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
|
use test;
|
|
SET TIMESTAMP=1579609942;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
SET @@session.sql_mode=0;
|
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
|
|
create table t1 (a int auto_increment not null primary key, b char(3));
|
|
SET INSERT_ID=1;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "a");
|
|
SET INSERT_ID=2;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "b");
|
|
SET INSERT_ID=3;
|
|
SET TIMESTAMP=1579609944;
|
|
insert into t1 values(null, "c");
|
|
SET INSERT_ID=4;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "d");
|
|
SET INSERT_ID=5;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "e");
|
|
SET INSERT_ID=6;
|
|
use test;
|
|
SET TIMESTAMP=1579609943;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
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");
|
|
|
|
--- offset --
|
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
|
SET INSERT_ID=1;
|
|
use test;
|
|
SET TIMESTAMP=1579609942;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
SET @@session.sql_mode=0;
|
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
|
|
insert into t1 values(null, "a");
|
|
SET INSERT_ID=2;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "b");
|
|
SET INSERT_ID=3;
|
|
SET TIMESTAMP=1579609944;
|
|
insert into t1 values(null, "c");
|
|
SET INSERT_ID=4;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "d");
|
|
SET INSERT_ID=5;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "e");
|
|
SET INSERT_ID=6;
|
|
use test;
|
|
SET TIMESTAMP=1579609943;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
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");
|
|
|
|
--- start-position --
|
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
|
SET INSERT_ID=4;
|
|
use test;
|
|
SET TIMESTAMP=1579609946;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
SET @@session.sql_mode=0;
|
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
|
|
insert into t1 values(null, "d");
|
|
SET INSERT_ID=5;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "e");
|
|
SET INSERT_ID=6;
|
|
use test;
|
|
SET TIMESTAMP=1579609943;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
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");
|
|
|
|
--- stop-position --
|
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
|
use test;
|
|
SET TIMESTAMP=1579609942;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
SET @@session.sql_mode=0;
|
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
|
|
create table t1 (a int auto_increment not null primary key, b char(3));
|
|
SET INSERT_ID=1;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "a");
|
|
SET INSERT_ID=2;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "b");
|
|
SET INSERT_ID=3;
|
|
SET TIMESTAMP=1579609944;
|
|
insert into t1 values(null, "c");
|
|
SET INSERT_ID=4;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "d");
|
|
SET INSERT_ID=5;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "e");
|
|
SET INSERT_ID=6;
|
|
|
|
--- start-datetime --
|
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
|
SET INSERT_ID=3;
|
|
use test;
|
|
SET TIMESTAMP=1579609944;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
SET @@session.sql_mode=0;
|
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
|
|
insert into t1 values(null, "c");
|
|
SET INSERT_ID=4;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "d");
|
|
SET INSERT_ID=5;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "e");
|
|
SET INSERT_ID=6;
|
|
use test;
|
|
SET TIMESTAMP=1579609943;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
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");
|
|
|
|
--- stop-datetime --
|
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
|
use test;
|
|
SET TIMESTAMP=1579609942;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
SET @@session.sql_mode=0;
|
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
|
|
create table t1 (a int auto_increment not null primary key, b char(3));
|
|
SET INSERT_ID=1;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "a");
|
|
SET INSERT_ID=2;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "b");
|
|
|
|
--- Remote --
|
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
|
use test;
|
|
SET TIMESTAMP=1579609942;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
SET @@session.sql_mode=0;
|
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
|
|
create table t1 (a int auto_increment not null primary key, b char(3));
|
|
SET INSERT_ID=1;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "a");
|
|
SET INSERT_ID=2;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "b");
|
|
SET INSERT_ID=3;
|
|
SET TIMESTAMP=1579609944;
|
|
insert into t1 values(null, "c");
|
|
SET INSERT_ID=4;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "d");
|
|
SET INSERT_ID=5;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "e");
|
|
|
|
--- offset --
|
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
|
SET INSERT_ID=1;
|
|
use test;
|
|
SET TIMESTAMP=1579609942;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
SET @@session.sql_mode=0;
|
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
|
|
insert into t1 values(null, "a");
|
|
SET INSERT_ID=2;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "b");
|
|
SET INSERT_ID=3;
|
|
SET TIMESTAMP=1579609944;
|
|
insert into t1 values(null, "c");
|
|
SET INSERT_ID=4;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "d");
|
|
SET INSERT_ID=5;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "e");
|
|
|
|
--- start-position --
|
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
|
SET INSERT_ID=4;
|
|
use test;
|
|
SET TIMESTAMP=1579609946;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
SET @@session.sql_mode=0;
|
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
|
|
insert into t1 values(null, "d");
|
|
SET INSERT_ID=5;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "e");
|
|
|
|
--- stop-position --
|
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
|
use test;
|
|
SET TIMESTAMP=1579609942;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
SET @@session.sql_mode=0;
|
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
|
|
create table t1 (a int auto_increment not null primary key, b char(3));
|
|
SET INSERT_ID=1;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "a");
|
|
SET INSERT_ID=2;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "b");
|
|
SET INSERT_ID=3;
|
|
SET TIMESTAMP=1579609944;
|
|
insert into t1 values(null, "c");
|
|
|
|
--- start-datetime --
|
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
|
SET INSERT_ID=3;
|
|
use test;
|
|
SET TIMESTAMP=1579609944;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
SET @@session.sql_mode=0;
|
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
|
|
insert into t1 values(null, "c");
|
|
SET INSERT_ID=4;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "d");
|
|
SET INSERT_ID=5;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "e");
|
|
|
|
--- stop-datetime --
|
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
|
use test;
|
|
SET TIMESTAMP=1579609942;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
SET @@session.sql_mode=0;
|
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
|
|
create table t1 (a int auto_increment not null primary key, b char(3));
|
|
SET INSERT_ID=1;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "a");
|
|
SET INSERT_ID=2;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "b");
|
|
|
|
--- Remote with 2 binlogs on command line --
|
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
|
use test;
|
|
SET TIMESTAMP=1579609942;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
SET @@session.sql_mode=0;
|
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
|
|
create table t1 (a int auto_increment not null primary key, b char(3));
|
|
SET INSERT_ID=1;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "a");
|
|
SET INSERT_ID=2;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "b");
|
|
SET INSERT_ID=3;
|
|
SET TIMESTAMP=1579609944;
|
|
insert into t1 values(null, "c");
|
|
SET INSERT_ID=4;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "d");
|
|
SET INSERT_ID=5;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "e");
|
|
SET INSERT_ID=6;
|
|
use test;
|
|
SET TIMESTAMP=1579609943;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
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");
|
|
|
|
--- offset --
|
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
|
SET INSERT_ID=1;
|
|
use test;
|
|
SET TIMESTAMP=1579609942;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
SET @@session.sql_mode=0;
|
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
|
|
insert into t1 values(null, "a");
|
|
SET INSERT_ID=2;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "b");
|
|
SET INSERT_ID=3;
|
|
SET TIMESTAMP=1579609944;
|
|
insert into t1 values(null, "c");
|
|
SET INSERT_ID=4;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "d");
|
|
SET INSERT_ID=5;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "e");
|
|
SET INSERT_ID=6;
|
|
use test;
|
|
SET TIMESTAMP=1579609943;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
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");
|
|
|
|
--- start-position --
|
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
|
SET INSERT_ID=4;
|
|
use test;
|
|
SET TIMESTAMP=1579609946;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
SET @@session.sql_mode=0;
|
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
|
|
insert into t1 values(null, "d");
|
|
SET INSERT_ID=5;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "e");
|
|
SET INSERT_ID=6;
|
|
use test;
|
|
SET TIMESTAMP=1579609943;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
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");
|
|
|
|
--- stop-position --
|
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
|
use test;
|
|
SET TIMESTAMP=1579609942;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
SET @@session.sql_mode=0;
|
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
|
|
create table t1 (a int auto_increment not null primary key, b char(3));
|
|
SET INSERT_ID=1;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "a");
|
|
SET INSERT_ID=2;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "b");
|
|
SET INSERT_ID=3;
|
|
SET TIMESTAMP=1579609944;
|
|
insert into t1 values(null, "c");
|
|
SET INSERT_ID=4;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "d");
|
|
SET INSERT_ID=5;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "e");
|
|
SET INSERT_ID=6;
|
|
|
|
--- start-datetime --
|
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
|
SET INSERT_ID=3;
|
|
use test;
|
|
SET TIMESTAMP=1579609944;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
SET @@session.sql_mode=0;
|
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
|
|
insert into t1 values(null, "c");
|
|
SET INSERT_ID=4;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "d");
|
|
SET INSERT_ID=5;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "e");
|
|
SET INSERT_ID=6;
|
|
use test;
|
|
SET TIMESTAMP=1579609943;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
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");
|
|
|
|
--- stop-datetime --
|
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
|
use test;
|
|
SET TIMESTAMP=1579609942;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
SET @@session.sql_mode=0;
|
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
|
|
create table t1 (a int auto_increment not null primary key, b char(3));
|
|
SET INSERT_ID=1;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "a");
|
|
SET INSERT_ID=2;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "b");
|
|
|
|
--- to-last-log --
|
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
|
use test;
|
|
SET TIMESTAMP=1579609942;
|
|
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
|
SET @@session.sql_mode=0;
|
|
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
|
|
create table t1 (a int auto_increment not null primary key, b char(3));
|
|
SET INSERT_ID=1;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "a");
|
|
SET INSERT_ID=2;
|
|
SET TIMESTAMP=1579609942;
|
|
insert into t1 values(null, "b");
|
|
SET INSERT_ID=3;
|
|
SET TIMESTAMP=1579609944;
|
|
insert into t1 values(null, "c");
|
|
SET INSERT_ID=4;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "d");
|
|
SET INSERT_ID=5;
|
|
SET TIMESTAMP=1579609946;
|
|
insert into t1 values(null, "e");
|
|
SET INSERT_ID=6;
|
|
SET TIMESTAMP=1579609943;
|
|
insert into t1 values(null, "f");
|
|
|
|
--- end of test --
|
|
drop table t1;
|