1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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

The previous patch 269da4bf19 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.
This commit is contained in:
Alexander Barkov
2018-12-04 18:11:45 +04:00
parent 269da4bf19
commit 1c37ac84ef
6 changed files with 26 additions and 8 deletions

View File

@ -4,6 +4,7 @@
include/master-slave.inc
[connection master]
connection slave;
CREATE TABLE t1 (id SERIAL, a DATETIME(3));
include/stop_slave.inc
connection master;
include/rpl_stop_server.inc [server_number=1]

View File

@ -4,6 +4,7 @@
include/master-slave.inc
[connection master]
connection slave;
CREATE TABLE t1 (id SERIAL, a DATETIME(3));
include/stop_slave.inc
connection master;
include/rpl_stop_server.inc [server_number=1]

View File

@ -1,3 +1,5 @@
--source include/have_binlog_format_statement.inc
--echo #
--echo # MDEV-8894 Inserting fractional seconds into MySQL 5.6 master breaks consistency on MariaDB 10 slave
--echo #
@ -6,6 +8,7 @@
--source include/master-slave.inc
--connection slave
CREATE TABLE t1 (id SERIAL, a DATETIME(3));
--source include/stop_slave.inc
--connection master
@ -19,10 +22,15 @@
#
# Simulate MySQL 5.7.x master
#
# mysql-5.7.11-stm-temporal-round-binlog.000001 was recorded with
# "mysqld --log-bin --binlog-format=statement", with the following SQL script:
#
# mysql-5.7.11-stm-temporal-round-binlog.000001 was recorded against a
# 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
# with the following single SQL statement:
#
#INSERT INTO t1 (a) VALUES ('2001-01-01 00:00:00.999999');
#

View File

@ -1,3 +1,5 @@
--source include/have_binlog_format_statement.inc
--echo #
--echo # MDEV-8894 Inserting fractional seconds into MySQL 5.6 master breaks consistency on MariaDB 10 slave
--echo #
@ -6,6 +8,7 @@
--source include/master-slave.inc
--connection slave
CREATE TABLE t1 (id SERIAL, a DATETIME(3));
--source include/stop_slave.inc
--connection master
@ -19,12 +22,17 @@
#
# Simulate MySQL 8.0.x master
#
# mysql-8.0.13-stm-temporal-round-binlog.000001 was recorded with
# "mysqld --log-bin --binlog-format=statement", with the following SQL script:
#
#SET NAMES utf8mb4 COLLATE utf8mb4_general_ci;
#SET sql_mode='';
# mysql-8.0.13-stm-temporal-round-binlog.000001 was recorded against a
# 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 latin1 COLLATE latin1_swedish_ci;
#SET sql_mode='';
#INSERT INTO t1 (a) VALUES ('2001-01-01 00:00:00.999999');
#SET sql_mode=TIME_TRUNCATE_FRACTIONAL;
#INSERT INTO t1 (a) VALUES ('2001-01-01 00:00:00.999999');