Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/bb-10.1-jplindst' into 10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Lindström committed Aug 29, 2017
2 parents 352d27c + bbfd53c commit 01209de
Show file tree
Hide file tree
Showing 147 changed files with 2,597 additions and 793 deletions.
2 changes: 1 addition & 1 deletion cmake/wsrep.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions include/wsrep.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 /* WITH_WSREP */

#endif /* WSERP_INCLUDED */
#endif /* WSREP_INCLUDED */
2 changes: 2 additions & 0 deletions mysql-test/include/galera_cluster.inc
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@

--let $galera_cluster_size = 2
--source include/galera_init.inc

--source include/have_innodb.inc
3 changes: 3 additions & 0 deletions mysql-test/include/restart_mysqld.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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

3 changes: 3 additions & 0 deletions mysql-test/include/start_mysqld.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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

18 changes: 18 additions & 0 deletions mysql-test/include/wait_wsrep_ready.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
# 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'`)
{
if (`SELECT @@GLOBAL.WSREP_ON`)
{
--source include/galera_wait_ready.inc
}
}

--enable_query_log
--enable_result_log
1 change: 1 addition & 0 deletions mysql-test/mysql-test-run.pl
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ END
unit-
vcol-
wsrep-
galera-
);
my $opt_suites;

Expand Down
114 changes: 56 additions & 58 deletions mysql-test/suite/galera/disabled.def
Original file line number Diff line number Diff line change
@@ -1,58 +1,56 @@
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
galera_as_master: MDEV-13549 Galera test failures 10.1
galera_pc_ignore_sb : MDEV-13549 Galera test failures 10.1
galera_lock_table : MDEV-13549 Galera test failures 10.1
MW-284 : MDEV-13549 Galera test failures 10.1
galera_as_slave : MDEV-13549 Galera test failures 10.1
4 changes: 2 additions & 2 deletions mysql-test/suite/galera/galera_2nodes.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/suite/galera/galera_2nodes_as_master.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/suite/galera/galera_2nodes_as_slave.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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]
Expand Down
6 changes: 3 additions & 3 deletions mysql-test/suite/galera/galera_3nodes_as_slave.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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]
Expand All @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/galera/galera_4nodes.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions mysql-test/suite/galera/r/GAL-401.result
Original file line number Diff line number Diff line change
@@ -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` (
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/suite/galera/r/MW-284.result
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
1 change: 1 addition & 0 deletions mysql-test/suite/galera/r/MW-329.result
Original file line number Diff line number Diff line change
Expand Up @@ -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");
42 changes: 42 additions & 0 deletions mysql-test/suite/galera/r/MW-336.result
Original file line number Diff line number Diff line change
@@ -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;
Loading

0 comments on commit 01209de

Please sign in to comment.