Debian Codegraph @

mysql-test/suite/rpl_gtid/t/rpl_mts_until.test

raw
1 ################################################################################
2 # Verify below UNTIL options work well on MTS.
3 # MASTER_LOG_NAME, MASTER_LOG_POS
4 # RELAY_LOG_NAME, RELAY_LOG_POS
5 # SQL_BEFORE_GTIDS
6 # Currently SQL_AFTER_GTIDS is not supportted.
7 ################################################################################
8 --source include/have_debug.inc
9 --source include/have_binlog_format_row.inc
10 --source include/only_mts_replica_parallel_workers.inc
11 --source include/only_mts_replica_parallel_type_logical_clock.inc
12 --source include/set_privilege_checks_user_as_system_user.inc
13 --source include/master-slave.inc
14
15 CREATE DATABASE db1;
16 CREATE DATABASE db2;
17 CREATE DATABASE db3;
18
19 CREATE TABLE db1.t1(c1 INT PRIMARY KEY, c2 CHAR(20));
20 CREATE TABLE db2.t1(c1 INT PRIMARY KEY, c2 CHAR(20));
21 CREATE TABLE db3.t1(c1 INT PRIMARY KEY, c2 CHAR(20));
22 # The view is used to help diff_tables.inc
23 CREATE VIEW db1.v1 AS SELECT * FROM db1.t1 WHERE c1 <= 4;
24
25 --let $gtids_before_insert= `SELECT @@GLOBAL.gtid_executed`
26
27 --source include/sync_slave_sql_with_master.inc
28 --source include/stop_slave_sql.inc
29 SET @saved_replica_parallel_type = @@GLOBAL.replica_parallel_type;
30 SET @saved_replica_parallel_workers = @@GLOBAL.replica_parallel_workers;
31 SET @saved_replica_preserve_commit_order = @@GLOBAL.replica_preserve_commit_order;
32 SET @saved_innodb_lock_wait_timeout = @@GLOBAL.innodb_lock_wait_timeout;
33 SET @saved_relay_log_purge = @@GLOBAL.relay_log_purge;
34
35 # Set it a long time to guarantee it doens't report an timeout error
36 SET GLOBAL innodb_lock_wait_timeout = 1000;
37 SET GLOBAL relay_log_purge = FALSE;
38
39 SET GLOBAL replica_parallel_type = "LOGICAL_CLOCK";
40 SET GLOBAL replica_parallel_workers = 4;
41 SET GLOBAL replica_preserve_commit_order=0;
42
43 --let $until_type= SOURCE_POS
44 --source extra/rpl_tests/rpl_mts_until.inc
45
46 --let $until_type= RELAY_POS
47 --source extra/rpl_tests/rpl_mts_until.inc
48
49 --let $until_type= BEFORE_GTIDS
50 --source extra/rpl_tests/rpl_mts_until.inc
51
52 #--let $until_type= AFTER_GTIDS
53 #--source extra/rpl_tests/rpl_mts_until.inc
54
55 --source include/stop_slave_sql.inc
56 SET GLOBAL replica_parallel_type = "DATABASE";
57 SET GLOBAL replica_parallel_workers = 4;
58 # Set it a long time to guarantee it doens't report an timeout error
59 SET GLOBAL innodb_lock_wait_timeout = 1000;
60 SET GLOBAL relay_log_purge = FALSE;
61
62 --let $until_type= SOURCE_POS
63 --source extra/rpl_tests/rpl_mts_until.inc
64
65 --let $until_type= RELAY_POS
66 --source extra/rpl_tests/rpl_mts_until.inc
67
68 --let $until_type= BEFORE_GTIDS
69 --source extra/rpl_tests/rpl_mts_until.inc
70
71 #--let $until_type= AFTER_GTIDS
72 #--source extra/rpl_tests/rpl_mts_until.inc
73
74 --source include/rpl_connection_master.inc
75 DROP DATABASE db1;
76 DROP DATABASE db2;
77 DROP DATABASE db3;
78 --source include/sync_slave_sql_with_master.inc
79 --source include/stop_slave_sql.inc
80 SET GLOBAL replica_parallel_type = @saved_replica_parallel_type;
81 SET GLOBAL replica_parallel_workers = @saved_replica_parallel_workers;
82 SET GLOBAL replica_preserve_commit_order= @saved_replica_preserve_commit_order;
83 # Set it a long time to guarantee it doens't report an timeout error
84 SET GLOBAL innodb_lock_wait_timeout = @saved_innodb_lock_wait_timeout;
85 SET GLOBAL relay_log_purge = @saved_relay_log_purge;
86 --let $rpl_only_running_threads= 1
87 --source include/rpl_end.inc