| 1 |
# ==== Purpose ==== |
| 2 |
# |
| 3 |
# Tests the statement based replication of tables in a cross version setup |
| 4 |
# where the master is a 5.7 server and slave is a 8.0 server, and verify |
| 5 |
# that there is no crash at the time of FLUSH LOGS on slave side. |
| 6 |
# |
| 7 |
# ==== Implementation ==== |
| 8 |
# |
| 9 |
# Start a master server on 8.0 |
| 10 |
# Copy the binary log file and index of a 5.7 master server to the datadir of 8.0 master server |
| 11 |
# Start the slave on a 8.0 server |
| 12 |
# Execute Flush logs command on the slave |
| 13 |
# Without the fix the Flush Logs command will trigger an ASAN failure |
| 14 |
# |
| 15 |
# ==== References ==== |
| 16 |
# |
| 17 |
# Bug#29417234:CONTRIBUTION BY FACEBOOK: FIX WRITING FORMAT DESCRIPTION EVENT |
| 18 |
# |
| 19 |
|
| 20 |
--source include/have_binlog_format_statement.inc |
| 21 |
--let $rpl_skip_start_slave= 1 |
| 22 |
--source include/master-slave.inc |
| 23 |
|
| 24 |
--let $MYSQLD_MASTER_DATADIR= `select @@datadir` |
| 25 |
RESET MASTER; |
| 26 |
--let $is_windows = `SELECT CONVERT(@@VERSION_COMPILE_OS USING latin1) IN ('Win32', 'Win64', 'Windows')` |
| 27 |
|
| 28 |
# Stop the master |
| 29 |
--let $rpl_server_number= 1 |
| 30 |
--source include/rpl_stop_server.inc |
| 31 |
|
| 32 |
# clear master datadir |
| 33 |
--remove_file $MYSQLD_MASTER_DATADIR/master-bin.000001 |
| 34 |
--remove_file $MYSQLD_MASTER_DATADIR/master-bin.index |
| 35 |
|
| 36 |
# on Win* platforms path separator is backslash |
| 37 |
if ($is_windows) |
| 38 |
{ |
| 39 |
--copy_file std_data/slave-relay-bin-win.index $MYSQLD_MASTER_DATADIR/master-bin.index |
| 40 |
} |
| 41 |
if (!$is_windows) |
| 42 |
{ |
| 43 |
--copy_file std_data/slave-relay-bin.index $MYSQLD_MASTER_DATADIR/master-bin.index |
| 44 |
} |
| 45 |
|
| 46 |
--copy_file std_data/slave-relay-bin.000001 $MYSQLD_MASTER_DATADIR/master-bin.000001 |
| 47 |
|
| 48 |
# Start the master |
| 49 |
--source include/rpl_start_server.inc |
| 50 |
|
| 51 |
--source include/rpl_connection_slave.inc |
| 52 |
CALL mtr.add_suppression("The replica coordinator and worker threads are stopped, possibly leaving data in inconsistent state"); |
| 53 |
CALL mtr.add_suppression("Got fatal error 1236 from source when reading data from binary log:"); |
| 54 |
START SLAVE; |
| 55 |
let $wait_binlog_event= DROP; |
| 56 |
--source include/wait_for_binlog_event.inc |
| 57 |
|
| 58 |
FLUSH LOGS; |
| 59 |
STOP SLAVE; |
| 60 |
RESET SLAVE; |
| 61 |
|
| 62 |
--let $rpl_only_running_threads= 1 |
| 63 |
--source include/rpl_end.inc |