1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
#
# Ensure that calling SHOW BINLOG EVENTS FROM <offset> with an invalid offset
# will not result in error messages in the server log. That is, this call is a
# read operation for a user, and if it fails due to invalid usage, that is not
# a server error, but only one to report to the user.
#
# References:
# MDEV-32628: Cryptic ERROR message & inconsistent behavior on incorrect
# SHOW BINLOG EVENTS FROM ...
#
--source include/have_binlog_format_row.inc
--echo #
--echo # Initialize test data
set @save_master_verify_checksum = @@global.master_verify_checksum;
set @@global.master_verify_checksum = 1;
create table t1 (a int);
insert into t1 values (1);
--let $middle_binlog_pos= query_get_value(SHOW BINARY LOGS, File_size, 1)
insert into t1 values (2);
--let $assert_text= Ensure the client error is not in the server log
--let $assert_select= Error in Log_event
--let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.1.err
--let $assert_count= 0
--let $assert_only_after = CURRENT_TEST:
# Pre MDEV-32628, this would write an event truncated error in the logs
--let $invalid_pos= `SELECT $middle_binlog_pos - 1`
--replace_result $invalid_pos invalid_pos
--error 1220
--eval SHOW BINLOG EVENTS FROM $invalid_pos
--source include/assert_grep.inc
# Pre MDEV-32628, this would write an event too big error in the logs
--error 1220
SHOW BINLOG EVENTS FROM 500;
--source include/assert_grep.inc
# Pre MDEV-32628, this would write a checksum verification failed error in the logs
--error 1220
SHOW BINLOG EVENTS FROM 498;
--source include/assert_grep.inc
--let $assert_text= Ensure there is not a specific checksum failure error
--let $assert_select= Replication event checksum verification failed while reading from a log file
--source include/assert_grep.inc
--echo #
--echo # Cleanup
set @@global.master_verify_checksum = @save_master_verify_checksum;
drop table t1;
|