mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 03:17:20 +02:00
MW-86 MTR test: check that SHOW commands no longer obey wsrep_sync_wait = 1
This commit is contained in:
parent
f20b21a29a
commit
3d4708554c
2 changed files with 64 additions and 0 deletions
18
mysql-test/suite/galera/r/MW-86.result
Normal file
18
mysql-test/suite/galera/r/MW-86.result
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
SET SESSION wsrep_sync_wait = 1;
|
||||
SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
|
||||
CREATE DATABASE db1;
|
||||
SHOW CREATE DATABASE db1;
|
||||
ERROR 42000: Unknown database 'db1'
|
||||
SET GLOBAL DEBUG = "";
|
||||
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
||||
SET SESSION wsrep_sync_wait = 8;
|
||||
DROP DATABASE db1;
|
||||
SET SESSION wsrep_sync_wait = 8;
|
||||
SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
|
||||
SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S";
|
||||
CREATE DATABASE db1;
|
||||
SHOW CREATE DATABASE db1;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
SET GLOBAL DEBUG = "";
|
||||
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
||||
DROP DATABASE db1;
|
||||
46
mysql-test/suite/galera/t/MW-86.test
Normal file
46
mysql-test/suite/galera/t/MW-86.test
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
--source include/galera_cluster.inc
|
||||
|
||||
#
|
||||
# Test 1: SHOW commands no longer obey wsrep_sync_wait = 1
|
||||
#
|
||||
|
||||
--connection node_2
|
||||
SET SESSION wsrep_sync_wait = 1;
|
||||
SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
|
||||
|
||||
--connection node_1
|
||||
CREATE DATABASE db1;
|
||||
|
||||
--connection node_2
|
||||
--error ER_BAD_DB_ERROR
|
||||
SHOW CREATE DATABASE db1;
|
||||
SET GLOBAL DEBUG = "";
|
||||
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
||||
|
||||
SET SESSION wsrep_sync_wait = 8;
|
||||
DROP DATABASE db1;
|
||||
|
||||
|
||||
#
|
||||
# Test 2: SHOW commands now obey wsrep_sync_wait = 8
|
||||
#
|
||||
|
||||
--connection node_2
|
||||
--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
|
||||
SET SESSION wsrep_sync_wait = 8;
|
||||
SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
|
||||
SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S";
|
||||
|
||||
--connection node_1
|
||||
CREATE DATABASE db1;
|
||||
|
||||
--connection node_2
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
SHOW CREATE DATABASE db1;
|
||||
|
||||
SET GLOBAL DEBUG = "";
|
||||
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
||||
DROP DATABASE db1;
|
||||
|
||||
--disable_query_log
|
||||
--eval SET GLOBAL wsrep_provider_options = "$wsrep_provider_options_orig"
|
||||
Loading…
Add table
Add a link
Reference in a new issue