Debian Codegraph @

mysql-test/suite/galera/t/MW-86-wait8.test

raw
1 #
2 # SHOW commands now obey wsrep_sync_wait = 8 (WSREP_SYNC_WAIT_BEFORE_SHOW)
3 #
4 --source include/galera_cluster.inc
5 --source include/have_binlog_format_row.inc
6 --source include/have_debug.inc
7 --source include/have_debug_sync.inc
8 --source include/galera_have_debug_sync.inc
9
10 SET @orig_debug=@@debug_dbug;
11
12 --connection node_2
13 # Make sure no signals have been leftover from previous tests to surprise us.
14 SELECT @@debug_sync;
15
16 SET SESSION wsrep_sync_wait = 8;
17 SET GLOBAL debug_dbug = "+d,sync.wsrep_apply_cb";
18
19 --connection node_1
20 CREATE TABLE t_wait8 (f1 INTEGER) ENGINE=InnoDB;
21 # This will complete in node_1 but will start a background apply in node_2
22 # which will stop because of sync.wsrep_apply_cb we set above.
23 INSERT INTO t_wait8 VALUES (1);
24
25 --connection node_2
26
27 --let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
28 SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S";
29
30 SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
31
32 --disable_result_log
33
34 --error ER_LOCK_WAIT_TIMEOUT
35 SHOW BINARY LOGS;
36
37 --error ER_LOCK_WAIT_TIMEOUT
38 SHOW BINLOG EVENTS;
39
40 --error ER_LOCK_WAIT_TIMEOUT
41 SHOW COLUMNS FROM t1;
42
43 --error ER_LOCK_WAIT_TIMEOUT
44 SHOW CREATE DATABASE db1;
45
46 --error ER_LOCK_WAIT_TIMEOUT
47 SHOW CREATE EVENT e1;
48
49 --error ER_LOCK_WAIT_TIMEOUT
50 SHOW CREATE FUNCTION f1;
51
52 --error ER_LOCK_WAIT_TIMEOUT
53 SHOW CREATE PROCEDURE p1;
54
55 --error ER_LOCK_WAIT_TIMEOUT
56 SHOW CREATE TABLE t1;
57
58 --error ER_LOCK_WAIT_TIMEOUT
59 SHOW CREATE TRIGGER tr1;
60
61 --error ER_LOCK_WAIT_TIMEOUT
62 SHOW CREATE VIEW v1;
63
64 --error ER_LOCK_WAIT_TIMEOUT
65 SHOW DATABASES;
66
67 --error 0
68 SHOW ENGINE InnoDB STATUS;
69
70 --error ER_SP_DOES_NOT_EXIST
71 SHOW FUNCTION CODE f1;
72
73 --error ER_LOCK_WAIT_TIMEOUT
74 SHOW FUNCTION STATUS;
75
76 --error ER_LOCK_WAIT_TIMEOUT
77 SHOW GRANTS FOR 'root'@'localhost';
78
79 --error ER_LOCK_WAIT_TIMEOUT
80 SHOW INDEX FROM t1;
81
82 --error ER_LOCK_WAIT_TIMEOUT
83 SHOW OPEN TABLES;
84
85 --error ER_SP_DOES_NOT_EXIST
86 SHOW PROCEDURE CODE p1;
87
88 --error ER_LOCK_WAIT_TIMEOUT
89 SHOW PROCEDURE STATUS;
90
91 --error 0
92 SHOW PRIVILEGES;
93
94 --error ER_LOCK_WAIT_TIMEOUT
95 SHOW STATUS LIKE 'wsrep_cluster_size';
96
97 --error ER_LOCK_WAIT_TIMEOUT
98 SHOW TABLE STATUS;
99
100 --error ER_LOCK_WAIT_TIMEOUT
101 SHOW TABLES;
102
103 --error ER_LOCK_WAIT_TIMEOUT
104 SHOW TRIGGERS;
105
106 --error ER_LOCK_WAIT_TIMEOUT
107 SHOW GLOBAL VARIABLES LIKE 'foo_bar';
108
109 --error 0
110 SHOW WARNINGS;
111
112 --enable_result_log
113
114 --disable_query_log
115 --eval SET GLOBAL wsrep_provider_options = "$wsrep_provider_options_orig"
116 --enable_query_log
117
118 # Unblock the background INSERT and remove the sync point.
119 SET GLOBAL debug_dbug = @orig_debug;
120
121 SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
122 SET debug_sync='RESET';
123
124 SET SESSION wsrep_sync_wait = default;
125
126 # This will wait for the background INSERT to complete before we quit
127 # from the test.
128 DROP TABLE t_wait8;
129
130 # Make sure no pending signals are leftover to surprise subsequent tests.
131 SELECT @@debug_sync;