Commit 1c37ac84 authored by Alexander Barkov's avatar Alexander Barkov

MDEV-8894 Inserting fractional seconds into MySQL 5.6 master breaks consistency on MariaDB 10 slave

The previous patch 269da4bf was
actually for MDEV-8894 (not for MDEV-5377). It was erroneously
pushed with a wrong title.

This patch is a small cleanup for MDEV-8894.
CREATE TABLE is now not a part of binary logs recorded with MySQL,
only INSERT statements are. This will allow to reuse the same binary
logs in combinations with different CREATE TABLE statements,
to tests different data types.
parent 269da4bf
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
include/master-slave.inc include/master-slave.inc
[connection master] [connection master]
connection slave; connection slave;
CREATE TABLE t1 (id SERIAL, a DATETIME(3));
include/stop_slave.inc include/stop_slave.inc
connection master; connection master;
include/rpl_stop_server.inc [server_number=1] include/rpl_stop_server.inc [server_number=1]
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
include/master-slave.inc include/master-slave.inc
[connection master] [connection master]
connection slave; connection slave;
CREATE TABLE t1 (id SERIAL, a DATETIME(3));
include/stop_slave.inc include/stop_slave.inc
connection master; connection master;
include/rpl_stop_server.inc [server_number=1] include/rpl_stop_server.inc [server_number=1]
......
--source include/have_binlog_format_statement.inc
--echo # --echo #
--echo # MDEV-8894 Inserting fractional seconds into MySQL 5.6 master breaks consistency on MariaDB 10 slave --echo # MDEV-8894 Inserting fractional seconds into MySQL 5.6 master breaks consistency on MariaDB 10 slave
--echo # --echo #
...@@ -6,6 +8,7 @@ ...@@ -6,6 +8,7 @@
--source include/master-slave.inc --source include/master-slave.inc
--connection slave --connection slave
CREATE TABLE t1 (id SERIAL, a DATETIME(3));
--source include/stop_slave.inc --source include/stop_slave.inc
--connection master --connection master
...@@ -19,10 +22,15 @@ ...@@ -19,10 +22,15 @@
# #
# Simulate MySQL 5.7.x master # Simulate MySQL 5.7.x master
# #
# mysql-5.7.11-stm-temporal-round-binlog.000001 was recorded with # mysql-5.7.11-stm-temporal-round-binlog.000001 was recorded against a
# "mysqld --log-bin --binlog-format=statement", with the following SQL script: # table with this structure:
#
#CREATE TABLE t1 (id SERIAL, a DATETIME(3)); #CREATE TABLE t1 (id SERIAL, a DATETIME(3));
# (note, the CREATE statement is not inside the binary log)
#
# using this command line:
# mysqld --log-bin --binlog-format=statement
# with the following single SQL statement:
#
#INSERT INTO t1 (a) VALUES ('2001-01-01 00:00:00.999999'); #INSERT INTO t1 (a) VALUES ('2001-01-01 00:00:00.999999');
# #
......
--source include/have_binlog_format_statement.inc
--echo # --echo #
--echo # MDEV-8894 Inserting fractional seconds into MySQL 5.6 master breaks consistency on MariaDB 10 slave --echo # MDEV-8894 Inserting fractional seconds into MySQL 5.6 master breaks consistency on MariaDB 10 slave
--echo # --echo #
...@@ -6,6 +8,7 @@ ...@@ -6,6 +8,7 @@
--source include/master-slave.inc --source include/master-slave.inc
--connection slave --connection slave
CREATE TABLE t1 (id SERIAL, a DATETIME(3));
--source include/stop_slave.inc --source include/stop_slave.inc
--connection master --connection master
...@@ -19,12 +22,17 @@ ...@@ -19,12 +22,17 @@
# #
# Simulate MySQL 8.0.x master # Simulate MySQL 8.0.x master
# #
# mysql-8.0.13-stm-temporal-round-binlog.000001 was recorded with # mysql-8.0.13-stm-temporal-round-binlog.000001 was recorded against a
# "mysqld --log-bin --binlog-format=statement", with the following SQL script: # table with this structure:
#CREATE TABLE t1 (id SERIAL, a DATETIME(3));
# (note, the CREATE statement is not inside the binary log)
#
# using this command line:
# mysqld --log-bin --binlog-format=statement --server-id=1 --character-set-server=latin1
# with the following SQL script:
# #
#SET NAMES utf8mb4 COLLATE utf8mb4_general_ci; #SET NAMES latin1 COLLATE latin1_swedish_ci;
#SET sql_mode=''; #SET sql_mode='';
#CREATE TABLE t1 (id SERIAL, a DATETIME(3));
#INSERT INTO t1 (a) VALUES ('2001-01-01 00:00:00.999999'); #INSERT INTO t1 (a) VALUES ('2001-01-01 00:00:00.999999');
#SET sql_mode=TIME_TRUNCATE_FRACTIONAL; #SET sql_mode=TIME_TRUNCATE_FRACTIONAL;
#INSERT INTO t1 (a) VALUES ('2001-01-01 00:00:00.999999'); #INSERT INTO t1 (a) VALUES ('2001-01-01 00:00:00.999999');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment