Debian Codegraph @

mysql-test/suite/rpl/t/rpl_mysql57_stm_temporal_round.test

raw
1 --source include/have_binlog_format_statement.inc
2
3 --echo #
4 --echo # MDEV-8894 Inserting fractional seconds into MySQL 5.6 master breaks consistency on MariaDB 10 slave
5 --echo #
6
7 --source include/have_innodb.inc
8 --source include/master-slave.inc
9
10 --connection slave
11 CREATE TABLE t1 (id SERIAL, a DATETIME(3));
12 --source include/stop_slave.inc
13
14 --connection master
15 --let $datadir= `SELECT @@datadir`
16
17 --let $rpl_server_number= 1
18 --source include/rpl_stop_server.inc
19
20 --remove_file $datadir/master-bin.000001
21
22 #
23 # Simulate MySQL 5.7.x master
24 #
25 # mysql-5.7.11-stm-temporal-round-binlog.000001 was recorded against a
26 # table with this structure:
27 #CREATE TABLE t1 (id SERIAL, a DATETIME(3));
28 # (note, the CREATE statement is not inside the binary log)
29 #
30 # using this command line:
31 # mysqld --log-bin --binlog-format=statement
32 # with the following single SQL statement:
33 #
34 #INSERT INTO t1 (a) VALUES ('2001-01-01 00:00:00.999999');
35 #
36
37 --copy_file $MYSQL_TEST_DIR/std_data/rpl/mysql-5.7.11-stm-temporal-round-binlog.000001 $datadir/master-bin.000001
38
39 --let $rpl_server_number= 1
40 --source include/rpl_start_server.inc
41
42 --source include/wait_until_connected_again.inc
43
44 --connection slave
45 --replace_result $SERVER_MYPORT_1 SERVER_MYPORT_1
46 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;
47
48 --source include/start_slave.inc
49
50 --connection master
51 --sync_slave_with_master
52 SELECT * FROM t1 ORDER BY id;
53
54 --source include/stop_slave.inc
55 DROP TABLE t1;
56
57 --let $rpl_only_running_threads= 1
58 --source include/rpl_end.inc