summaryrefslogtreecommitdiff
path: root/mysql-test/suite/rpl/t/rpl_mysql57_stm_temporal_round.test
blob: 34001382c93fdd4e6fc0df090043f800686751d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
--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 #

--source include/have_innodb.inc
--source include/master-slave.inc

--connection slave
CREATE TABLE t1 (id SERIAL, a DATETIME(3));
--source include/stop_slave.inc

--connection master
--let $datadir= `SELECT @@datadir`

--let $rpl_server_number= 1
--source include/rpl_stop_server.inc

--remove_file $datadir/master-bin.000001

#
# Simulate MySQL 5.7.x master
#
# 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');
#

--copy_file $MYSQL_TEST_DIR/std_data/rpl/mysql-5.7.11-stm-temporal-round-binlog.000001 $datadir/master-bin.000001

--let $rpl_server_number= 1
--source include/rpl_start_server.inc

--source include/wait_until_connected_again.inc

--connection slave
--replace_result $SERVER_MYPORT_1 SERVER_MYPORT_1
eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$SERVER_MYPORT_1, master_user='root', master_log_file='master-bin.000001', master_log_pos=4, master_use_gtid=no;

--source include/start_slave.inc

--connection master
--sync_slave_with_master
SELECT * FROM t1 ORDER BY id;

--source include/stop_slave.inc
DROP TABLE t1;

--let $rpl_only_running_threads= 1
--source include/rpl_end.inc