Merge remote-tracking branch 'origin/10.0-galera' into 10.1

This commit is contained in:
Jan Lindström 2017-08-21 13:35:00 +03:00
commit c23efc7d50
142 changed files with 2590 additions and 792 deletions

View File

@ -26,7 +26,7 @@ ENDIF()
OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" ${with_wsrep_default})
# Set the patch version
SET(WSREP_PATCH_VERSION "19")
SET(WSREP_PATCH_VERSION "20")
# Obtain wsrep API version
FILE(STRINGS "${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h" WSREP_API_VERSION

View File

@ -45,6 +45,10 @@
#define WSREP_WARN(...) WSREP_LOG(sql_print_warning, ##__VA_ARGS__)
#define WSREP_ERROR(...) WSREP_LOG(sql_print_error, ##__VA_ARGS__)
#define WSREP_SYNC_WAIT(thd_, before_) \
{ if (WSREP_CLIENT(thd_) && \
wsrep_sync_wait(thd_, before_)) goto error; }
#else
#define IF_WSREP(A,B) B
#define DBUG_ASSERT_IF_WSREP(A)
@ -55,6 +59,8 @@
#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_)
#define WSREP_TO_ISOLATION_END
#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_)
#endif
#define WSREP_SYNC_WAIT(thd_, before_)
#endif /* WSERP_INCLUDED */
#endif /* WITH_WSREP */
#endif /* WSREP_INCLUDED */

View File

@ -8,3 +8,5 @@
--let $galera_cluster_size = 2
--source include/galera_init.inc
--source include/have_innodb.inc

View File

@ -50,6 +50,9 @@ if (!$restart_parameters)
# Call script that will poll the server waiting for it to be back online again
--source include/wait_until_connected_again.inc
# Wait for wsrep
--source include/wait_wsrep_ready.inc
# Turn off reconnect again
--disable_reconnect

View File

@ -16,6 +16,9 @@ if (!$restart_parameters)
# Call script that will poll the server waiting for it to be back online again
--source include/wait_until_connected_again.inc
# Wait for wsrep
--source include/wait_wsrep_ready.inc
# Turn off reconnect again
--disable_reconnect

View File

@ -0,0 +1,15 @@
#
# If the wsrep plugin is loaded, wait until the wsrep provider becomes
# ready for use.
#
--disable_query_log
--disable_result_log
if (`SELECT COUNT(*)=1 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'wsrep' AND PLUGIN_STATUS='ACTIVE'`)
{
--source include/galera_wait_ready.inc
}
--enable_query_log
--enable_result_log

View File

@ -1,58 +1,51 @@
galera_wsrep_provider_unset_set : lp1379204 'Unsupported protocol downgrade: incremental data collection disabled. Expect abort.'
galera_kill_nochanges : mysql-wsrep#24 Galera server does not restart properly if killed
galera_bf_abort_for_update : mysql-wsrep#26 SELECT FOR UPDATE sometimes allowed to proceed in the face of a concurrent update
galera_toi_ddl_fk_insert : qa#39 galera_toi_ddl_fk_insert fails sporadically
galera_binlog_row_image : MDEV-7471 - Enable binlog_row_image parameter in MariaDB
galera_binlog_rows_query_log_events : Unknown system variable 'binlog_rows_query_log_events' (see annotate_rows_log_event)
galera_ist_mysqldump : Lost connection to MySQL server during query
galera_ist_xtrabackup-v2 : mysqltest failed but provided no output
galera_ist_innodb_flush_logs : mysqltest failed but provided no output
galera_sst_mysqldump : query 'show status' failed with wrong errno 1927
galera_as_master_gtid : Needs to be re-worked
galera_as_master_gtid_change_master : Needs to be re-worked
galera_migrate : query 'let $success= `$wait_condition`' failed: 1146
galera_var_notify_cmd : Result content mismatch
query_cache : Fails intermittently due to content mismatch. Needs to be investigated
basic : Fails intermittently without providing any output. Needs to be investigated
galera_var_auto_inc_control_on : Failing sporadically with content mismatch
galera_parallel_simple : Failing sporadically
galera_bf_abort : Failing sporadically
galera_log_output_csv : Failing sporadically
galera_as_slave_preordered : wsrep-preordered is not available in MariaDB Galera cluster
galera_gra_log : TODO: investigate
galera_as_slave_replication_bundle : TODO: investigate
galera_ssl_upgrade : TODO: investigate
mysql-wsrep#90 : TODO: investigate
galera_flush : mysql-wsrep/issues/229
galera_transaction_read_only : mysql-wsrep/issues/229
galera_gcs_fragment : Incorrect arguments to SET
galera_flush_local : Fails sporadically
galera_binlog_stmt_autoinc : TODO: investigate
galera_concurrent_ctas : Test times out, investigate
MW-286 : TODO: investigate
galera_sst_xtrabackup-v2-options : TODO: Fix test case
galera_sst_xtrabackup-v2 : TODO: Fix test case
galera_sst_xtrabackup-v2_encrypt_with_key : TODO: Fix test case
mysql-wsrep#33 : TODO: investigate
MW-258 : MDEV-11229
galera_as_master : MDEV-11229
MW-44 : MDEV-11229
galera_gcs_fc_limit : MDEV-11229
galera_roles : MDEV-11229
galera_lock_table : MDEV-11229
GAL-480 : Investigate
galera_fk_no_pk :Investigate
galera_account_management : Investigate
galera.galera_var_retry_autocommit : MDEV-12319 #Sparodic Faliure
galera.galera_gcs_fc_limit : MDEV-12319 #Sparodic Faliure
galera.galera_toi_ddl_nonconflicting : MDEV-12319 #Sparodic Faliure
galera.mysql-wsrep#198 : MDEV-12319 #Sparodic Faliure
galera.galera_pc_ignore_sb : MDEV-12319 #Sparodic Faliure
galera.MW-329 : MDEV-12319 #Sparodic Faliure
galera.galera_ist_recv_bind : MDEV-12319 #Failed to start mysqld
galera.galera_ist_restart_joiner : MDEV-12319 #Failed to start mysqld
galera.galera_ssl_compression : MDEV-12319 #Failed to start mysqld
galera.galera_wan : MDEV-12319 #Failed to start mysqld
galera.rpl_row_annotate : MDEV-12319 #Failed to start mysqld
galera_restart_on_unknown_option : Solve
##############################################################################
#
# List the test cases that are to be disabled temporarily.
#
# Separate the test case name and the comment with ':'.
#
# <testcasename> : MDEV-<xxxx> <comment>
#
# Do not use any TAB characters for whitespace.
#
##############################################################################
MW-336 : MDEV-13549 Galera test failures
galera_gra_log : MDEV-13549 Galera test failures
galera_flush_local : MDEV-13549 Galera test failures
galera_flush : MDEV-13549 Galera test failures
MW-329 : MDEV-13549 Galera test failures
galera_account_management : MariaDB 10.0 does not support ALTER USER
galera_binlog_row_image : MariaDB 10.0 does not support binlog_row_image
galera_binlog_rows_query_log_events: MariaDB does not support binlog_rows_query_log_events
GAL-419 : MDEV-13549 Galera test failures
galera_toi_ddl_fk_insert : MDEV-13549 Galera test failures
galera_var_notify_cmd : MDEV-13549 Galera test failures
galera_var_slave_threads : MDEV-13549 Galera test failures
mysql-wsrep#90 : MDEV-13549 Galera test failures
galera_as_master_gtid : Requires MySQL GTID
galera_as_master_gtid_change_master : Requires MySQL GTID
galera_as_slave_replication_bundle : MDEV-13549 Galera test failures
galera_as_slave_preordered : wsrep-preordered feature not merged to MariaDB
galera_gcs_fragment : MDEV-13549 Galera test failures
galera_gcache_recover : MDEV-13549 Galera test failures
galera_gcache_recover_full_gcache : MDEV-13549 Galera test failures
galera_gcache_recover_manytrx : MDEV-13549 Galera test failures
galera_ist_mysqldump : MDEV-13549 Galera test failures
mysql-wsrep#31 : MDEV-13549 Galera test failures
galera_migrate : MariaDB 10.0 does not support START SLAVE USER
galera_concurrent_ctas : MDEV-13549 Galera test failures
galera_bf_abort_for_update : MDEV-13549 Galera test failures
galera_wsrep_desync_wsrep_on : MDEV-13549 Galera test failures
galera_ssl_upgrade : MDEV-13549 Galera test failures
mysql-wsrep#33 : MDEV-13549 Galera test failures
galera_var_auto_inc_control_on : MDEV-13549 Galera test failures
MW-44 : MDEV-13549 Galera test failures
galera_var_retry_autocommit : MDEV-13549 Galera test failures
pxc-421 : MDEV-13549 Galera test failures
lp1376747-2 : MDEV-13549 Galera test failures
lp1376747 : MDEV-13549 Galera test failures
galera_toi_ddl_nonconflicting : MDEV-13549 Galera test failures
galera_parallel_simple : MDEV-13549 Galera test failures
galera_admin : MDEV-13549 Galera test failures
galera_var_max_ws_rows : MDEV-13549 Galera test failures 10.1
MW-286 : MDEV-13549 Galera test failures 10.1

View File

@ -9,7 +9,7 @@ default-storage-engine=innodb
wsrep-provider=@ENV.WSREP_PROVIDER
wsrep_node_address=127.0.0.1
# enforce read-committed characteristics across the cluster
wsrep-sync-wait=7
wsrep-sync-wait=15
[mysqld.1]
#galera_port=@OPT.port
@ -29,7 +29,7 @@ wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#gale
# 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

View File

@ -29,7 +29,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
@ -48,7 +48,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

View File

@ -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

View File

@ -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

View File

@ -33,7 +33,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]
@ -57,7 +57,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]

