2017-03-08 15:29:31 +01:00
|
|
|
#
|
2017-08-15 13:57:15 +03:00
|
|
|
# SHOW commands now obey wsrep_sync_wait = 8 (WSREP_SYNC_WAIT_BEFORE_SHOW)
|
2017-03-08 15:29:31 +01:00
|
|
|
#
|
2017-08-15 13:57:15 +03:00
|
|
|
--source include/galera_cluster.inc
|
|
|
|
--source include/have_binlog_format_row.inc
|
2020-06-24 09:38:54 +03:00
|
|
|
--source include/have_debug.inc
|
2017-08-15 13:57:15 +03:00
|
|
|
--source include/have_debug_sync.inc
|
2020-06-24 09:38:54 +03:00
|
|
|
--source include/galera_have_debug_sync.inc
|
2017-03-08 15:29:31 +01:00
|
|
|
|
|
|
|
--connection node_2
|
2017-08-15 13:57:15 +03:00
|
|
|
# Make sure no signals have been leftover from previous tests to surprise us.
|
|
|
|
SELECT @@debug_sync;
|
2017-03-08 15:29:31 +01:00
|
|
|
|
|
|
|
SET SESSION wsrep_sync_wait = 8;
|
2019-02-27 13:15:03 +02:00
|
|
|
SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
|
2017-03-08 15:29:31 +01:00
|
|
|
|
2017-08-15 13:57:15 +03:00
|
|
|
--connection node_1
|
|
|
|
CREATE TABLE t_wait8 (f1 INTEGER) ENGINE=InnoDB;
|
|
|
|
# This will complete in node_1 but will start a background apply in node_2
|
|
|
|
# which will stop because of sync.wsrep_apply_cb we set above.
|
|
|
|
INSERT INTO t_wait8 VALUES (1);
|
2017-03-08 15:29:31 +01:00
|
|
|
|
|
|
|
--connection node_2
|
2017-08-15 13:57:15 +03:00
|
|
|
|
2017-03-08 15:29:31 +01:00
|
|
|
--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
|
2017-03-13 08:52:09 -07:00
|
|
|
SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S";
|
2017-03-08 15:29:31 +01:00
|
|
|
|
2017-08-15 13:57:15 +03:00
|
|
|
SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
|
|
|
|
|
|
|
|
--disable_result_log
|
2017-03-08 15:29:31 +01:00
|
|
|
|
2017-03-13 08:52:09 -07:00
|
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
|
|
SHOW BINARY LOGS;
|
|
|
|
|
|
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
|
|
SHOW BINLOG EVENTS;
|
|
|
|
|
|
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
|
|
SHOW COLUMNS FROM t1;
|
|
|
|
|
2017-03-08 15:29:31 +01:00
|
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
|
|
SHOW CREATE DATABASE db1;
|
|
|
|
|
2017-03-13 08:52:09 -07:00
|
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
|
|
SHOW CREATE EVENT e1;
|
|
|
|
|
|
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
|
|
SHOW CREATE FUNCTION f1;
|
|
|
|
|
|
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
|
|
SHOW CREATE PROCEDURE p1;
|
|
|
|
|
|
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
|
|
SHOW CREATE TABLE t1;
|
|
|
|
|
|
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
|
|
SHOW CREATE TRIGGER tr1;
|
|
|
|
|
|
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
|
|
SHOW CREATE VIEW v1;
|
|
|
|
|
|
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
|
|
SHOW DATABASES;
|
|
|
|
|
|
|
|
--error 0
|
|
|
|
SHOW ENGINE InnoDB STATUS;
|
|
|
|
|
|
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
|
|
SHOW FUNCTION CODE f1;
|
|
|
|
|
|
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
|
|
SHOW FUNCTION STATUS;
|
|
|
|
|
|
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
|
|
SHOW GRANTS FOR 'root'@'localhost';
|
|
|
|
|
|
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
|
|
SHOW INDEX FROM t1;
|
|
|
|
|
|
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
|
|
SHOW OPEN TABLES;
|
|
|
|
|
|
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
|
|
SHOW PROCEDURE CODE p1;
|
|
|
|
|
|
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
|
|
SHOW PROCEDURE STATUS;
|
|
|
|
|
|
|
|
--error 0
|
|
|
|
SHOW PRIVILEGES;
|
|
|
|
|
|
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
|
|
SHOW STATUS LIKE 'wsrep_cluster_size';
|
|
|
|
|
|
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
|
|
SHOW TABLE STATUS;
|
|
|
|
|
|
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
|
|
SHOW TABLES;
|
|
|
|
|
|
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
|
|
SHOW TRIGGERS;
|
|
|
|
|
|
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
|
|
SHOW GLOBAL VARIABLES LIKE 'foo_bar';
|
|
|
|
|
|
|
|
--error 0
|
|
|
|
SHOW WARNINGS;
|
|
|
|
|
2017-08-15 13:57:15 +03:00
|
|
|
--enable_result_log
|
2017-03-08 15:29:31 +01:00
|
|
|
|
|
|
|
--disable_query_log
|
|
|
|
--eval SET GLOBAL wsrep_provider_options = "$wsrep_provider_options_orig"
|
2017-08-15 13:57:15 +03:00
|
|
|
--enable_query_log
|
|
|
|
|
|
|
|
# Unblock the background INSERT and remove the sync point.
|
2019-02-27 13:15:03 +02:00
|
|
|
SET GLOBAL debug_dbug = "";
|
2017-08-15 13:57:15 +03:00
|
|
|
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
|
|
|
|
|
|
|
SET SESSION wsrep_sync_wait = default;
|
|
|
|
|
|
|
|
# This will wait for the background INSERT to complete before we quit
|
|
|
|
# from the test.
|
|
|
|
DROP TABLE t_wait8;
|
|
|
|
|
|
|
|
SET debug_sync='RESET';
|
2017-03-13 08:52:09 -07:00
|
|
|
|
2017-08-15 13:57:15 +03:00
|
|
|
# Make sure no pending signals are leftover to surprise subsequent tests.
|
|
|
|
SELECT @@debug_sync;
|