File: rpl_gtid_bgc_ticket_manager.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 (117 lines) | stat: -rw-r--r-- 3,931 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
--source include/have_binlog_format_row.inc
--source include/have_debug.inc
--source include/have_debug_sync.inc
--let $option_name = replica_parallel_type
--let $option_value = 'LOGICAL_CLOCK'
--source include/only_with_option.inc
--let $option_name = replica_parallel_workers
--let $option_operator = !=
--let $option_value = 0
--source include/only_with_option.inc
--let $option_name = binlog_order_commits
--let $option_value = 1
--source include/only_with_option.inc
--let $rpl_skip_start_slave = 1
--source include/master-slave.inc

--source include/rpl_connection_slave.inc
let $sysvars_to_save = [
  "GLOBAL.replica_preserve_commit_order",
  "GLOBAL.replica_parallel_workers"
];
--source include/save_sysvars.inc
SET @@GLOBAL.replica_preserve_commit_order = 0;
SET @@GLOBAL.replica_parallel_workers = 4;
--source include/start_slave.inc

--source include/rpl_connection_master.inc
CREATE TABLE t (
  c1 INT NOT NULL PRIMARY KEY,
  c2 INT
);
INSERT INTO t VALUES (0, 0);

--let $debug_point = set_commit_parent_100
--source include/add_debug_point.inc

--source include/sync_slave_sql_with_master.inc

--let $save_binlog_position_in_sql = 1
--source include/save_binlog_position.inc

--source include/rpl_connection_master.inc
--let $gtid_uuid = 435aeb3e-cc91-11ec-a715-6ba04eb9487e
--let $auxiliary_connection = slave

--connect(con1,localhost,root,,)
--let $statement_connection = con1
--let $timestamp = 1
--let $statement = SET gtid_next = "$gtid_uuid:1"; INSERT INTO t VALUES (1, 1)
--let $sync_point = before_assign_session_to_bgc_ticket
--source include/execute_to_conditional_timestamp_sync_point.inc

--connect(con2,localhost,root,,)
--let $statement_connection = con2
--let $timestamp = 2
--let $statement = SET gtid_next = "$gtid_uuid:2"; INSERT INTO t VALUES (2, 2)
--let $sync_point = before_wait_on_ticket
--source include/execute_to_conditional_timestamp_sync_point.inc

--connect(con3,localhost,root,,)
--let $statement_connection = con3
--let $timestamp = 3
--let $statement = SET gtid_next = "$gtid_uuid:3"; INSERT INTO t VALUES (3, 3)
--let $sync_point = before_wait_on_ticket
--source include/execute_to_conditional_timestamp_sync_point.inc

--source include/rpl_connection_master.inc
--let $statement_connection = con1
--let $timestamp = 1
--let $sync_point = before_assign_session_to_bgc_ticket
--let $to_sync_point = inside_wait_on_ticket
--source include/execute_from_conditional_timestamp_sync_point.inc
--let $to_sync_point =

--let $statement_connection = con1
--let $timestamp = 1
--let $sync_point = inside_wait_on_ticket
--source include/execute_from_conditional_timestamp_sync_point.inc

--source include/rpl_connection_master.inc
--let $statement_connection = con2
--let $timestamp = 2
--let $sync_point = before_wait_on_ticket
--source include/execute_from_conditional_timestamp_sync_point.inc

--source include/rpl_connection_master.inc
--let $statement_connection = con3
--let $timestamp = 3
--let $sync_point = before_wait_on_ticket
--source include/execute_from_conditional_timestamp_sync_point.inc

--disconnect con1
--disconnect con2
--disconnect con3

--source include/rpl_connection_master.inc
--let $debug_point = set_commit_parent_100
--source include/remove_debug_point.inc

--source include/sync_slave_sql_with_master.inc
--let $wait_condition = SELECT COUNT(1) = 3 FROM t WHERE c1 > 0;
--source include/wait_condition.inc

--let $events_for_1 = Gtid/.*GTID_NEXT= '$gtid_uuid:1' # !Begin # !Insert # !Commit
--let $events_for_2 = Gtid/.*GTID_NEXT= '$gtid_uuid:2' # !Begin # !Insert # !Commit
--let $events_for_3 = Gtid/.*GTID_NEXT= '$gtid_uuid:3' # !Begin # !Insert # !Commit

--let $event_sequence = $events_for_2 # $events_for_3 # $events_for_1
--source include/assert_binlog_events.inc

--source include/stop_slave.inc
--source include/restore_sysvars.inc
--source include/start_slave.inc

--source include/rpl_connection_master.inc
DROP TABLE t;
--source include/rpl_end.inc