Debian Codegraph @

mysql-test/suite/rpl/include/rpl_partition_info.inc

raw
1 # ==== Purpose ====
2 #
3 # Assert that the binary log contains a specific sequence of
4 # partition ids for INSERT and DELETE statements
5 #
6 # ==== Usage ====
7 #
8 # --let $binlog_fullpath= TEXT
9 # --let $binlog_position= NUMBER
10 # --let $partition_id= NUMBER
11 # --source include/rpl_partition_info.inc
12 #
13 # Parameters:
14 #
15 # $binlog_fullpath
16 # The full path of binary log to look in.
17 # (settable using include/save_binlog_position.inc)
18 # $binlog_position
19 # The log position to start reading from
20 # (settable using include/save_binlog_position.inc)
21 # $expected_partition_id
22 # The partition_id where the row changes are done. It will contain
23 # a single value or a semicolon-separated list of partition_id.
24 # ==== References ====
25 #
26 # Bug#28712618:INSERT/UPDATE/DELETE WITH MULTIPLE ROWS IN SAME PARTITION CREATE MULTIPLE EVENT
27 # WL#12168:Add Partition Information into the Binary Log
28
29 if ($expected_partition_id == '')
30 {
31 --die !!!ERROR IN TEST: you must set $expected_partition_id
32 }
33
34 --let $include_filename= rpl_partition_info.inc
35 --source include/begin_include_file.inc
36
37 --exec $MYSQL_BINLOG --start-position=$binlog_position -vv $binlog_fullpath > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_partition.binlog
38 --let $assert_file = $MYSQLTEST_VARDIR/tmp/mysqlbinlog_partition.binlog
39
40 --let $assert_select= partition:
41 --let $assert_match= `SELECT CONCAT('partition: ', REPLACE('$expected_partition_id', ';', '.*\n[^\n]*partition: '))`
42 --let $assert_text= assert_partition_id: $expected_partition_id
43 --source include/assert_grep.inc
44
45 --let $expected_partition_id=
46 --remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_partition.binlog
47 --let $include_filename= rpl_partition_info.inc
48 --source include/end_include_file.inc