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