Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
f20b21a2
Commit
f20b21a2
authored
Mar 08, 2017
by
Daniele Sciascia
Committed by
Jan Lindström
Aug 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MW-86 Adjust MTR tests for changes to wsrep_sync_wait
parent
7a219b6f
Changes
38
Hide whitespace changes
Inline
Side-by-side
Showing
38 changed files
with
210 additions
and
57 deletions
+210
-57
mysql-test/suite/galera/galera_2nodes.cnf
mysql-test/suite/galera/galera_2nodes.cnf
+1
-1
mysql-test/suite/galera/galera_2nodes_as_master.cnf
mysql-test/suite/galera/galera_2nodes_as_master.cnf
+2
-2
mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf
mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf
+2
-2
mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf
...suite/galera/galera_2nodes_as_master_with_repl_filter.cnf
+2
-2
mysql-test/suite/galera/galera_2nodes_as_slave.cnf
mysql-test/suite/galera/galera_2nodes_as_slave.cnf
+2
-2
mysql-test/suite/galera/galera_3nodes_as_slave.cnf
mysql-test/suite/galera/galera_3nodes_as_slave.cnf
+3
-3
mysql-test/suite/galera/galera_4nodes.cnf
mysql-test/suite/galera/galera_4nodes.cnf
+1
-1
mysql-test/suite/galera/r/GAL-401.result
mysql-test/suite/galera/r/GAL-401.result
+1
-1
mysql-test/suite/galera/r/galera_applier_ftwrl_table.result
mysql-test/suite/galera/r/galera_applier_ftwrl_table.result
+1
-1
mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result
...st/suite/galera/r/galera_applier_ftwrl_table_alter.result
+1
-1
mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result
...st/suite/galera/r/galera_bf_abort_flush_for_export.result
+1
-1
mysql-test/suite/galera/r/galera_defaults.result
mysql-test/suite/galera/r/galera_defaults.result
+1
-1
mysql-test/suite/galera/r/galera_insert_ignore.result
mysql-test/suite/galera/r/galera_insert_ignore.result
+2
-2
mysql-test/suite/galera/r/galera_many_rows.result
mysql-test/suite/galera/r/galera_many_rows.result
+1
-1
mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result
...st/suite/galera/r/galera_parallel_apply_lock_table.result
+1
-1
mysql-test/suite/galera/r/galera_parallel_simple.result
mysql-test/suite/galera/r/galera_parallel_simple.result
+1
-1
mysql-test/suite/galera/r/galera_query_cache_sync_wait.result
...l-test/suite/galera/r/galera_query_cache_sync_wait.result
+0
-5
mysql-test/suite/galera/r/galera_sync_wait_show.result
mysql-test/suite/galera/r/galera_sync_wait_show.result
+1
-1
mysql-test/suite/galera/r/galera_unicode_identifiers.result
mysql-test/suite/galera/r/galera_unicode_identifiers.result
+2
-2
mysql-test/suite/galera/r/galera_var_sync_wait.result
mysql-test/suite/galera/r/galera_var_sync_wait.result
+1
-4
mysql-test/suite/galera/r/mysql-wsrep#201.result
mysql-test/suite/galera/r/mysql-wsrep#201.result
+0
-1
mysql-test/suite/galera/t/GAL-401.test
mysql-test/suite/galera/t/GAL-401.test
+1
-1
mysql-test/suite/galera/t/galera_applier_ftwrl_table.test
mysql-test/suite/galera/t/galera_applier_ftwrl_table.test
+1
-1
mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.test
...test/suite/galera/t/galera_applier_ftwrl_table_alter.test
+1
-1
mysql-test/suite/galera/t/galera_bf_abort_flush_for_export.test
...test/suite/galera/t/galera_bf_abort_flush_for_export.test
+1
-1
mysql-test/suite/galera/t/galera_insert_ignore.test
mysql-test/suite/galera/t/galera_insert_ignore.test
+2
-2
mysql-test/suite/galera/t/galera_many_rows.test
mysql-test/suite/galera/t/galera_many_rows.test
+1
-1
mysql-test/suite/galera/t/galera_migrate.cnf
mysql-test/suite/galera/t/galera_migrate.cnf
+1
-1
mysql-test/suite/galera/t/galera_parallel_simple.test
mysql-test/suite/galera/t/galera_parallel_simple.test
+1
-1
mysql-test/suite/galera/t/galera_query_cache_sync_wait.test
mysql-test/suite/galera/t/galera_query_cache_sync_wait.test
+0
-5
mysql-test/suite/galera/t/galera_sync_wait_show.test
mysql-test/suite/galera/t/galera_sync_wait_show.test
+2
-1
mysql-test/suite/galera/t/galera_unicode_identifiers.test
mysql-test/suite/galera/t/galera_unicode_identifiers.test
+2
-2
mysql-test/suite/galera/t/galera_var_sync_wait.test
mysql-test/suite/galera/t/galera_var_sync_wait.test
+4
-1
mysql-test/suite/galera/t/mysql-wsrep#201.test
mysql-test/suite/galera/t/mysql-wsrep#201.test
+0
-1
mysql-test/suite/galera_3nodes/galera_3nodes.cnf
mysql-test/suite/galera_3nodes/galera_3nodes.cnf
+1
-1
mysql-test/suite/galera_3nodes/r/galera_var_dirty_reads2.result
...test/suite/galera_3nodes/r/galera_var_dirty_reads2.result
+48
-0
mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test
...l-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test
+112
-0
sql/wsrep_mysqld.cc
sql/wsrep_mysqld.cc
+5
-1
No files found.
mysql-test/suite/galera/galera_2nodes.cnf
View file @
f20b21a2
...
...
@@ -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
...
...
mysql-test/suite/galera/galera_2nodes_as_master.cnf
View file @
f20b21a2
...
...
@@ -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
...
...
mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf
View file @
f20b21a2
...
...
@@ -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
...
...
mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf
View file @
f20b21a2
...
...
@@ -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
...
...
mysql-test/suite/galera/galera_2nodes_as_slave.cnf
View file @
f20b21a2
...
...
@@ -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]
...
...
mysql-test/suite/galera/galera_3nodes_as_slave.cnf
View file @
f20b21a2
...
...
@@ -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]
...
...
mysql-test/suite/galera/galera_4nodes.cnf
View file @
f20b21a2
...
...
@@ -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
...
...
mysql-test/suite/galera/r/GAL-401.result
View file @
f20b21a2
...
...
@@ -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` (
...
...
mysql-test/suite/galera/r/galera_applier_ftwrl_table.result
View file @
f20b21a2
...
...
@@ -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
...
...
mysql-test/suite/galera/r/galera_applier_ftwrl_table_alter.result
View file @
f20b21a2
...
...
@@ -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` (
...
...
mysql-test/suite/galera/r/galera_bf_abort_flush_for_export.result
View file @
f20b21a2
...
...
@@ -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
...
...
mysql-test/suite/galera/r/galera_defaults.result
View file @
f20b21a2
...
...
@@ -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
<BASE_DIR>; <BASE_HOST>; <BASE_PORT>; 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_DIR>; gcache.keep_pages_size = 0; gcache.mem_size = 0; <GCACHE_NAME>; 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_HARD_LIMIT>; gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; <GMCAST_LISTEN_ADDR>; gmcast.mcast_addr = ; gmcast.mcast_ttl = 1; gmcast.peer_timeout = PT3S; gmcast.segment = 0; gmcast.time_wait = PT5S; gmcast.version = 0; <IST_RECV_ADDR>; 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_%'
...
...
mysql-test/suite/galera/r/galera_insert_ignore.result
View file @
f20b21a2
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);
...
...
mysql-test/suite/galera/r/galera_many_rows.result
View file @
f20b21a2
...
...
@@ -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
...
...
mysql-test/suite/galera/r/galera_parallel_apply_lock_table.result
View file @
f20b21a2
...
...
@@ -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
...
...
mysql-test/suite/galera/r/galera_parallel_simple.result
View file @
f20b21a2
...
...
@@ -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
...
...
mysql-test/suite/galera/r/galera_query_cache_sync_wait.result
View file @
f20b21a2
...
...
@@ -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:
...
...
mysql-test/suite/galera/r/galera_sync_wait_show.result
View file @
f20b21a2
SET SESSION wsrep_sync_wait =
1
;
SET SESSION wsrep_sync_wait =
8
;
CREATE DATABASE db1;
SHOW CREATE DATABASE db1;
Database Create Database
...
...
mysql-test/suite/galera/r/galera_unicode_identifiers.result
View file @
f20b21a2
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` (
...
...
mysql-test/suite/galera/r/galera_var_sync_wait.result
View file @
f20b21a2
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;
mysql-test/suite/galera/r/mysql-wsrep#201.result
View file @
f20b21a2
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;
mysql-test/suite/galera/t/GAL-401.test
View file @
f20b21a2
...
...
@@ -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."
);
...
...
mysql-test/suite/galera/t/galera_applier_ftwrl_table.test
View file @
f20b21a2
...
...
@@ -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
;
mysql-test/suite/galera/t/galera_applier_ftwrl_table_alter.test
View file @
f20b21a2
...
...
@@ -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'
;
...
...
mysql-test/suite/galera/t/galera_bf_abort_flush_for_export.test
View file @
f20b21a2
...
...
@@ -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'`
...
...
mysql-test/suite/galera/t/galera_insert_ignore.test
View file @
f20b21a2
...
...
@@ -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
;
#
...
...
mysql-test/suite/galera/t/galera_many_rows.test
View file @
f20b21a2
...
...
@@ -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'
;
...
...
mysql-test/suite/galera/t/galera_migrate.cnf
View file @
f20b21a2
...
...
@@ -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
...
...
mysql-test/suite/galera/t/galera_parallel_simple.test
View file @
f20b21a2
...
...
@@ -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
;
...
...
mysql-test/suite/galera/t/galera_query_cache_sync_wait.test
View file @
f20b21a2
...
...
@@ -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
...
...
mysql-test/suite/galera/t/galera_sync_wait_show.test
View file @
f20b21a2
...
...
@@ -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
...
...
mysql-test/suite/galera/t/galera_unicode_identifiers.test
View file @
f20b21a2
...
...
@@ -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
...
...
mysql-test/suite/galera/t/galera_var_sync_wait.test
View file @
f20b21a2
...
...
@@ -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
...
...
mysql-test/suite/galera/t/mysql-wsrep#201.test
View file @
f20b21a2
...
...
@@ -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
...
...
mysql-test/suite/galera_3nodes/galera_3nodes.cnf
View file @
f20b21a2
...
...
@@ -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://'
...
...
mysql-test/suite/galera_3nodes/r/galera_var_dirty_reads2.result
0 → 100644
View file @
f20b21a2
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;
mysql-test/suite/galera_3nodes/t/galera_var_dirty_reads2.test
0 → 100644
View file @
f20b21a2
#
# 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
;
sql/wsrep_mysqld.cc
View file @
f20b21a2
...
...
@@ -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"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment