Debian Codegraph @

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

raw
1 # ==== Purpose ====
2 #
3 # - Verify that the post-WL#344 format of relay_log.info can be parsed.
4
5 --source include/master-slave.inc
6
7 CREATE TABLE t1 (a INT);
8 INSERT INTO t1 VALUES (1);
9 DROP TABLE t1;
10 --sync_slave_with_master
11
12 --echo ==== Check that we can understand the new format of relay-log.info ====
13 --source include/stop_slave.inc
14
15 --let $master_use_gtid_option= No
16 --source include/reset_slave.inc
17 --let $MYSQLD_DATADIR= `select @@datadir`
18
19 # the new version of relay_log.info comes in two versions: with path
20 # separator '/' (most systems) and with path separator '\' (windows)
21 if ($SYSTEM_PATH_SEPARATOR != /) {
22 --let $file_suffix= -win
23 }
24
25 # MDEV-19801 changed the default Using_Gtid to Slave_Pos which doesn't
26 # automatically purge relay-log.info
27 --remove_file $MYSQLD_DATADIR/relay-log.info
28 --copy_file $MYSQL_TEST_DIR/std_data/new-format-relay-log$file_suffix.info $MYSQLD_DATADIR/relay-log.info
29
30 --echo # Read relay-log.info
31 START SLAVE IO_THREAD;
32 --source include/wait_for_slave_io_to_start.inc
33 --echo # Check that relay log coordinates are equal to those saved in new-format_relay-log.info
34 --let $master_file= query_get_value(SHOW SLAVE STATUS, Relay_Master_Log_File, 1)
35 --let $master_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1)
36 --let $relay_log_file= query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1)
37 --let $relay_log_pos= query_get_value(SHOW SLAVE STATUS, Relay_Log_Pos, 1)
38 --echo $master_file= $master_file, $master_pos, $relay_log_file, $relay_log_pos
39 if (`SELECT "$master_file" != "" OR
40 "$master_pos" != "0" OR
41 "$relay_log_file" != "slave-relay-bin.000001" OR
42 "$relay_log_pos" != "4"`) {
43 --echo ERROR: log coordinates changed
44 --die log coordinates changed
45 }
46
47 --let $rpl_only_running_threads= 1
48 --source include/rpl_end.inc