~ubuntu-branches/ubuntu/trusty/mysql-5.6/trusty

« back to all changes in this revision

Viewing changes to mysql-test/suite/rpl/t/rpl_read_old_relay_log_info.test

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2014-02-12 11:54:27 UTC
  • Revision ID: package-import@ubuntu.com-20140212115427-oq6tfsqxl1wuwehi
Tags: upstream-5.6.15
ImportĀ upstreamĀ versionĀ 5.6.15

Show diffs side-by-side

added added

removed removed

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