File: binlog_show_binlog_events_invalid_offset_silent.test

package info (click to toggle)
mariadb 1%3A11.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 765,428 kB
  • sloc: ansic: 2,382,827; cpp: 1,803,532; asm: 378,315; perl: 63,176; sh: 46,496; pascal: 40,776; java: 39,363; yacc: 20,428; python: 19,506; sql: 17,864; xml: 12,463; ruby: 8,544; makefile: 6,059; cs: 5,855; ada: 1,700; lex: 1,193; javascript: 1,039; objc: 80; tcl: 73; awk: 46; php: 22
file content (53 lines) | stat: -rw-r--r-- 1,888 bytes parent folder | download | duplicates (4)
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;