| 1 |
source include/have_log_bin.inc; |
| 2 |
|
| 3 |
# |
| 4 |
# WL#2540 replication event checksum |
| 5 |
# |
| 6 |
# Objectives of the test are: |
| 7 |
# to demo binlog events with CRC32 checksum in them and |
| 8 |
# to prove show binlog events and mysqlbinlog are capable to handle |
| 9 |
# the checksum. |
| 10 |
# |
| 11 |
|
| 12 |
set @save_binlog_checksum = @@global.binlog_checksum; |
| 13 |
set @save_source_verify_checksum = @@global.source_verify_checksum; |
| 14 |
set @@global.binlog_checksum = CRC32; |
| 15 |
set @@global.source_verify_checksum = 1; |
| 16 |
let $MYSQLD_DATADIR= `select @@datadir`; |
| 17 |
|
| 18 |
reset master; |
| 19 |
--echo must be binlog.000001 |
| 20 |
--source include/show_binary_logs.inc |
| 21 |
|
| 22 |
create table t1 (a int); |
| 23 |
flush logs; |
| 24 |
copy_file $MYSQLD_DATADIR/binlog.000001 $MYSQLD_DATADIR/binlog.saved; |
| 25 |
drop table t1; |
| 26 |
|
| 27 |
# Reset GTIDs |
| 28 |
RESET MASTER; |
| 29 |
|
| 30 |
--exec $MYSQL_BINLOG -c $MYSQLD_DATADIR/binlog.saved | $MYSQL |
| 31 |
--source include/show_binlog_events.inc |
| 32 |
show tables; |
| 33 |
|
| 34 |
# clean-up |
| 35 |
|
| 36 |
drop table t1; |
| 37 |
set @@global.binlog_checksum = @save_binlog_checksum; |
| 38 |
set @@global.source_verify_checksum = @save_source_verify_checksum; |
| 39 |
--remove_file $MYSQLD_DATADIR/binlog.saved |
| 40 |
|
| 41 |
--echo End of the tests |