View File

@ -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]

View File

@ -10,7 +10,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

View File

@ -1,13 +1,16 @@
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
SET @@global.wsrep_desync = 1;
SET SESSION wsrep_dirty_reads=1;
SET SESSION wsrep_sync_wait=0;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
SET wsrep_dirty_reads=0;
SHOW STATUS LIKE 'wsrep_desync_count';
Variable_name Value
wsrep_desync_count 0
SET @@global.wsrep_desync = 0;
SET SESSION wsrep_sync_wait=15;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (

View File

@ -9,7 +9,7 @@ SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
include/wait_for_slave_to_start.inc
INSERT INTO t1 VALUES (1);
DROP TABLE t1;
SET global wsrep_sync_wait=7;
SET global wsrep_sync_wait=15;
STOP SLAVE;
RESET SLAVE ALL;
CALL mtr.add_suppression('failed registering on master');

View File

@ -18,3 +18,4 @@ VARIABLE_VALUE > 0
1
DROP PROCEDURE proc_insert;
DROP TABLE t1;
CALL mtr.add_suppression("conflict state 3 after post commit");

View File

@ -0,0 +1,42 @@
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
SET GLOBAL wsrep_slave_threads = 10;
SET GLOBAL wsrep_slave_threads = 1;
INSERT INTO t1 VALUES (1);
SET GLOBAL wsrep_slave_threads = 10;
SELECT COUNT(*) = 11 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
COUNT(*) = 11
1
SET GLOBAL wsrep_slave_threads = 20;
SELECT COUNT(*) = 21 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
COUNT(*) = 21
1
SET GLOBAL wsrep_slave_threads = 1;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (5);
INSERT INTO t1 VALUES (6);
INSERT INTO t1 VALUES (7);
INSERT INTO t1 VALUES (8);
INSERT INTO t1 VALUES (9);
SET GLOBAL wsrep_slave_threads = 10;
SET GLOBAL wsrep_slave_threads = 0;
Warnings:
Warning 1292 Truncated incorrect wsrep_slave_threads value: '0'
INSERT INTO t1 VALUES (10);
INSERT INTO t1 VALUES (11);
INSERT INTO t1 VALUES (12);
INSERT INTO t1 VALUES (13);
INSERT INTO t1 VALUES (14);
INSERT INTO t1 VALUES (15);
INSERT INTO t1 VALUES (16);
INSERT INTO t1 VALUES (17);
INSERT INTO t1 VALUES (18);
INSERT INTO t1 VALUES (19);
INSERT INTO t1 VALUES (20);
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
COUNT(*) = 2
1
SET GLOBAL wsrep_slave_threads = 1;
DROP TABLE t1;

View File

@ -0,0 +1,6 @@
SET GLOBAL wsrep_slave_threads = 0;
Warnings:
Warning 1292 Truncated incorrect wsrep_slave_threads value: '0'
CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB;
INSERT INTO t1 VALUES (1);
DROP TABLE t1;

View File

@ -0,0 +1,48 @@
SELECT @@debug_sync;
@@debug_sync
ON - current signal: ''
SET SESSION wsrep_sync_wait = 1;
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
CREATE TABLE t_wait1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t_wait1 VALUES (1);
SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
SHOW BINARY LOGS;
SHOW BINLOG EVENTS;
SHOW COLUMNS FROM t1;
SHOW CREATE EVENT e1;
SHOW CREATE FUNCTION f1;
SHOW CREATE PROCEDURE p1;
SHOW CREATE TABLE t1;
SHOW CREATE TRIGGER tr1;
SHOW CREATE VIEW v1;
SHOW DATABASES;
SHOW ENGINE InnoDB STATUS;
SHOW FUNCTION CODE f1;
SHOW FUNCTION STATUS;
SHOW GRANTS FOR 'root'@'localhost';
SHOW INDEX FROM t1;
SHOW OPEN TABLES;
SHOW PROCEDURE CODE p1;
SHOW PROCEDURE STATUS;
SHOW PRIVILEGES;
SHOW STATUS LIKE 'wsrep_cluster_size';
SHOW TABLE STATUS;
SHOW TABLES;
SHOW TRIGGERS;
SHOW GLOBAL VARIABLES LIKE 'foo_bar';
SHOW WARNINGS;
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 debug_sync = "now SIGNAL signal.wsrep_apply_cb";
SET SESSION wsrep_sync_wait = default;
DROP TABLE t_wait1;
SET GLOBAL debug = NULL;
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
SET debug_sync='RESET';
SELECT @@debug_sync;
@@debug_sync
ON - current signal: ''

View File

@ -0,0 +1,50 @@
SELECT @@debug_sync;
@@debug_sync
ON - current signal: ''
SET SESSION wsrep_sync_wait = 8;
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
CREATE TABLE t_wait8 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t_wait8 VALUES (1);
SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S";
SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
SHOW BINARY LOGS;
SHOW BINLOG EVENTS;
SHOW COLUMNS FROM t1;
SHOW CREATE DATABASE db1;
SHOW CREATE EVENT e1;
SHOW CREATE FUNCTION f1;
SHOW CREATE PROCEDURE p1;
SHOW CREATE TABLE t1;
SHOW CREATE TRIGGER tr1;
SHOW CREATE VIEW v1;
SHOW DATABASES;
SHOW ENGINE InnoDB STATUS;
SHOW FUNCTION CODE f1;
SHOW FUNCTION STATUS;
SHOW GRANTS FOR 'root'@'localhost';
SHOW INDEX FROM t1;
SHOW OPEN TABLES;
SHOW PROCEDURE CODE p1;
SHOW PROCEDURE STATUS;
SHOW PRIVILEGES;
SHOW STATUS LIKE 'wsrep_cluster_size';
SHOW TABLE STATUS;
SHOW TABLES;
SHOW TRIGGERS;
SHOW GLOBAL VARIABLES LIKE 'foo_bar';
SHOW WARNINGS;
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 DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
SET SESSION wsrep_sync_wait = default;
DROP TABLE t_wait8;
SET GLOBAL debug = NULL;
Warnings:
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
SET debug_sync='RESET';
SELECT @@debug_sync;
@@debug_sync
ON - current signal: ''

View File

@ -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

View File

@ -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` (

View File

@ -35,11 +35,9 @@ i c
show variables like 'binlog_format';
Variable_name Value
binlog_format STATEMENT
show variables like '%auto_increment%';
show variables like 'auto_increment_increment';
Variable_name Value
auto_increment_increment 7
auto_increment_offset 5
wsrep_auto_increment_control ON
select * from t1;
i c
1 dummy_text

View File

@ -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

View File

@ -0,0 +1,80 @@
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`f1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
`f1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB; CREATE TABLE t4 (f1 INTEGER) ENGINE=InnoDB;;
SHOW CREATE TABLE t3;
Table Create Table
t3 CREATE TABLE `t3` (
`f1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SHOW CREATE TABLE t4;
Table Create Table
t4 CREATE TABLE `t4` (
`f1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SHOW CREATE TABLE t3;
Table Create Table
t3 CREATE TABLE `t3` (
`f1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SHOW CREATE TABLE t4;
Table Create Table
t4 CREATE TABLE `t4` (
`f1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (1);
CREATE TABLE t5 (f1 INTEGER) ENGINE=InnoDB;
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
SHOW CREATE TABLE t5;
Table Create Table
t5 CREATE TABLE `t5` (
`f1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
SHOW CREATE TABLE t5;
Table Create Table
t5 CREATE TABLE `t5` (
`f1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
CREATE TABLE t6 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t2 VALUES (1);;
SELECT COUNT(*) = 1 FROM t2;
COUNT(*) = 1
1
SHOW CREATE TABLE t6;
Table Create Table
t6 CREATE TABLE `t6` (
`f1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT COUNT(*) = 1 FROM t2;
COUNT(*) = 1
1
SHOW CREATE TABLE t6;
Table Create Table
t6 CREATE TABLE `t6` (
`f1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
include/diff_servers.inc [servers=1 2]
DROP TABLE t1, t2, t3, t4, t5, t6;

View File

@ -50,7 +50,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_%'

View File

@ -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);

View File

@ -0,0 +1,19 @@
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
SET SESSION wsrep_on = OFF;
SET SESSION wsrep_on = ON;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (5);
INSERT INTO t1 VALUES (6);
INSERT INTO t1 VALUES (7);
INSERT INTO t1 VALUES (8);
INSERT INTO t1 VALUES (9);
INSERT INTO t1 VALUES (10);
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
include/assert_grep.inc [Receiving IST: 11 writesets, seqnos]
include/assert_grep.inc [Receiving IST\.\.\. 0\.0% \( 0/11 events\) complete]
include/assert_grep.inc [Receiving IST\.\.\.100\.0% \(11/11 events\) complete]
DROP TABLE t1;

View File

@ -4,16 +4,11 @@ Unloading wsrep provider ...
SET GLOBAL wsrep_provider = 'none';
UPDATE t1 SET f2 = 'b' WHERE f1 > 1;
UPDATE t1 SET f2 = 'c' WHERE f1 > 2;
SET GLOBAL wsrep_provider_options = 'dbug=d,recv_IST_after_apply_trx';
SET SESSION wsrep_sync_wait = 0;
Loading wsrep_provider ...
SHOW STATUS LIKE 'wsrep_debug_sync_waiters';
Variable_name Value
wsrep_debug_sync_waiters recv_IST_after_apply_trx
SET SESSION wsrep_on=OFF;
SET SESSION wsrep_on=ON;
UPDATE t1 SET f2 = 'd' WHERE f1 > 3;
CREATE TABLE t2 (f1 INTEGER);
UPDATE t1 SET f2 = 'e' WHERE f1 > 4;
CREATE TABLE t3 (f1 INTEGER);
Performing --wsrep-recover ...
Starting server ...
Using --wsrep-start-position when starting mysqld ...
@ -34,10 +29,4 @@ f1 f2
4 d
5 e
6 f
SELECT COUNT(*) = 0 FROM t2;
COUNT(*) = 0
1
SELECT COUNT(*) = 0 FROM t3;
COUNT(*) = 0
1
DROP TABLE t1, t2, t3;
DROP TABLE t1;

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -3,8 +3,11 @@ Suspending node_2 ...
INSERT INTO t1 VALUES (1);
Got one of the listed errors
Resuming node_2 ...
SET SESSION wsrep_sync_wait = 1;
INSERT INTO t1 VALUES (1);
SET SESSION wsrep_sync_wait = 1;
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
SET SESSION wsrep_sync_wait = 15;
DROP TABLE t1;

View File

@ -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

View File

@ -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` (

View File

@ -3,10 +3,6 @@ INSERT INTO t1 VALUES(1);
SELECT * FROM t1;
i
1
create user user1;
grant all privileges on *.* to user1;
create user user2;
grant all privileges on *.* to user2;
SET @@global.wsrep_cluster_address = '';
SET @@session.wsrep_dirty_reads=OFF;
SET SESSION wsrep_sync_wait=0;
@ -18,87 +14,33 @@ Variable_name Value
wsrep_cluster_status non-Primary
SELECT * FROM t1;
ERROR 08S01: WSREP has not yet prepared node for application use
SELECT @@wsrep_dirty_reads;
@@wsrep_dirty_reads
0
SELECT 2;
2
2
SELECT 2+2 FROM DUAL;
2+2
4
SELECT 1 FROM t1;
ERROR 08S01: WSREP has not yet prepared node for application use
SET @@session.wsrep_dirty_reads=ON;
SELECT * FROM t1;
i
1
connect con1, localhost, user1,,test,$NODE_MYPORT_2,$NODE_MYSOCK_2;
SET SESSION wsrep_sync_wait=0;
set session wsrep_dirty_reads=1;
prepare stmt_show from 'select 1';
prepare stmt_select from 'select * from t1';
prepare stmt_insert from 'insert into t1 values(1)';
set session wsrep_dirty_reads=0;
execute stmt_show;
SELECT 1 FROM t1;
1
1
SELECT i, variable_name, variable_value FROM t1, information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads" AND i = 1;
i variable_name variable_value
1 WSREP_DIRTY_READS ON
SET @@session.wsrep_dirty_reads=OFF;
SELECT i, variable_name, variable_value FROM t1, information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads" AND i = 1;
ERROR 08S01: WSREP has not yet prepared node for application use
execute stmt_select;
SELECT 1;
1
1
USE information_schema;
ERROR 08S01: WSREP has not yet prepared node for application use
execute stmt_insert;
SELECT * FROM information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads";
ERROR 08S01: WSREP has not yet prepared node for application use
SET wsrep_dirty_reads=ON;
select @@session.wsrep_dirty_reads;
@@session.wsrep_dirty_reads
1
execute stmt_show;
1
1
execute stmt_select;
i
1
execute stmt_insert;
SELECT COUNT(*) >= 10 FROM performance_schema.events_statements_history;
ERROR 08S01: WSREP has not yet prepared node for application use
SET @@global.wsrep_dirty_reads=ON;
connect con2, localhost, user2,,test,$NODE_MYPORT_2,$NODE_MYSOCK_2;
select @@session.wsrep_dirty_reads;
@@session.wsrep_dirty_reads
1
prepare stmt_show from 'select 1';
prepare stmt_select from 'select * from t1';
prepare stmt_insert from 'insert into t1 values(1)';
execute stmt_show;
1
1
execute stmt_select;
i
1
execute stmt_insert;
ERROR 08S01: WSREP has not yet prepared node for application use
SET SESSION wsrep_sync_wait=1;
execute stmt_show;
1
1
execute stmt_select;
i
1
execute stmt_insert;
ERROR 08S01: WSREP has not yet prepared node for application use
SET SESSION wsrep_sync_wait=7;
execute stmt_show;
1
1
execute stmt_select;
i
1
execute stmt_insert;
ERROR 08S01: WSREP has not yet prepared node for application use
connection node_2;
SET @@global.wsrep_dirty_reads=OFF;
connection node_1;
USE test;
SELECT * FROM t1;
i
1
DROP TABLE t1;
drop user user1;
drop user user2;
disconnect node_2;
disconnect node_1;
# End of test

View File

@ -1,4 +1,5 @@
call mtr.add_suppression("WSREP: Stray state UUID msg: .* current group state WAIT_STATE_UUID .*");
call mtr.add_suppression("WSREP: Protocol violation. JOIN message sender .* is not in state transfer (.*). Message ignored.");
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 4
1

View File

@ -3,15 +3,12 @@
#
SELECT @@global.wsrep_sync_wait;
@@global.wsrep_sync_wait
7
15
SELECT @@global.wsrep_causal_reads;
@@global.wsrep_causal_reads
1
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
@ -24,7 +21,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;

View File

@ -3,6 +3,7 @@ INSERT INTO t1 VALUES (1);
SET GLOBAL wsrep_provider='none';
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
SET SESSION wsrep_sync_wait = 0;
INSERT INTO t1 VALUES (4);
SELECT COUNT(*) = 4 FROM t1;
COUNT(*) = 4

View File

@ -1,5 +1,8 @@
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB;
SELECT 1 FROM DUAL;
1
1
LOCK TABLE t2 WRITE;
OPTIMIZE TABLE t1,t2;;
REPAIR TABLE t1,t2;;

View File

@ -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;

View File

@ -6,6 +6,7 @@ set GLOBAL wsrep_slave_threads=16;
SET GLOBAL wsrep_provider='none';
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
set SESSION wsrep_sync_wait=0;
INSERT INTO t1 VALUES (4);
set GLOBAL wsrep_slave_threads=5;
SELECT COUNT(*) = 5 FROM t1;
@ -25,6 +26,7 @@ SET GLOBAL wsrep_slave_threads = 1;
SELECT COUNT(*) FROM t1;
COUNT(*)
16
SET GLOBAL auto_increment_offset = 2;
SELECT COUNT(*) FROM t1;
COUNT(*)
15
@ -33,3 +35,4 @@ Variable_name Value
wsrep_slave_threads 12
SET GLOBAL wsrep_slave_threads = 1;
DROP TABLE t1;
SET GLOBAL auto_increment_offset = 1;

View File

@ -19,6 +19,9 @@ $ENV{WSREP_PROVIDER} = $provider;
my ($spath) = grep { -f "$_/wsrep_sst_rsync"; } "$::bindir/scripts", $::path_client_bindir;
return "No SST scripts" unless $spath;
my ($cpath) = grep { -f "$_/mysql"; } "$::bindir/scripts", $::path_client_bindir;
return "No scritps" unless $cpath;
my ($epath) = grep { -f "$_/my_print_defaults"; } "$::bindir/extra", $::path_client_bindir;
return "No my_print_defaults" unless $epath;
@ -65,13 +68,18 @@ push @::global_suppressions,
qr(WSREP: TO isolation failed for: .*),
qr|WSREP: gcs_caused\(\) returned .*|,
qr|WSREP: Protocol violation. JOIN message sender .* is not in state transfer \(SYNCED\). Message ignored.|,
qr|WSREP: Protocol violation. JOIN message sender .* is not in state transfer \(JOINED\). Message ignored.|,
qr|WSREP: Unsupported protocol downgrade: incremental data collection disabled. Expect abort.|,
qr(WSREP: Action message in non-primary configuration from member [0-9]*),
qr(WSREP: discarding established .*),
qr(WSREP: gcs\/src\/gcs_core.cpp:core_handle_uuid_msg\(\):.*),
qr(WSREP: --wsrep-causal-reads=ON takes precedence over --wsrep-sync-wait=0. WSREP_SYNC_WAIT_BEFORE_READ is on),
);
$ENV{PATH}="$epath:$ENV{PATH}";
$ENV{PATH}="$spath:$ENV{PATH}" unless $epath eq $spath;
$ENV{PATH}="$cpath:$ENV{PATH}" unless $cpath eq $spath;
bless { };

View File

@ -10,6 +10,7 @@ SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
--connection node_2
SET @@global.wsrep_desync = 1;
SET SESSION wsrep_dirty_reads=1;
SET SESSION wsrep_sync_wait=0;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
--let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--source include/wait_condition.inc
@ -27,10 +28,13 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
# Reconnect node 2 to the PC:
--connection node_2
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
SET wsrep_dirty_reads=0;
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--source include/wait_condition.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
--source include/wait_condition.inc
# Must return 0:
SHOW STATUS LIKE 'wsrep_desync_count';
@ -41,6 +45,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=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.");

View File

@ -25,6 +25,7 @@ SET wsrep_on = FALSE;
--error ER_QUERY_INTERRUPTED
ALTER TABLE t1 ADD PRIMARY KEY (f1);
SET SESSION wsrep_sync_wait = 0;
SET wsrep_on = TRUE;
SET GLOBAL wsrep_desync = FALSE;

View File

@ -80,3 +80,6 @@ SELECT VARIABLE_VALUE > 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N
--connection node_1
DROP PROCEDURE proc_insert;
DROP TABLE t1;
# Due to MW-330, Multiple "conflict state 3 after post commit" warnings if table is dropped while SP is running
CALL mtr.add_suppression("conflict state 3 after post commit");

View File

@ -0,0 +1,64 @@
#
# MW-336 Slave threads may leak if variable wsrep_slave_threads is set repeatedly
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
--connection node_1
SET GLOBAL wsrep_slave_threads = 10;
SET GLOBAL wsrep_slave_threads = 1;
--connection node_2
INSERT INTO t1 VALUES (1);
--connection node_1
--sleep 0.5
SET GLOBAL wsrep_slave_threads = 10;
--sleep 0.5
SELECT COUNT(*) = 11 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
SET GLOBAL wsrep_slave_threads = 20;
--sleep 0.5
SELECT COUNT(*) = 21 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
SET GLOBAL wsrep_slave_threads = 1;
--connection node_2
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (5);
INSERT INTO t1 VALUES (6);
INSERT INTO t1 VALUES (7);
INSERT INTO t1 VALUES (8);
INSERT INTO t1 VALUES (9);
--connection node_1
SET GLOBAL wsrep_slave_threads = 10;
SET GLOBAL wsrep_slave_threads = 0;
--connection node_2
INSERT INTO t1 VALUES (10);
INSERT INTO t1 VALUES (11);
INSERT INTO t1 VALUES (12);
INSERT INTO t1 VALUES (13);
INSERT INTO t1 VALUES (14);
INSERT INTO t1 VALUES (15);
INSERT INTO t1 VALUES (16);
INSERT INTO t1 VALUES (17);
INSERT INTO t1 VALUES (18);
INSERT INTO t1 VALUES (19);
INSERT INTO t1 VALUES (20);
--connection node_1
--sleep 0.5
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user';
SET GLOBAL wsrep_slave_threads = 1;
DROP TABLE t1;

View File

@ -0,0 +1,13 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--connection node_2
SET GLOBAL wsrep_slave_threads = 0;
--connection node_1
CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB;
--connection node_1
INSERT INTO t1 VALUES (1);
DROP TABLE t1;

View File

@ -244,4 +244,3 @@ SELECT * FROM c;
DROP TABLE c;
DROP TABLE p;
--sleep 3

View File

@ -0,0 +1 @@
--log-bin --log-slave-updates

View File

@ -0,0 +1,106 @@
#
# SHOW commands no longer obey wsrep_sync_wait = 1 (WSREP_SYNC_WAIT_BEFORE_READ)
# (they do not wait for the background INSERT in the applier in node_2 to
# complete)
#
--source include/galera_cluster.inc
--source include/have_binlog_format_row.inc
--source include/have_debug_sync.inc
--connection node_2
# Make sure no signals have been leftover from previous tests to surprise us.
SELECT @@debug_sync;
SET SESSION wsrep_sync_wait = 1;
SET GLOBAL debug = "+d,sync.wsrep_apply_cb";
--connection node_1
CREATE TABLE t_wait1 (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_wait1 VALUES (1);
--connection node_2
SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
--disable_result_log
SHOW BINARY LOGS;
SHOW BINLOG EVENTS;
--error ER_NO_SUCH_TABLE
SHOW COLUMNS FROM t1;
--error ER_EVENT_DOES_NOT_EXIST
SHOW CREATE EVENT e1;
--error ER_SP_DOES_NOT_EXIST
SHOW CREATE FUNCTION f1;
--error ER_SP_DOES_NOT_EXIST
SHOW CREATE PROCEDURE p1;
--error ER_NO_SUCH_TABLE
SHOW CREATE TABLE t1;
--error ER_TRG_DOES_NOT_EXIST
SHOW CREATE TRIGGER tr1;
--error ER_NO_SUCH_TABLE
SHOW CREATE VIEW v1;
SHOW DATABASES;
SHOW ENGINE InnoDB STATUS;
--error ER_SP_DOES_NOT_EXIST
SHOW FUNCTION CODE f1;
SHOW FUNCTION STATUS;
SHOW GRANTS FOR 'root'@'localhost';
--error ER_NO_SUCH_TABLE
SHOW INDEX FROM t1;
SHOW OPEN TABLES;
--error ER_SP_DOES_NOT_EXIST
SHOW PROCEDURE CODE p1;
SHOW PROCEDURE STATUS;
SHOW PRIVILEGES;
SHOW STATUS LIKE 'wsrep_cluster_size';
SHOW TABLE STATUS;
SHOW TABLES;
SHOW TRIGGERS;
SHOW GLOBAL VARIABLES LIKE 'foo_bar';
--error 0
SHOW WARNINGS;
--enable_result_log
# Unblock the background INSERT and remove the sync point.
SET GLOBAL debug = "-d,sync.wsrep_apply_cb";
SET SESSION 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_wait1;
SET GLOBAL debug = NULL;
SET debug_sync='RESET';
# Make sure no pending signals are leftover to surprise subsequent tests.
SELECT @@debug_sync;

View File

@ -0,0 +1 @@
--log-bin --log-slave-updates

View File

@ -0,0 +1,128 @@
#
# SHOW commands now obey wsrep_sync_wait = 8 (WSREP_SYNC_WAIT_BEFORE_SHOW)
#
--source include/galera_cluster.inc
--source include/have_binlog_format_row.inc
--source include/have_debug_sync.inc
--connection node_2
# Make sure no signals have been leftover from previous tests to surprise us.
SELECT @@debug_sync;
SET SESSION wsrep_sync_wait = 8;
SET GLOBAL debug = "+d,sync.wsrep_apply_cb";
--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);
--connection node_2
--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT0.1S";
SET SESSION debug_sync = "now WAIT_FOR sync.wsrep_apply_cb_reached";
--disable_result_log
--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;
--error ER_LOCK_WAIT_TIMEOUT
SHOW CREATE DATABASE db1;
--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;
--enable_result_log
--disable_query_log
--eval SET GLOBAL wsrep_provider_options = "$wsrep_provider_options_orig"
--enable_query_log
# Unblock the background INSERT and remove the sync point.
SET GLOBAL debug = "-d,sync.wsrep_apply_cb";
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 GLOBAL debug = NULL;
SET debug_sync='RESET';
# Make sure no pending signals are leftover to surprise subsequent tests.
SELECT @@debug_sync;

View File

@ -6,6 +6,11 @@
--source include/have_innodb.inc
--source include/galera_cluster.inc
# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
--source include/auto_increment_offset_save.inc
# We perform the shutdown/restart sequence in here. If there was a crash during shutdown, MTR will detect it
--connection node_2
@ -35,3 +40,4 @@ CALL mtr.add_suppression("Failed to set packet size");
--source include/wait_condition.inc
CALL mtr.add_suppression("Failed to set packet size");
--source include/auto_increment_offset_restore.inc

View File

@ -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;

View File

@ -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';

View File

@ -48,7 +48,7 @@ insert into t1(i) values(null), (null), (null);
select * from t1;
show variables like 'binlog_format';
show variables like '%auto_increment%';
show variables like 'auto_increment_increment';
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';

View File

@ -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'`

View File

@ -0,0 +1,54 @@
#
# Test that Galera works correctly with multiline statements, in particular involving DDLs
#
--source include/galera_cluster.inc
--connection node_1
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
SHOW CREATE TABLE t1;
SHOW CREATE TABLE t2;
--connection node_2
SHOW CREATE TABLE t1;
SHOW CREATE TABLE t2;
--connection node_1
--send CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB; CREATE TABLE t4 (f1 INTEGER) ENGINE=InnoDB;
--reap
SHOW CREATE TABLE t3;
SHOW CREATE TABLE t4;
--connection node_2
SHOW CREATE TABLE t3;
SHOW CREATE TABLE t4;
--connection node_1
INSERT INTO t1 VALUES (1); CREATE TABLE t5 (f1 INTEGER) ENGINE=InnoDB;
SELECT COUNT(*) = 1 FROM t1;
SHOW CREATE TABLE t5;
--connection node_2
SELECT COUNT(*) = 1 FROM t1;
SHOW CREATE TABLE t5;
--connection node_1
--send CREATE TABLE t6 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t2 VALUES (1);
--reap
SELECT COUNT(*) = 1 FROM t2;
SHOW CREATE TABLE t6;
--connection node_2
SELECT COUNT(*) = 1 FROM t2;
SHOW CREATE TABLE t6;
--let $diff_servers = 1 2
--source include/diff_servers.inc
--connection node_1
DROP TABLE t1, t2, t3, t4, t5, t6;

View File

@ -21,11 +21,11 @@ LOCK TABLE t1 WRITE;
--connection node_1
--sleep 1
INSERT INTO t1 VALUES (2);
--sleep 1
--sleep 2
INSERT INTO t1 VALUES (3);
--sleep 1
--sleep 2
INSERT INTO t1 VALUES (4);
--sleep 1
--sleep 2
# This query will hang because flow control will kick in
--send

View File

@ -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;
#

View File

@ -9,3 +9,4 @@ wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.ignore_sb=true'
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;pc.ignore_sb=true'

View File

@ -0,0 +1,5 @@
!include ../galera_2nodes.cnf
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.ignore_sb=true'

View File

@ -0,0 +1,76 @@
#
# Test progress output during IST
#
--source include/galera_cluster.inc
# This could cause out of storage if run /dev/shm
--source include/big_test.inc
# Isolate node #2
--connection node_2
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1';
--connection node_1
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
--connection node_2
SET SESSION wsrep_on = OFF;
--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_on = ON;
# Node #2 is now isolated. Run some transactions to accumulate writesets for IST
--connection node_1
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (5);
INSERT INTO t1 VALUES (6);
INSERT INTO t1 VALUES (7);
INSERT INTO t1 VALUES (8);
INSERT INTO t1 VALUES (9);
INSERT INTO t1 VALUES (10);
# Restore node #2, IST is performed
--connection node_2
SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0';
--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
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--source include/wait_condition.inc
#
# Grep for expected IST output in joiner log
#
--connection node_1
--let $assert_count = 1
--let $assert_file = $MYSQLTEST_VARDIR/log/mysqld.2.err
--let $assert_only_after = Need state transfer
--let $assert_text = Receiving IST: 11 writesets, seqnos
--let $assert_select = Receiving IST: 11 writesets, seqnos
--source include/assert_grep.inc
--let $assert_text = Receiving IST\.\.\. 0\.0% \( 0/11 events\) complete
--let $assert_select = Receiving IST\.\.\. 0\.0% \( 0/11 events\) complete
--source include/assert_grep.inc
--let $assert_text = Receiving IST\.\.\.100\.0% \(11/11 events\) complete
--let $assert_select = Receiving IST\.\.\.100\.0% \(11/11 events\) complete
--source include/assert_grep.inc
# Cleanup
--connection node_1
DROP TABLE t1;

View File

@ -5,6 +5,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/big_test.inc
--connection node_1
SELECT @@wsrep_provider_options LIKE '%ist.recv_bind = 127.0.0.1%';

View File

@ -8,6 +8,8 @@
--source include/have_innodb.inc
--source include/have_debug_sync.inc
--source suite/galera/include/galera_have_debug_sync.inc
# This could cause out of storage if run /dev/shm
--source include/big_test.inc
# Save original auto_increment_offset values.
--let $node_1=node_1
@ -31,13 +33,6 @@ UPDATE t1 SET f2 = 'b' WHERE f1 > 1;
UPDATE t1 SET f2 = 'c' WHERE f1 > 2;
--connection node_2
# Make sure IST will block ...
--let $galera_sync_point = recv_IST_after_apply_trx
--source include/galera_set_sync_point.inc
SET SESSION wsrep_sync_wait = 0;
# Write file to make mysql-test-run.pl expect the crash, but don't start it
--let $_server_id= `SELECT @@server_id`
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
@ -48,21 +43,23 @@ SET SESSION wsrep_sync_wait = 0;
# ... and restart provider to force IST
--echo Loading wsrep_provider ...
--disable_query_log
# base_port setting is lost for some reason when unloading provider, so we need to restore it
--eval SET GLOBAL wsrep_provider_options= 'base_port=$NODE_GALERAPORT_2';
--eval SET GLOBAL wsrep_provider = '$wsrep_provider_orig';
# Make sure IST will block ...
--let $galera_sync_point = recv_IST_after_apply_trx
--source include/galera_set_sync_point.inc
--eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_orig';
--enable_query_log
# We can not use a wait_condition on SELECT * FROM INFORMATION_SCHEMA.GLOBAL_STATUS as such queries are blocked during IST
# so we perform a simple sleep and SHOW instead
--sleep 5
SHOW STATUS LIKE 'wsrep_debug_sync_waiters';
SET SESSION wsrep_on=OFF;
--let $wait_condition = SELECT VARIABLE_VALUE = 'recv_IST_after_apply_trx' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_debug_sync_waiters';
--source include/wait_condition.inc
SET SESSION wsrep_on=ON;
--connection node_1
# Perform DML and DDL while IST is in progress
--connection node_1
# Perform DML while IST is in progress
UPDATE t1 SET f2 = 'd' WHERE f1 > 3;
CREATE TABLE t2 (f1 INTEGER);
# Kill node #2 while IST is in progress
--connection node_2
@ -85,9 +82,8 @@ EOF
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
# Perform DML and DDL while node #2 is down
# Perform DML while node #2 is down
UPDATE t1 SET f2 = 'e' WHERE f1 > 4;
CREATE TABLE t3 (f1 INTEGER);
--connection node_2
@ -106,11 +102,9 @@ SELECT * FROM t1;
--connection node_2
SELECT * FROM t1;
SELECT COUNT(*) = 0 FROM t2;
SELECT COUNT(*) = 0 FROM t3;
--connection node_1
DROP TABLE t1, t2, t3;
DROP TABLE t1;
# Restore original auto_increment_offset values.
--source include/auto_increment_offset_restore.inc

View File

@ -5,7 +5,9 @@ wsrep_sst_method=rsync
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.ignore_sb=true'
wsrep_sync_wait=1
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;pc.ignore_sb=true'
wsrep_sync_wait=1

View File

@ -2,7 +2,12 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
--source include/auto_increment_offset_save.inc
--source suite/galera/include/galera_st_disconnect_slave.inc
--source suite/galera/include/galera_st_shutdown_slave.inc
--source suite/galera/include/galera_st_kill_slave.inc
--source suite/galera/include/galera_st_kill_slave_ddl.inc
--source include/auto_increment_offset_restore.inc

View File

@ -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';

View File

@ -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

View File

@ -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;

View File

@ -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

View File

@ -6,6 +6,11 @@
CALL mtr.add_suppression("Aborting");
CALL mtr.add_suppression("unknown option '--galera-unknown-option'");
# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
--source include/auto_increment_offset_save.inc
#
# We should count the number of "Assertion failed" warnings
# in the log file before and after testing. To do this we need
@ -148,3 +153,5 @@ DROP TABLE t1;
}
EOF
--remove_file $TEST_LOG.copy
--source include/auto_increment_offset_restore.inc

View File

@ -8,6 +8,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/big_test.inc
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';

View File

@ -7,6 +7,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/big_test.inc
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';

View File

@ -41,6 +41,7 @@ INSERT INTO t1 VALUES (1);
exit(0);
EOF
SET SESSION wsrep_sync_wait = 1;
--sleep 10
--source include/wait_until_ready.inc
INSERT INTO t1 VALUES (1);
@ -50,9 +51,11 @@ INSERT INTO t1 VALUES (1);
--source include/galera_connect.inc
--connection node_2a
SET SESSION wsrep_sync_wait = 1;
--source include/wait_until_ready.inc
SELECT COUNT(*) = 1 FROM t1;
SET SESSION wsrep_sync_wait = 15;
DROP TABLE t1;
# Restore original auto_increment_offset values.

View File

@ -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

View File

@ -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

View File

@ -17,15 +17,10 @@ CREATE TABLE t1(i INT) ENGINE=INNODB;
INSERT INTO t1 VALUES(1);
SELECT * FROM t1;
create user user1;
grant all privileges on *.* to user1;
create user user2;
grant all privileges on *.* to user2;
SET @@global.wsrep_cluster_address = '';
SET @@session.wsrep_dirty_reads=OFF;
# Set wsrep_sync_wait to avoid ER_LOCK_WAIT_TIMEOUT (MDEV-6832).
# Set wsrep_sync_wait to avoid ER_LOCK_WAIT_TIMEOUT.
SET SESSION wsrep_sync_wait=0;
# Must return 'OFF'
@ -37,75 +32,31 @@ SHOW STATUS LIKE 'wsrep_cluster_status';
--error ER_UNKNOWN_COM_ERROR
SELECT * FROM t1;
#Select query which does not access table should be allowed MDEV-11016
SELECT @@wsrep_dirty_reads;
SELECT 2;
SELECT 2+2 FROM DUAL;
--error ER_UNKNOWN_COM_ERROR
SELECT 1 FROM t1;
SET @@session.wsrep_dirty_reads=ON;
SELECT * FROM t1;
SELECT 1 FROM t1;
--enable_connect_log
--connect (con1, localhost, user1,,test,$NODE_MYPORT_2,$NODE_MYSOCK_2)
#Just test the session behavior
SET SESSION wsrep_sync_wait=0;
SELECT i, variable_name, variable_value FROM t1, information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads" AND i = 1;
set session wsrep_dirty_reads=1;
#Prepared statement creation should be allowed MDEV-11479
prepare stmt_show from 'select 1';
prepare stmt_select from 'select * from t1';
prepare stmt_insert from 'insert into t1 values(1)';
set session wsrep_dirty_reads=0;
SET @@session.wsrep_dirty_reads=OFF;
#No Preapare stmt/proceure will be allowed
--error ER_UNKNOWN_COM_ERROR
execute stmt_show;
SELECT i, variable_name, variable_value FROM t1, information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads" AND i = 1;
SELECT 1;
--error ER_UNKNOWN_COM_ERROR
execute stmt_select;
USE information_schema;
--error ER_UNKNOWN_COM_ERROR
execute stmt_insert;
SELECT * FROM information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads";
SET wsrep_dirty_reads=ON;
select @@session.wsrep_dirty_reads;
#Only prepare statement which does not change data should be allowed
execute stmt_show;
execute stmt_select;
--error ER_UNKNOWN_COM_ERROR
execute stmt_insert;
SET @@global.wsrep_dirty_reads=ON;
--connect (con2, localhost, user2,,test,$NODE_MYPORT_2,$NODE_MYSOCK_2)
#Just test the session behavior
select @@session.wsrep_dirty_reads;
prepare stmt_show from 'select 1';
prepare stmt_select from 'select * from t1';
prepare stmt_insert from 'insert into t1 values(1)';
#Only prepare statement which does not change data should be allowed
execute stmt_show;
execute stmt_select;
--error ER_UNKNOWN_COM_ERROR
execute stmt_insert;
#wsrep_dirty_read should work when wsrep_sync_wait is 1 or non zero
#because we already are disconnected , So It does not make any sense
#to wait for other nodes
SET SESSION wsrep_sync_wait=1;
execute stmt_show;
execute stmt_select;
--error ER_UNKNOWN_COM_ERROR
execute stmt_insert;
SET SESSION wsrep_sync_wait=7;
execute stmt_show;
execute stmt_select;
--error ER_UNKNOWN_COM_ERROR
execute stmt_insert;
--connection node_2
SET @@global.wsrep_dirty_reads=OFF;
SELECT COUNT(*) >= 10 FROM performance_schema.events_statements_history;
--disable_query_log
--eval SET @@global.wsrep_cluster_address = '$wsrep_cluster_address_saved'
@ -113,13 +64,11 @@ SET @@global.wsrep_dirty_reads=OFF;
--source include/wait_until_connected_again.inc
--connection node_1
USE test;
SELECT * FROM t1;
# Cleanup
DROP TABLE t1;
drop user user1;
drop user user2;
# Restore original auto_increment_offset values.
--source include/auto_increment_offset_restore.inc
--source include/galera_end.inc

View File

@ -7,6 +7,8 @@
--source include/have_innodb.inc
call mtr.add_suppression("WSREP: Stray state UUID msg: .* current group state WAIT_STATE_UUID .*");
call mtr.add_suppression("WSREP: Protocol violation. JOIN message sender .* is not in state transfer (.*). Message ignored.");
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--connection node_1

View File

@ -20,7 +20,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

View File

@ -6,6 +6,11 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
--source include/auto_increment_offset_save.inc
--connection node_1
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
@ -26,6 +31,8 @@ INSERT INTO t1 VALUES (3);
--eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_orig';
--enable_query_log
SET SESSION wsrep_sync_wait = 0;
--source include/wait_until_connected_again.inc
--source include/galera_wait_ready.inc
@ -39,3 +46,5 @@ SELECT COUNT(*) = 4 FROM t1;
SELECT COUNT(*) = 3 FROM t1;
DROP TABLE t1;
--source include/auto_increment_offset_restore.inc

View File

@ -45,7 +45,7 @@ SHOW CREATE TABLE t1;
--connection node_2a
--reap
UNLOCK TABLES;
--sleep 1
--sleep 2
SHOW CREATE TABLE t1;
SELECT * from t1;

View File

@ -5,6 +5,9 @@ CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB;
--connection node_2
# Ensure that the tables have been created on node #2
SELECT 1 FROM DUAL;
LOCK TABLE t2 WRITE;
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2

View File

@ -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

View File

@ -31,6 +31,7 @@ INSERT INTO t1 VALUES (3);
--eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_orig';
--enable_query_log
set SESSION wsrep_sync_wait=0;
--source include/wait_until_connected_again.inc
--source include/galera_wait_ready.inc
@ -53,8 +54,12 @@ show global variables like 'wsrep_slave_threads';
--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_2
SELECT COUNT(*) FROM t1;
SET GLOBAL auto_increment_offset = 2;
--connection node_1
SELECT COUNT(*) FROM t1;
show global variables like 'wsrep_slave_threads';
--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_1
DROP TABLE t1;
SET GLOBAL auto_increment_offset = 1;

View File

@ -0,0 +1 @@
--query_cache_type=1

View File

@ -1,8 +1,3 @@
galera_garbd : Fix the test case
galera_evs_suspect_timeout : TODO: investigate
galera_innobackupex_backup : TODO: investigate
galera_slave_options_do :MDEV-8798
galera_slave_options_ignore : MDEV-8798
galera_pc_bootstrap : TODO: Investigate: Timeout in wait_condition.inc
galera_pc_weight : Test times out
galera_safe_to_bootstrap : I Really dont know :(

View File

@ -11,7 +11,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://'

View File

@ -0,0 +1,14 @@
SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses';
VARIABLE_VALUE LIKE '%[::1]%'
1
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 3
1
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
DROP TABLE t1;

View File

@ -0,0 +1,26 @@
GRANT ALL PRIVILEGES ON *.* TO 'sst';
SET GLOBAL wsrep_sst_auth = 'sst:';
SET GLOBAL wsrep_sst_method = 'mysqldump';
Unloading wsrep provider ...
SET GLOBAL wsrep_provider = 'none';
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
Loading wsrep provider ...
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
DROP TABLE t1;
SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses';
VARIABLE_VALUE LIKE '%[::1]%'
1
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
DROP USER sst;
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
CALL mtr.add_suppression("InnoDB: Error: Table \"mysql\"\\.\"innodb_index_stats\" not found");
CALL mtr.add_suppression("InnoDB: New log files created");
CALL mtr.add_suppression("InnoDB: Creating foreign key constraint system tables");
CALL mtr.add_suppression("Can't open and lock time zone table");
CALL mtr.add_suppression("Can't open and lock privilege tables");
CALL mtr.add_suppression("Info table is not ready to be used");
CALL mtr.add_suppression("Native table .* has the wrong structure");
CALL mtr.add_suppression("Unsupported protocol downgrade: incremental data collection disabled. Expect abort");

View File

@ -0,0 +1,14 @@
SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses';
VARIABLE_VALUE LIKE '%[::1]%'
1
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 3
1
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
DROP TABLE t1;

View File

@ -0,0 +1,18 @@
SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses';
VARIABLE_VALUE LIKE '%[::1]%'
1
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 3
1
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
DROP TABLE t1;
include/assert_grep.inc [Streaming the backup to joiner at \[::1\]]
include/assert_grep.inc [async IST sender starting to serve tcp://\[::1\]:]
include/assert_grep.inc [IST receiver addr using tcp://\[::1\]]
include/assert_grep.inc [Prepared IST receiver, listening at: tcp://\[::1\]]

View File

@ -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;

View File

@ -0,0 +1,26 @@
!include ../galera_3nodes.cnf
[mysqld]
wsrep_sst_method=rsync
[mysqld.1]
wsrep-cluster-address=gcomm://
wsrep_node_address=[::1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]'
wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port'
wsrep_node_incoming_address='[::1]:@mysqld.1.port'
[mysqld.2]
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
wsrep_node_address=[::1]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]'
wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port'
wsrep_node_incoming_address='[::1]:@mysqld.2.port'
[mysqld.3]
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
wsrep_node_address=[::1]
wsrep_provider_options='base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]'
wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port'
wsrep_node_incoming_address='[::1]:@mysqld.3.port'

View File

@ -0,0 +1,38 @@
#
# Test GAL-501 Improved URI parsing for IPv6 addresses
# The .cnf file contains
# wsrep_node_address=[::1]
# ist.recv_addr=[::1]
--source include/galera_cluster.inc
--source include/have_ipv6.inc
# Confirm that initial handshake happened over ipv6
SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses';
SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
# Force IST
--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
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
--connection node_2
SET GLOBAL wsrep_provider_options='gmcast.isolate=0';
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
--source include/wait_condition.inc
SELECT COUNT(*) = 1 FROM t1;
DROP TABLE t1;

View File

@ -0,0 +1,22 @@
!include ../galera_3nodes.cnf
[mysqld]
wsrep_sst_method=rsync
[mysqld.1]
wsrep-cluster-address=gcomm://
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.1.#galera_port;ist.recv_addr=[::1]:@mysqld.1.#ist_port'
wsrep_sst_receive_address='[::1]:@mysqld.1.#sst_port'
wsrep_node_incoming_address='[::1]:@mysqld.1.port'
[mysqld.2]
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.2.#galera_port;ist.recv_addr=[::1]:@mysqld.2.#ist_port'
wsrep_sst_receive_address='[::1]:@mysqld.2.#sst_port'
wsrep_node_incoming_address='[::1]:@mysqld.2.port'
[mysqld.3]
wsrep_cluster_address='gcomm://[::1]:@mysqld.1.#galera_port'
wsrep_provider_options='base_port=@mysqld.3.#galera_port;gmcast.listen_addr=tcp://[::]:@mysqld.3.#galera_port;ist.recv_addr=[::1]:@mysqld.3.#ist_port'
wsrep_sst_receive_address='[::1]:@mysqld.3.#sst_port'
wsrep_node_incoming_address='[::1]:@mysqld.3.port'

View File

@ -0,0 +1,56 @@
--source include/galera_cluster.inc
--source include/have_ipv6.inc
--connection node_1
GRANT ALL PRIVILEGES ON *.* TO 'sst';
--let $wsrep_sst_auth_orig = `SELECT @@wsrep_sst_auth`
SET GLOBAL wsrep_sst_auth = 'sst:';
--connection node_2
--source include/wait_until_connected_again.inc
--let $wsrep_sst_method_orig = `SELECT @@wsrep_sst_method`
--let $wsrep_sst_receive_address_orig = `SELECT @@wsrep_sst_receive_address`
--disable_query_log
--eval SET GLOBAL wsrep_sst_receive_address = '[::1]:$NODE_MYPORT_2';
--enable_query_log
SET GLOBAL wsrep_sst_method = 'mysqldump';
#
# Force mysqldump SST
#
--connection node_2
--source suite/galera/include/galera_unload_provider.inc
--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat
--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
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
--connection node_2
--source suite/galera/include/galera_load_provider.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
--source include/wait_condition.inc
SELECT COUNT(*) = 1 FROM t1;
DROP TABLE t1;
# Confirm that initial handshake happened over ipv6
SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_incoming_addresses';
--source suite/galera/include/galera_sst_restore.inc
--connection node_2
CALL mtr.add_suppression("Unsupported protocol downgrade: incremental data collection disabled. Expect abort");

Some files were not shown because too many files have changed in this diff Show More