Debian Codegraph @

mysql-test/suite/binlog/t/binlog_mysqlbinlog_glle_ordered.test

raw
1 #
2 # Purpose:
3 # This test validates that GTIDs are ordered when mysqlbinlog outputs
4 # Gtid_list events.
5 #
6 # Methodology:
7 # Write multiple events to the binlog with different domain ids and server
8 # ids, and ensure that the Gtid_list event GTIDs are ordered first by domain id
9 # (ascending), and then sequence number (ascending).
10 #
11 # References:
12 # MDEV-4989: Support for GTID in mysqlbinlog
13 #
14 --source include/have_log_bin.inc
15
16 RESET MASTER;
17 SET @@session.gtid_domain_id= 0;
18 SET @@session.server_id= 1;
19 CREATE TABLE t1 (a int);
20 SET @@session.gtid_domain_id= 1;
21 SET @@session.server_id= 2;
22 CREATE TABLE t2 (a int);
23 SET @@session.server_id= 1;
24 INSERT INTO t2 VALUES (1);
25 SET @@session.gtid_domain_id= 2;
26 SET @@session.server_id= 3;
27 CREATE TABLE t3 (a int);
28 FLUSH LOGS;
29 FLUSH LOGS;
30
31 --let $binlog_file= query_get_value(SHOW BINARY LOGS, Log_name, 2)
32 --let $MYSQLD_DATADIR=`select @@datadir`
33 --let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/tmp_binlog.out
34
35 --echo # MYSQL_BINLOG MYSQLD_DATADIR/binlog_file > SEARCH_FILE
36 --exec $MYSQL_BINLOG $MYSQLD_DATADIR/$binlog_file > $SEARCH_FILE
37
38 --let SEARCH_PATTERN= Gtid list \[0-1-1,\n# 1-2-1,\n# 1-1-2,\n# 2-3-1\]
39 --source include/search_pattern_in_file.inc
40
41 DROP TABLE t1;
42 DROP TABLE t2;
43 DROP TABLE t3;