Debian Codegraph @

mysql-test/suite/rpl_nogtid/t/rpl_semi_sync_deadlock.test

raw
1 ################################################################################
2 # WL#6969 Additional concurrency tests for BGC
3 #
4 # Concurrency test verifies that there is not 3-way deadlock any more.
5 #
6 # ################################################################################
7 --source include/not_group_replication_plugin.inc
8 --source include/have_debug_sync.inc
9 --source include/master-slave.inc
10 --source include/install_semisync.inc
11
12 --echo # Initialization
13 SET @debug_save= @@GLOBAL.DEBUG;
14 SET GLOBAL rpl_semi_sync_source_timeout= 6000000;
15
16 --echo #
17 --echo # Verify no deadlock at AFTER_SYNC
18 --echo #
19 --source extra/rpl_tests/rpl_semi_sync_deadlock.test
20
21 --echo #
22 --echo # Verify no deadlock at AFTER_COMMIT
23 --echo #
24 SET GLOBAL rpl_semi_sync_source_wait_point= AFTER_COMMIT;
25 --source extra/rpl_tests/rpl_semi_sync_deadlock.test
26
27 --echo # Cleanup
28 SET GLOBAL rpl_semi_sync_source_timeout= 600000;
29
30 --disable_query_log
31 --disable_result_log
32 --let $n= 11
33 --let $i= 1
34 while ($i < $n)
35 {
36 --eval CREATE TABLE t$i(c1 INT) ENGINE= InnoDB;
37 --inc $i
38 }
39 --enable_result_log
40 --enable_query_log
41
42 --source include/sync_slave_sql_with_master.inc
43
44 --connection master
45 SET GLOBAL debug= '+d,semi_sync_3-way_deadlock';
46 SET DEBUG_SYNC= "before_process_commit_stage_queue WAIT_FOR signal.rotate_finished";
47
48 --echo # Build 10 connections to master server
49 --disable_query_log
50 --disable_result_log
51 --let $i= 1
52 while ($i < $n)
53 {
54 --connect(con$i,127.0.0.1,root,,test,$MASTER_MYPORT,)
55 --inc $i
56 }
57 --enable_result_log
58 --enable_query_log
59
60 --echo # Execute INSERT statement on these 10 connections in parallel
61 --disable_query_log
62 --disable_result_log
63
64 --let $i= 1
65 while ($i < $n)
66 {
67 --connection con$i
68 --send
69 --eval INSERT INTO t$i VALUES(2)
70 --inc $i
71 }
72 --enable_result_log
73 --enable_query_log
74
75 --connection master1
76 SET DEBUG_SYNC= "before_rotate_binlog SIGNAL signal.rotate_finished";
77 --sleep 3
78 --echo # Rotate binlog file
79 FLUSH LOGS;
80
81 --disable_query_log
82 --disable_result_log
83 --let $i= 1
84 while ($i < $n)
85 {
86 --connection con$i
87 --reap
88 --inc $i
89 }
90 --enable_result_log
91 --enable_query_log
92
93 # clean up
94 --connection master
95 --disable_query_log
96 --disable_result_log
97 # disconnect connections
98 --let $i= 1
99 while ($i < $n)
100 {
101 --disconnect con$i
102 --inc $i
103 }
104 # drop tables
105 --let $i= 1
106 while ($i < $n)
107 {
108 --eval DROP TABLE t$i
109 --inc $i
110 }
111 --enable_result_log
112 --enable_query_log
113 SET DEBUG_SYNC= 'RESET';
114 SET @@GLOBAL.DEBUG= @debug_save;
115 SET GLOBAL rpl_semi_sync_source_wait_point= AFTER_SYNC;
116 --source include/sync_slave_sql_with_master.inc
117
118 --source include/uninstall_semisync.inc
119 --source include/rpl_end.inc