Debian Codegraph @

mysql-test/suite/rpl/t/rpl_mysql80_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 8.0.x master
24 #
25 # mysql-8.0.13-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 --server-id=1 --character-set-server=latin1
32 # with the following SQL script:
33 #
34 #SET NAMES latin1 COLLATE latin1_swedish_ci;
35 #SET sql_mode='';
36 #INSERT INTO t1 (a) VALUES ('2001-01-01 00:00:00.999999');
37 #SET sql_mode=TIME_TRUNCATE_FRACTIONAL;
38 #INSERT INTO t1 (a) VALUES ('2001-01-01 00:00:00.999999');
39 #
40
41 --copy_file $MYSQL_TEST_DIR/std_data/rpl/mysql-8.0.13-stm-temporal-round-binlog.000001 $datadir/master-bin.000001
42
43 --let $rpl_server_number= 1
44 --source include/rpl_start_server.inc
45
46 --source include/wait_until_connected_again.inc
47
48 --connection slave
49 --replace_result $SERVER_MYPORT_1 SERVER_MYPORT_1
50 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;
51
52 --source include/start_slave.inc
53
54 --connection master
55 --sync_slave_with_master
56 SELECT * FROM t1 ORDER BY id;
57
58 --source include/stop_slave.inc
59 DROP TABLE t1;
60
61 --let $rpl_only_running_threads= 1
62 --source include/rpl_end.inc