Debian Codegraph @

mysql-test/suite/rpl/t/rpl_row_img_sequence_min.test

raw
1 #
2 # Purpose:
3 # The rpl_row_img_sequence group of tests verify that sequence MDL updates,
4 # i.e. NEXTVAL and SETVAL, respect the binlog_row_image variable value when
5 # written into the binary log. In particular, it ensures that only changed
6 # columns are written with MINIMAL image mode, and all columns are written
7 # otherwise. This test focuses on validating the behavior of
8 # binlog_row_img=MINIMAL.
9 #
10 # Methodology
11 # After issuing a sequence update, ensure that both 1) it was replicated
12 # correctly, and 2) it was binlogged respective to the binlog_row_image value.
13 # The sequence table does not use caching to ensure each update is immediately
14 # binlogged. Each command is binlogged into its own unique log file, and the
15 # entirety of the file is analyzed for correctness of its sequence event.
16 # Specifically, mysqlbinlog is used in verbose mode so it outputs the columns
17 # which belong to the event, and the columns are analyzed to ensure the correct
18 # ones were logged. rpl_row_img_general_loop.inc is used to test with multiple
19 # chained replicas, varying engines between InnoDB and MyISAM.
20 #
21 # References:
22 # MDEV-28487: sequences not respect value of binlog_row_image with select
23 # nextval(seq_gen)
24 #
25
26 --let $rpl_topology= 1->2->3
27 --source include/rpl_init.inc
28 --source include/have_binlog_format_row.inc
29
30 --connection server_1
31 --source include/have_innodb.inc
32 --connection server_2
33 --source include/have_innodb.inc
34 --connection server_3
35 --source include/have_innodb.inc
36 --connection server_1
37
38 --echo #
39 --echo # binlog_row_image=MINIMAL should write only columns 1 and 8 to the
40 --echo # binary log
41 --echo #
42 --let $row_img_set=server_1:MINIMAL:N,server_2:MINIMAL:Y,server_3:MINIMAL:Y
43 --source include/rpl_row_img_set.inc
44 --let $expected_columns=(1,8)
45 --let row_img_test_script= include/rpl_row_img_sequence.inc
46 --source include/rpl_row_img_general_loop.inc
47
48 --let $row_img_set=server_1:FULL:N,server_2:FULL:Y,server_3:FULL:Y
49 --source include/rpl_row_img_set.inc
50
51 --source include/rpl_end.inc
52 --echo # End of tests