File: rpl_mts_until.test

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (87 lines) | stat: -rw-r--r-- 3,279 bytes parent folder | download
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
################################################################################
# Verify below UNTIL options work well on MTS.
# MASTER_LOG_NAME, MASTER_LOG_POS
# RELAY_LOG_NAME, RELAY_LOG_POS
# SQL_BEFORE_GTIDS
# Currently SQL_AFTER_GTIDS is not supportted.
################################################################################
--source include/have_debug.inc
--source include/have_binlog_format_row.inc
--source include/only_mts_replica_parallel_workers.inc
--source include/only_mts_replica_parallel_type_logical_clock.inc
--source include/set_privilege_checks_user_as_system_user.inc
--source include/master-slave.inc

CREATE DATABASE db1;
CREATE DATABASE db2;
CREATE DATABASE db3;

CREATE TABLE db1.t1(c1 INT PRIMARY KEY, c2 CHAR(20));
CREATE TABLE db2.t1(c1 INT PRIMARY KEY, c2 CHAR(20));
CREATE TABLE db3.t1(c1 INT PRIMARY KEY, c2 CHAR(20));
# The view is used to help diff_tables.inc
CREATE VIEW db1.v1 AS SELECT * FROM db1.t1 WHERE c1 <= 4;

--let $gtids_before_insert= `SELECT @@GLOBAL.gtid_executed`

--source include/sync_slave_sql_with_master.inc
--source include/stop_slave_sql.inc
SET @saved_replica_parallel_type = @@GLOBAL.replica_parallel_type;
SET @saved_replica_parallel_workers = @@GLOBAL.replica_parallel_workers;
SET @saved_replica_preserve_commit_order = @@GLOBAL.replica_preserve_commit_order;
SET @saved_innodb_lock_wait_timeout = @@GLOBAL.innodb_lock_wait_timeout;
SET @saved_relay_log_purge = @@GLOBAL.relay_log_purge;

# Set it a long time to guarantee it doens't report an timeout error
SET GLOBAL innodb_lock_wait_timeout = 1000;
SET GLOBAL relay_log_purge = FALSE;

SET GLOBAL replica_parallel_type = "LOGICAL_CLOCK";
SET GLOBAL replica_parallel_workers = 4;
SET GLOBAL replica_preserve_commit_order=0;

--let $until_type= SOURCE_POS
--source extra/rpl_tests/rpl_mts_until.inc

--let $until_type= RELAY_POS
--source extra/rpl_tests/rpl_mts_until.inc

--let $until_type= BEFORE_GTIDS
--source extra/rpl_tests/rpl_mts_until.inc

#--let $until_type= AFTER_GTIDS
#--source extra/rpl_tests/rpl_mts_until.inc

--source include/stop_slave_sql.inc
SET GLOBAL replica_parallel_type = "DATABASE";
SET GLOBAL replica_parallel_workers = 4;
# Set it a long time to guarantee it doens't report an timeout error
SET GLOBAL innodb_lock_wait_timeout = 1000;
SET GLOBAL relay_log_purge = FALSE;

--let $until_type= SOURCE_POS
--source extra/rpl_tests/rpl_mts_until.inc

--let $until_type= RELAY_POS
--source extra/rpl_tests/rpl_mts_until.inc

--let $until_type= BEFORE_GTIDS
--source extra/rpl_tests/rpl_mts_until.inc

#--let $until_type= AFTER_GTIDS
#--source extra/rpl_tests/rpl_mts_until.inc

--source include/rpl_connection_master.inc
DROP DATABASE db1;
DROP DATABASE db2;
DROP DATABASE db3;
--source include/sync_slave_sql_with_master.inc
--source include/stop_slave_sql.inc
SET GLOBAL replica_parallel_type = @saved_replica_parallel_type;
SET GLOBAL replica_parallel_workers = @saved_replica_parallel_workers;
SET GLOBAL replica_preserve_commit_order= @saved_replica_preserve_commit_order;
# Set it a long time to guarantee it doens't report an timeout error
SET GLOBAL innodb_lock_wait_timeout = @saved_innodb_lock_wait_timeout;
SET GLOBAL relay_log_purge = @saved_relay_log_purge;
--let $rpl_only_running_threads= 1
--source include/rpl_end.inc