Debian Codegraph @

mysql-test/suite/rpl_nogtid/t/rpl_read_old_relay_log_info.test

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