diff --git a/mysql-test/suite/galera/galera_2nodes.cnf b/mysql-test/suite/galera/galera_2nodes.cnf index 0dc22ee4a81..3d510d74429 100644 --- a/mysql-test/suite/galera/galera_2nodes.cnf +++ b/mysql-test/suite/galera/galera_2nodes.cnf @@ -12,7 +12,7 @@ wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#gale # enforce read-committed characteristics across the cluster wsrep-causal-reads=ON -wsrep-sync-wait=7 +wsrep-sync-wait=15 [mysqld.1] #galera_port=@OPT.port diff --git a/mysql-test/suite/galera/galera_2nodes_as_master.cnf b/mysql-test/suite/galera/galera_2nodes_as_master.cnf index 08d860e9ba4..78b0ac84273 100644 --- a/mysql-test/suite/galera/galera_2nodes_as_master.cnf +++ b/mysql-test/suite/galera/galera_2nodes_as_master.cnf @@ -28,7 +28,7 @@ wsrep_node_address=127.0.0.1 wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port # enforce read-committed characteristics across the cluster wsrep-causal-reads=ON -wsrep-sync-wait=7 +wsrep-sync-wait=15 [mysqld.2] #galera_port=@OPT.port @@ -47,7 +47,7 @@ wsrep_node_address=127.0.0.1 wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port # enforce read-committed characteristics across the cluster wsrep-causal-reads=ON -wsrep-sync-wait=7 +wsrep-sync-wait=15 [mysqld.3] server-id=3 diff --git a/mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf b/mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf index 716a790fea6..f68fe524904 100644 --- a/mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf +++ b/mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf @@ -29,7 +29,7 @@ wsrep_provider_options='base_port=@mysqld.2.#galera_port;evs.install_timeout = P # enforce read-committed characteristics across the cluster wsrep_causal_reads=ON -wsrep_sync_wait = 7 +wsrep_sync_wait = 15 wsrep_node_address=127.0.0.1 wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port @@ -49,7 +49,7 @@ wsrep_provider_options='base_port=@mysqld.3.#galera_port;evs.install_timeout = P # enforce read-committed characteristics across the cluster wsrep_causal_reads=ON -wsrep_sync_wait = 7 +wsrep_sync_wait = 15 wsrep_node_address=127.0.0.1 wsrep_sst_receive_address=127.0.0.2:@mysqld.3.#sst_port diff --git a/mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf b/mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf index 5f0af2e58e5..d5490280ab2 100644 --- a/mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf +++ b/mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf @@ -23,7 +23,7 @@ wsrep_provider_options='base_port=@mysqld.1.#galera_port' # enforce read-committed characteristics across the cluster wsrep_causal_reads=ON -wsrep_sync_wait = 7 +wsrep_sync_wait = 15 wsrep_node_address=127.0.0.1 wsrep_sst_receive_address=127.0.0.2:@mysqld.1.#sst_port @@ -49,7 +49,7 @@ wsrep_provider_options='base_port=@mysqld.2.#galera_port' # enforce read-committed characteristics across the cluster wsrep_causal_reads=ON -wsrep_sync_wait = 7 +wsrep_sync_wait = 15 wsrep_node_address=127.0.0.1 wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port diff --git a/mysql-test/suite/galera/galera_2nodes_as_slave.cnf b/mysql-test/suite/galera/galera_2nodes_as_slave.cnf index 2a4b18da5f8..cf1eccb1ba9 100644 --- a/mysql-test/suite/galera/galera_2nodes_as_slave.cnf +++ b/mysql-test/suite/galera/galera_2nodes_as_slave.cnf @@ -31,7 +31,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port' # enforce read-committed characteristics across the cluster wsrep-causal-reads=ON -wsrep-sync-wait=7 +wsrep-sync-wait=15 server-id=2 [mysqld.3] @@ -53,7 +53,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port' # enforce read-committed characteristics across the cluster wsrep-causal-reads=ON -wsrep-sync-wait=7 +wsrep-sync-wait=15 server-id=3 [ENV] diff --git a/mysql-test/suite/galera/galera_3nodes_as_slave.cnf b/mysql-test/suite/galera/galera_3nodes_as_slave.cnf index aed33ba365b..ac1ca34e242 100644 --- a/mysql-test/suite/galera/galera_3nodes_as_slave.cnf +++ b/mysql-test/suite/galera/galera_3nodes_as_slave.cnf @@ -30,7 +30,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port' # enforce read-committed characteristics across the cluster wsrep-causal-reads=ON -wsrep-sync-wait=7 +wsrep-sync-wait=15 server-id=2 [mysqld.3] @@ -51,7 +51,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port' # enforce read-committed characteristics across the cluster wsrep-causal-reads=ON -wsrep-sync-wait=7 +wsrep-sync-wait=15 server-id=3 [mysqld.4] @@ -72,7 +72,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.4.#sst_port' # enforce read-committed characteristics across the cluster wsrep-causal-reads=ON -wsrep-sync-wait=7 +wsrep-sync-wait=15 server-id=4 [ENV] diff --git a/mysql-test/suite/galera/galera_4nodes.cnf b/mysql-test/suite/galera/galera_4nodes.cnf index e54ff27759e..a0ef1dc092b 100644 --- a/mysql-test/suite/galera/galera_4nodes.cnf +++ b/mysql-test/suite/galera/galera_4nodes.cnf @@ -9,7 +9,7 @@ wsrep-provider=@ENV.WSREP_PROVIDER wsrep_node_address=127.0.0.1 # enforce read-committed characteristics across the cluster wsrep-causal-reads=ON -wsrep-sync-wait=7 +wsrep-sync-wait=15 [mysqld.1] #galera_port=@OPT.port diff --git a/mysql-test/suite/galera/r/GAL-401.result b/mysql-test/suite/galera/r/GAL-401.result index 4de13cf142b..fbdb2d39a28 100644 --- a/mysql-test/suite/galera/r/GAL-401.result +++ b/mysql-test/suite/galera/r/GAL-401.result @@ -9,7 +9,7 @@ SHOW STATUS LIKE 'wsrep_desync_count'; Variable_name Value wsrep_desync_count 0 SET @@global.wsrep_desync = 0; -SET SESSION wsrep_sync_wait=7; +SET SESSION wsrep_sync_wait=15; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/galera/r/galera_applier_ftwrl_table.result b/mysql-test/suite/galera/r/galera_applier_ftwrl_table.result index cecbfc1f3cf..1b2a3b937bb 100644 --- a/mysql-test/suite/galera/r/galera_applier_ftwrl_table.result +++ b/mysql-test/suite/galera/r/galera_applier_ftwrl_table.result @@ -8,7 +8,7 @@ SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 UNLOCK TABLES; -SET SESSION wsrep_sync_wait = 7; +SET SESSION wsrep_sync_wait = 15; SELECT COUNT(*) = 2 FROM t1; COUNT(*) = 2 1 diff --git a/mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result b/mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result index ee967356c85..c30f78896e5 100644 --- a/mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result +++ b/mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result @@ -12,7 +12,7 @@ SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system use COUNT(*) = 1 1 UNLOCK TABLES; -SET SESSION wsrep_sync_wait = 7; +SET SESSION wsrep_sync_wait = 15; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result b/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result index 96ed226c3ab..3c5c07ae396 100644 --- a/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result +++ b/mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result @@ -6,7 +6,7 @@ SET SESSION wsrep_sync_wait = 0; UNLOCK TABLES; COMMIT; SET AUTOCOMMIT=ON; -SET SESSION wsrep_sync_wait = 7; +SET SESSION wsrep_sync_wait = 15; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 diff --git a/mysql-test/suite/galera/r/galera_defaults.result b/mysql-test/suite/galera/r/galera_defaults.result index 878fe80ff98..b242a468f72 100644 --- a/mysql-test/suite/galera/r/galera_defaults.result +++ b/mysql-test/suite/galera/r/galera_defaults.result @@ -47,7 +47,7 @@ WSREP_SST_AUTH WSREP_SST_DONOR WSREP_SST_DONOR_REJECTS_QUERIES OFF WSREP_SST_METHOD rsync -WSREP_SYNC_WAIT 7 +WSREP_SYNC_WAIT 15 ; ; ; cert.log_conflicts = no; debug = no; evs.auto_evict = 0; evs.causal_keepalive_period = PT1S; evs.debug_log_mask = 0x1; evs.delay_margin = PT1S; evs.delayed_keep_period = PT30S; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT15S; evs.info_log_mask = 0; evs.install_timeout = PT7.5S; evs.join_retrans_period = PT1S; evs.keepalive_period = PT1S; evs.max_install_timeouts = 3; evs.send_window = 4; evs.stats_report_period = PT1M; evs.suspect_timeout = PT10S; evs.use_aggregate = true; evs.user_send_window = 2; evs.version = 0; evs.view_forget_timeout = P1D; ; gcache.keep_pages_size = 0; gcache.mem_size = 0; ; gcache.page_size = 128M; gcache.recover = no; gcache.size = 10M; gcomm.thread_prio = ; gcs.fc_debug = 0; gcs.fc_factor = 1.0; gcs.fc_limit = 16; gcs.fc_master_slave = no; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; ; gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; ; gmcast.mcast_addr = ; gmcast.mcast_ttl = 1; gmcast.peer_timeout = PT3S; gmcast.segment = 0; gmcast.time_wait = PT5S; gmcast.version = 0; ; pc.announce_timeout = PT3S; pc.checksum = false; pc.ignore_quorum = false; pc.ignore_sb = false; pc.linger = PT20S; pc.npvo = false; pc.recovery = true; pc.version = 0; pc.wait_prim = true; pc.wait_prim_timeout = PT30S; pc.weight = 1; protonet.backend = asio; protonet.version = 0; repl.causal_read_timeout = PT90S; repl.commit_order = 3; repl.key_format = FLAT8; repl.max_ws_size = 2147483647; repl.proto_max = 7; socket.checksum = 2; socket.recv_buf_size = 212992; SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME LIKE 'wsrep_%' diff --git a/mysql-test/suite/galera/r/galera_insert_ignore.result b/mysql-test/suite/galera/r/galera_insert_ignore.result index b53b5795416..b98a308efb5 100644 --- a/mysql-test/suite/galera/r/galera_insert_ignore.result +++ b/mysql-test/suite/galera/r/galera_insert_ignore.result @@ -1,5 +1,5 @@ -SET GLOBAL wsrep_sync_wait = 7; -SET GLOBAL wsrep_sync_wait = 7; +SET GLOBAL wsrep_sync_wait = 15; +SET GLOBAL wsrep_sync_wait = 15; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); INSERT IGNORE INTO t1 VALUES (1), (2); diff --git a/mysql-test/suite/galera/r/galera_many_rows.result b/mysql-test/suite/galera/r/galera_many_rows.result index a34367d6e46..e650dd6f5de 100644 --- a/mysql-test/suite/galera/r/galera_many_rows.result +++ b/mysql-test/suite/galera/r/galera_many_rows.result @@ -5,7 +5,7 @@ INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB; INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5; SET SESSION wsrep_sync_wait = 0; -SET SESSION wsrep_sync_wait = 7; +SET SESSION wsrep_sync_wait = 15; SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT1H'; SELECT COUNT(*) = 100000 FROM t1; COUNT(*) = 100000 diff --git a/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result b/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result index db4528ac22d..27768dc441a 100644 --- a/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result +++ b/mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result @@ -18,7 +18,7 @@ SELECT COUNT(*) = 0 FROM t2; COUNT(*) = 0 1 UNLOCK TABLES; -SET SESSION wsrep_sync_wait = 7;; +SET SESSION wsrep_sync_wait = 15;; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 diff --git a/mysql-test/suite/galera/r/galera_parallel_simple.result b/mysql-test/suite/galera/r/galera_parallel_simple.result index 6d023c38a57..3b10815c63d 100644 --- a/mysql-test/suite/galera/r/galera_parallel_simple.result +++ b/mysql-test/suite/galera/r/galera_parallel_simple.result @@ -16,7 +16,7 @@ INSERT INTO t1 VALUES (1); INSERT INTO t2 VALUES (1); SET SESSION wsrep_sync_wait = 0; UNLOCK TABLES; -SET SESSION wsrep_sync_wait = 7; +SET SESSION wsrep_sync_wait = 15; SELECT COUNT(*) = 10 FROM t1; COUNT(*) = 10 0 diff --git a/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result b/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result index 856abbb43be..5fe382048fb 100644 --- a/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result +++ b/mysql-test/suite/galera/r/galera_query_cache_sync_wait.result @@ -4,7 +4,6 @@ SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT1S"; SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; Warnings: Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead -SET SESSION wsrep_sync_wait = 7; SELECT MAX(id) FROM t1; MAX(id) 1 @@ -16,7 +15,6 @@ Warnings: Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; FLUSH QUERY CACHE; -SET SESSION wsrep_sync_wait = 7; SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; Warnings: Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead @@ -29,11 +27,9 @@ Warnings: Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; INSERT INTO t1 VALUES (4); -SET SESSION wsrep_sync_wait = 7; SELECT MAX(id) FROM t1; MAX(id) 4 -SET SESSION wsrep_sync_wait = 7; FLUSH STATUS; SELECT MAX(id) FROM t1; MAX(id) @@ -45,7 +41,6 @@ SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; Warnings: Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead INSERT INTO t1 VALUES (5); -SET SESSION wsrep_sync_wait = 7; SELECT MAX(id) FROM t1 ; SET GLOBAL DEBUG = ""; Warnings: diff --git a/mysql-test/suite/galera/r/galera_sync_wait_show.result b/mysql-test/suite/galera/r/galera_sync_wait_show.result index c719aaab5d8..2eac93ad665 100644 --- a/mysql-test/suite/galera/r/galera_sync_wait_show.result +++ b/mysql-test/suite/galera/r/galera_sync_wait_show.result @@ -1,4 +1,4 @@ -SET SESSION wsrep_sync_wait = 1; +SET SESSION wsrep_sync_wait = 8; CREATE DATABASE db1; SHOW CREATE DATABASE db1; Database Create Database diff --git a/mysql-test/suite/galera/r/galera_unicode_identifiers.result b/mysql-test/suite/galera/r/galera_unicode_identifiers.result index 8bea105c77e..9aee4616ec5 100644 --- a/mysql-test/suite/galera/r/galera_unicode_identifiers.result +++ b/mysql-test/suite/galera/r/galera_unicode_identifiers.result @@ -1,5 +1,5 @@ -SET GLOBAL wsrep_sync_wait = 7; -SET GLOBAL wsrep_sync_wait = 7; +SET GLOBAL wsrep_sync_wait = 15; +SET GLOBAL wsrep_sync_wait = 15; CREATE DATABASE `database with space`; USE `database with space`; CREATE TABLE `table with space` ( diff --git a/mysql-test/suite/galera/r/galera_var_sync_wait.result b/mysql-test/suite/galera/r/galera_var_sync_wait.result index f6136a4ddc4..f573c251bdd 100644 --- a/mysql-test/suite/galera/r/galera_var_sync_wait.result +++ b/mysql-test/suite/galera/r/galera_var_sync_wait.result @@ -1,8 +1,5 @@ CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB; SET GLOBAL wsrep_sync_wait = 1; -SHOW TABLES LIKE '%t1'; -Tables_in_test (%t1) -t1 SELECT COUNT(*) = 0 FROM t1; COUNT(*) = 0 1 @@ -15,7 +12,7 @@ SET GLOBAL wsrep_sync_wait = 2; UPDATE t3 SET f1 = 2; affected rows: 1 info: Rows matched: 1 Changed: 1 Warnings: 0 -SET GLOBAL wsrep_sync_wait = 7; +SET GLOBAL wsrep_sync_wait = 15; DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; diff --git a/mysql-test/suite/galera/r/mysql-wsrep#201.result b/mysql-test/suite/galera/r/mysql-wsrep#201.result index 1c0998e35ac..34d184d8ec1 100644 --- a/mysql-test/suite/galera/r/mysql-wsrep#201.result +++ b/mysql-test/suite/galera/r/mysql-wsrep#201.result @@ -1,4 +1,3 @@ CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB; INSERT INTO t1 VALUES (DEFAULT); SET GLOBAL query_cache_size=1355776; -SET SESSION wsrep_sync_wait = 7; diff --git a/mysql-test/suite/galera/t/GAL-401.test b/mysql-test/suite/galera/t/GAL-401.test index b419770f804..25ab9502bec 100644 --- a/mysql-test/suite/galera/t/GAL-401.test +++ b/mysql-test/suite/galera/t/GAL-401.test @@ -44,7 +44,7 @@ SET @@global.wsrep_desync = 0; --let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; --source include/wait_condition.inc -SET SESSION wsrep_sync_wait=7; +SET SESSION wsrep_sync_wait=15; SHOW CREATE TABLE t1; DROP TABLE t1; CALL mtr.add_suppression("WSREP: Protocol violation. JOIN message sender (.*) is not in state transfer \\(SYNCED\\). Message ignored."); diff --git a/mysql-test/suite/galera/t/galera_applier_ftwrl_table.test b/mysql-test/suite/galera/t/galera_applier_ftwrl_table.test index 6747977812b..97819384a75 100644 --- a/mysql-test/suite/galera/t/galera_applier_ftwrl_table.test +++ b/mysql-test/suite/galera/t/galera_applier_ftwrl_table.test @@ -28,7 +28,7 @@ SELECT COUNT(*) = 0 FROM t1; --connection node_1 UNLOCK TABLES; -SET SESSION wsrep_sync_wait = 7; +SET SESSION wsrep_sync_wait = 15; SELECT COUNT(*) = 2 FROM t1; DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.test b/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.test index 99c45c04ba0..67f2108d263 100644 --- a/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.test +++ b/mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.test @@ -29,7 +29,7 @@ SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system use UNLOCK TABLES; -SET SESSION wsrep_sync_wait = 7; +SET SESSION wsrep_sync_wait = 15; SHOW CREATE TABLE t1; SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'Waiting for table metadata lock'; diff --git a/mysql-test/suite/galera/t/galera_bf_abort_flush_for_export.test b/mysql-test/suite/galera/t/galera_bf_abort_flush_for_export.test index e32089ce21e..fde783e2cef 100644 --- a/mysql-test/suite/galera/t/galera_bf_abort_flush_for_export.test +++ b/mysql-test/suite/galera/t/galera_bf_abort_flush_for_export.test @@ -27,7 +27,7 @@ UNLOCK TABLES; COMMIT; SET AUTOCOMMIT=ON; -SET SESSION wsrep_sync_wait = 7; +SET SESSION wsrep_sync_wait = 15; SELECT COUNT(*) = 1 FROM t1; --let $wsrep_local_bf_aborts_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'` diff --git a/mysql-test/suite/galera/t/galera_insert_ignore.test b/mysql-test/suite/galera/t/galera_insert_ignore.test index 4b4b0a6e9fb..027f70e96d9 100644 --- a/mysql-test/suite/galera/t/galera_insert_ignore.test +++ b/mysql-test/suite/galera/t/galera_insert_ignore.test @@ -2,10 +2,10 @@ --source include/have_innodb.inc --let $wsrep_sync_wait_orig = (SELECT @@wsrep_sync_wait) -SET GLOBAL wsrep_sync_wait = 7; +SET GLOBAL wsrep_sync_wait = 15; --connection node_2 -SET GLOBAL wsrep_sync_wait = 7; +SET GLOBAL wsrep_sync_wait = 15; # diff --git a/mysql-test/suite/galera/t/galera_many_rows.test b/mysql-test/suite/galera/t/galera_many_rows.test index 653dc2dd75a..58ba85e1b9e 100644 --- a/mysql-test/suite/galera/t/galera_many_rows.test +++ b/mysql-test/suite/galera/t/galera_many_rows.test @@ -16,7 +16,7 @@ INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4 --connection node_2 SET SESSION wsrep_sync_wait = 0; --let $wsrep_provider_options_node2 = `SELECT @@wsrep_provider_options` -SET SESSION wsrep_sync_wait = 7; +SET SESSION wsrep_sync_wait = 15; SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT1H'; diff --git a/mysql-test/suite/galera/t/galera_migrate.cnf b/mysql-test/suite/galera/t/galera_migrate.cnf index 47bdf53afef..ed48f208e52 100644 --- a/mysql-test/suite/galera/t/galera_migrate.cnf +++ b/mysql-test/suite/galera/t/galera_migrate.cnf @@ -13,7 +13,7 @@ log-bin=mysqld-bin wsrep_node_address=127.0.0.1 wsrep_causal_reads=ON -wsrep_sync_wait = 7 +wsrep_sync_wait = 15 [mysqld.1] #galera_port=@OPT.port diff --git a/mysql-test/suite/galera/t/galera_parallel_simple.test b/mysql-test/suite/galera/t/galera_parallel_simple.test index e078a342c16..41cd0c8e6fa 100644 --- a/mysql-test/suite/galera/t/galera_parallel_simple.test +++ b/mysql-test/suite/galera/t/galera_parallel_simple.test @@ -45,7 +45,7 @@ SET SESSION wsrep_sync_wait = 0; UNLOCK TABLES; -SET SESSION wsrep_sync_wait = 7; +SET SESSION wsrep_sync_wait = 15; SELECT COUNT(*) = 10 FROM t1; SELECT COUNT(*) = 10 FROM t2; diff --git a/mysql-test/suite/galera/t/galera_query_cache_sync_wait.test b/mysql-test/suite/galera/t/galera_query_cache_sync_wait.test index 6b14118d5fc..87afc2d7bb2 100644 --- a/mysql-test/suite/galera/t/galera_query_cache_sync_wait.test +++ b/mysql-test/suite/galera/t/galera_query_cache_sync_wait.test @@ -10,7 +10,6 @@ INSERT INTO t1 VALUES (1); --let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options` SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT1S"; SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; -SET SESSION wsrep_sync_wait = 7; SELECT MAX(id) FROM t1; # first lookup miss # @@ -27,7 +26,6 @@ SET GLOBAL DEBUG = ""; SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; FLUSH QUERY CACHE; -SET SESSION wsrep_sync_wait = 7; SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; SET DEBUG_SYNC = "RESET"; @@ -52,9 +50,7 @@ SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb"; INSERT INTO t1 VALUES (4); --connection node_2 -SET SESSION wsrep_sync_wait = 7; SELECT MAX(id) FROM t1; -SET SESSION wsrep_sync_wait = 7; # # Query cache hit @@ -73,7 +69,6 @@ SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb"; INSERT INTO t1 VALUES (5); --connection node_2 -SET SESSION wsrep_sync_wait = 7; --send SELECT MAX(id) FROM t1 --connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 diff --git a/mysql-test/suite/galera/t/galera_sync_wait_show.test b/mysql-test/suite/galera/t/galera_sync_wait_show.test index 250b1f76e98..58de5433030 100644 --- a/mysql-test/suite/galera/t/galera_sync_wait_show.test +++ b/mysql-test/suite/galera/t/galera_sync_wait_show.test @@ -7,7 +7,8 @@ --source include/have_debug.inc --connection node_2 -SET SESSION wsrep_sync_wait = 1; +# MW-86 SHOW commands have now bitmap value 8 +SET SESSION wsrep_sync_wait = 8; --connection node_1 diff --git a/mysql-test/suite/galera/t/galera_unicode_identifiers.test b/mysql-test/suite/galera/t/galera_unicode_identifiers.test index 9adac1aa555..f3df60a6415 100644 --- a/mysql-test/suite/galera/t/galera_unicode_identifiers.test +++ b/mysql-test/suite/galera/t/galera_unicode_identifiers.test @@ -6,10 +6,10 @@ --source include/have_innodb.inc --let $wsrep_sync_wait_orig = (SELECT @@wsrep_sync_wait) -SET GLOBAL wsrep_sync_wait = 7; +SET GLOBAL wsrep_sync_wait = 15; --connection node_2 -SET GLOBAL wsrep_sync_wait = 7; +SET GLOBAL wsrep_sync_wait = 15; --connection node_1 diff --git a/mysql-test/suite/galera/t/galera_var_sync_wait.test b/mysql-test/suite/galera/t/galera_var_sync_wait.test index 935c271a4d6..046724e1635 100644 --- a/mysql-test/suite/galera/t/galera_var_sync_wait.test +++ b/mysql-test/suite/galera/t/galera_var_sync_wait.test @@ -13,7 +13,10 @@ CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB; --connection node_2 SET GLOBAL wsrep_sync_wait = 1; # Those statements should see the table -SHOW TABLES LIKE '%t1'; + +# MW-86 SHOW commands have now their own bitmask +# SHOW TABLES LIKE '%t1'; + SELECT COUNT(*) = 0 FROM t1; --connection node_1 diff --git a/mysql-test/suite/galera/t/mysql-wsrep#201.test b/mysql-test/suite/galera/t/mysql-wsrep#201.test index e9327540195..21cf05db008 100644 --- a/mysql-test/suite/galera/t/mysql-wsrep#201.test +++ b/mysql-test/suite/galera/t/mysql-wsrep#201.test @@ -8,7 +8,6 @@ INSERT INTO t1 VALUES (DEFAULT); --connection node_2 --let $qcache_size_orig = `SELECT @@GLOBAL.query_cache_size` SET GLOBAL query_cache_size=1355776; -SET SESSION wsrep_sync_wait = 7; --disable_query_log diff --git a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf index 3921e3aa362..48c7180cb51 100644 --- a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf +++ b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf @@ -9,7 +9,7 @@ wsrep-provider=@ENV.WSREP_PROVIDER wsrep_node_address=127.0.0.1 # enforce read-committed characteristics across the cluster wsrep-causal-reads=ON -wsrep-sync-wait=7 +wsrep-sync-wait=15 [mysqld.1] wsrep-cluster-address='gcomm://' diff --git a/mysql-test/suite/galera_3nodes/r/galera_var_dirty_reads2.result b/mysql-test/suite/galera_3nodes/r/galera_var_dirty_reads2.result new file mode 100644 index 00000000000..88780a2c87f --- /dev/null +++ b/mysql-test/suite/galera_3nodes/r/galera_var_dirty_reads2.result @@ -0,0 +1,48 @@ +CREATE TABLE t1 (f1 INTEGER); +INSERT INTO t1 VALUES (1); +SET GLOBAL wsrep_provider_options='gmcast.isolate=1'; +SET SESSION wsrep_sync_wait = 0; +SET SESSION wsrep_dirty_reads = 1; +SELECT f1 FROM t1; +f1 +1 +USE test; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +LOCK TABLE t1 WRITE; +UNLOCK TABLES; +FLUSH TABLES WITH READ LOCK; +UNLOCK TABLES; +PREPARE stmt_select FROM 'SELECT f1 FROM t1'; +EXECUTE stmt_select; +f1 +1 +PREPARE stmt_update FROM 'UPDATE t1 SET f1 = f1 + f1'; +SET GLOBAL wsrep_dirty_reads = 1; +SET GLOBAL wsrep_sync_wait = 0; +SET GLOBAL wsrep_dirty_reads = 0; +SET GLOBAL wsrep_sync_wait = 15; +SET SESSION wsrep_dirty_reads = 1; +INSERT INTO t1 SELECT * FROM t1; +ERROR 08S01: WSREP has not yet prepared node for application use +DELETE FROM t1; +ERROR 08S01: WSREP has not yet prepared node for application use +UPDATE t1 SET f1 = f1 + 1; +ERROR 08S01: WSREP has not yet prepared node for application use +DROP TABLE t1; +ERROR 08S01: WSREP has not yet prepared node for application use +EXECUTE stmt_update; +ERROR 08S01: WSREP has not yet prepared node for application use +SET SESSION wsrep_dirty_reads = 0; +SELECT * FROM t1; +ERROR 08S01: WSREP has not yet prepared node for application use +EXECUTE stmt_select; +ERROR 08S01: WSREP has not yet prepared node for application use +SELECT COUNT(*) > 0 FROM INFORMATION_SCHEMA.PROCESSLIST; +COUNT(*) > 0 +1 +SET GLOBAL wsrep_provider_options='gmcast.isolate=0'; +DROP TABLE t1; diff --git a/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test b/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test new file mode 100644 index 00000000000..129ba2e1f38 --- /dev/null +++ b/mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test @@ -0,0 +1,112 @@ +# +# Additional tests for wsrep_dirty_reads +# + +--source include/galera_cluster.inc +--source include/have_innodb.inc + +CREATE TABLE t1 (f1 INTEGER); +INSERT INTO t1 VALUES (1); + +--connection node_2 +SET GLOBAL wsrep_provider_options='gmcast.isolate=1'; + +--connection node_1 +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc + +--connection node_2 +SET SESSION wsrep_sync_wait = 0; + +--let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; +--source include/wait_condition.inc + +SET SESSION wsrep_dirty_reads = 1; + +# Those statements should succeed + +--error 0 +SELECT f1 FROM t1; + +--error 0 +USE test; + +--error 0 +SHOW CREATE TABLE t1; + +--error 0 +LOCK TABLE t1 WRITE; + +--error 0 +UNLOCK TABLES; + +--error 0 +FLUSH TABLES WITH READ LOCK; + +--error 0 +UNLOCK TABLES; + +--error 0 +PREPARE stmt_select FROM 'SELECT f1 FROM t1'; + +--error 0 +EXECUTE stmt_select; + +--error 0 +PREPARE stmt_update FROM 'UPDATE t1 SET f1 = f1 + f1'; + +# Mysqldump should succeed + +SET GLOBAL wsrep_dirty_reads = 1; +SET GLOBAL wsrep_sync_wait = 0; +--error 0 +--exec $MYSQL_DUMP -u root -S $NODE_MYSOCK_2 test >/dev/null +SET GLOBAL wsrep_dirty_reads = 0; +SET GLOBAL wsrep_sync_wait = 15; + +# Those statements should fail + +SET SESSION wsrep_dirty_reads = 1; + +--error ER_UNKNOWN_COM_ERROR +INSERT INTO t1 SELECT * FROM t1; + +--error ER_UNKNOWN_COM_ERROR +DELETE FROM t1; + +--error ER_UNKNOWN_COM_ERROR +UPDATE t1 SET f1 = f1 + 1; + +--error ER_UNKNOWN_COM_ERROR +DROP TABLE t1; + +--error ER_UNKNOWN_COM_ERROR +EXECUTE stmt_update; + +# With wsrep_dirty_reads = 0 , even SELECTS are not allowed + +SET SESSION wsrep_dirty_reads = 0; + +--error ER_UNKNOWN_COM_ERROR +SELECT * FROM t1; + +--error ER_UNKNOWN_COM_ERROR +EXECUTE stmt_select; + +# But reads from INFORMATION_SCHEMA are allowed + +--error 0 +SELECT COUNT(*) > 0 FROM INFORMATION_SCHEMA.PROCESSLIST; + +# Restore cluster +SET GLOBAL wsrep_provider_options='gmcast.isolate=0'; + +--connection node_1 +--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc + +--connection node_2 +--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'; +--source include/wait_condition.inc + +DROP TABLE t1; diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc index ad6b8eedf3e..dfae06b262d 100644 --- a/sql/wsrep_mysqld.cc +++ b/sql/wsrep_mysqld.cc @@ -970,9 +970,13 @@ static bool wsrep_prepare_keys_for_isolation(THD* thd, for (const TABLE_LIST* table= table_list; table; table= table->next_global) { wsrep_key_t* tmp; - tmp= (wsrep_key_t*)my_realloc(ka->keys, + if (ka->keys) + tmp= (wsrep_key_t*)my_realloc(ka->keys, (ka->keys_len + 1) * sizeof(wsrep_key_t), MYF(0)); + else + tmp= (wsrep_key_t*)my_malloc((ka->keys_len + 1) * sizeof(wsrep_key_t), MYF(0)); + if (!tmp) { WSREP_ERROR("Can't allocate memory for key_array");