Merge 10.1 into 10.2

For running the Galera tests, the variable my_disable_leak_check
was set to true in order to avoid assertions due to memory leaks
at shutdown.

Some adjustments due to MDEV-13625 (merge InnoDB tests from MySQL 5.6)
were performed. The most notable behaviour changes from 10.0 and 10.1
are the following:

* innodb.innodb-table-online: adjustments for the DROP COLUMN
behaviour change (MDEV-11114, MDEV-13613)

* innodb.innodb-index-online-fk: the removal of a (1,NULL) record
from the result; originally removed in MySQL 5.7 in the
Oracle Bug #16244691 fix
377774689b

* innodb.create-index-debug: disabled due to MDEV-13680
(the MySQL Bug #77497 fix was not merged from 5.6 to 5.7.10)

* innodb.innodb-alter-autoinc: MariaDB 10.2 behaves like MySQL 5.6/5.7,
while MariaDB 10.0 and 10.1 assign different values when
auto_increment_increment or auto_increment_offset are used.
Also MySQL 5.6/5.7 exhibit different behaviour between
LGORITHM=INPLACE and ALGORITHM=COPY, so something needs to be tested
and fixed in both MariaDB 10.0 and 10.2.

* innodb.innodb-wl5980-alter: disabled because it would trigger an
InnoDB assertion failure (MDEV-13668 may need additional effort in 10.2)
This commit is contained in:
Marko Mäkelä 2017-08-31 09:28:59 +03:00
commit a36c369bda
208 changed files with 10261 additions and 946 deletions

View File

@ -4022,7 +4022,25 @@ static int rmtree(const char *dir)
strxnmov(path, sizeof(path), dir, sep, file->name, NULL);
if (!MY_S_ISDIR(file->mystat->st_mode))
{
err= my_delete(path, 0);
#ifdef _WIN32
/*
On Windows, check and possible reset readonly attribute.
my_delete(), or DeleteFile does not remove theses files.
*/
if (err)
{
DWORD attr= GetFileAttributes(path);
if (attr != INVALID_FILE_ATTRIBUTES &&
(attr & FILE_ATTRIBUTE_READONLY))
{
SetFileAttributes(path, attr &~ FILE_ATTRIBUTE_READONLY);
err= my_delete(path, 0);
}
}
#endif
}
else
err= rmtree(path);

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

@ -11,14 +11,14 @@
--- old/mysql-test/mysql-test-run.pl 2009-06-16 14:24:09.000000000 +0200
+++ new/mysql-test/mysql-test-run.pl 2009-07-04 00:03:34.000000000 +0200
@@ -3578,6 +3578,11 @@ sub mysql_install_db {
mtr_appendfile_to_file("$sql_dir/mysql_system_tables_data.sql",
$bootstrap_sql_file);
mtr_appendfile_to_file("$sql_dir/mysql_system_tables_data.sql",
$bootstrap_sql_file);
+ mtr_tofile($bootstrap_sql_file, "-- Debian removed the default privileges on the 'test' database\n");
+ mtr_tofile($bootstrap_sql_file, "INSERT INTO mysql.db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');\n");
+ mtr_tofile($bootstrap_sql_file, "INSERT INTO mysql.db VALUES ('%','test\\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');\n");
+
+ mtr_tofile($bootstrap_sql_file, "-- Debian removed the default privileges on the 'test' database\n");
+ mtr_tofile($bootstrap_sql_file, "INSERT INTO mysql.db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');\n");
+ mtr_tofile($bootstrap_sql_file, "INSERT INTO mysql.db VALUES ('%','test\\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');\n");
+
# Add test data for timezone - this is just a subset, on a real
# system these tables will be populated either by mysql_tzinfo_to_sql
# or by downloading the timezone table package from our website
+
# Add test data for timezone - this is just a subset, on a real
# system these tables will be populated either by mysql_tzinfo_to_sql
# or by downloading the timezone table package from our website

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

@ -0,0 +1,18 @@
# ==== Usage ====
#
# [--let $restart_parameters= --innodb-force-recovery=0 --innodb-read-only=1]
# [--let $mysqld_stub_cmd= $MYSQLD_LAST_CMD]
# [--let $error_log= $MYSQLTEST_VARDIR/log/mysqld.1.err]
# --source include/fail_restart_mysqld.inc
# Evaluate the default of $error_log
if (!$error_log)
{
--let $error_log= $MYSQLTEST_VARDIR/log/mysqld.1.err
}
--error 1
--exec $mysqld_stub_cmd $restart_parameters >> $error_log 2>&1
# As the server is stopped
--disable_reconnect

View File

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

View File

@ -1,3 +1,17 @@
# ==== Usage ====
#
# [--let $shutdown_timeout= 30]
# [--let $allow_rpl_inited= 1]
# --source include/shutdown_mysqld.inc
# The default value is empty
--let $server_shutdown_timeout=
if ($shutdown_timeout)
{
--let $server_shutdown_timeout= $shutdown_timeout
}
# This is the first half of include/restart_mysqld.inc.
if ($rpl_inited)
{

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

View File

@ -197,6 +197,7 @@ my @DEFAULT_SUITES= qw(
unit-
vcol-
wsrep-
galera-
);
my $opt_suites;
@ -3090,14 +3091,16 @@ sub mysql_install_db {
mtr_add_arg($args, "--bootstrap");
mtr_add_arg($args, "--basedir=%s", $install_basedir);
mtr_add_arg($args, "--datadir=%s", $install_datadir);
mtr_add_arg($args, "--plugin-dir=%s", $plugindir);
mtr_add_arg($args, "--default-storage-engine=myisam");
mtr_add_arg($args, "--skip-plugin-$_") for @optional_plugins;
mtr_add_arg($args, "--loose-skip-plugin-$_") for @optional_plugins;
# starting from 10.0 bootstrap scripts require InnoDB
mtr_add_arg($args, "--loose-innodb");
mtr_add_arg($args, "--loose-innodb-log-file-size=5M");
mtr_add_arg($args, "--disable-sync-frm");
mtr_add_arg($args, "--tmpdir=%s", "$opt_vardir/tmp/");
mtr_add_arg($args, "--core-file");
mtr_add_arg($args, "--console");
if ( $opt_debug )
{
@ -3116,13 +3119,6 @@ sub mysql_install_db {
mtr_add_arg($args, $extra_opt);
}
}
# InnoDB options can come not only from the command line, but also
# from option files or combinations
foreach my $extra_opt ( @$extra_opts ) {
if ($extra_opt =~ /--innodb/) {
mtr_add_arg($args, $extra_opt);
}
}
# If DISABLE_GRANT_OPTIONS is defined when the server is compiled (e.g.,
# configure --disable-grant-options), mysqld will not recognize the
@ -3137,98 +3133,108 @@ sub mysql_install_db {
# ----------------------------------------------------------------------
$ENV{'MYSQLD_BOOTSTRAP_CMD'}= "$exe_mysqld_bootstrap " . join(" ", @$args);
# Extra options can come not only from the command line, but also
# from option files or combinations. We want them on a command line
# that is executed now, because otherwise the datadir might be
# incompatible with the test settings, but not on the general
# $MYSQLD_BOOTSTRAP_CMD line
foreach my $extra_opt ( @$extra_opts ) {
mtr_add_arg($args, $extra_opt);
}
# ----------------------------------------------------------------------
# Create the bootstrap.sql file
# ----------------------------------------------------------------------
my $bootstrap_sql_file= "$opt_vardir/tmp/bootstrap.sql";
my $bootstrap_sql_file= "$opt_vardir/log/bootstrap.sql";
if ($opt_boot_gdb) {
gdb_arguments(\$args, \$exe_mysqld_bootstrap, $mysqld->name(),
$bootstrap_sql_file);
}
if ($opt_boot_dbx) {
dbx_arguments(\$args, \$exe_mysqld_bootstrap, $mysqld->name(),
$bootstrap_sql_file);
}
if ($opt_boot_ddd) {
ddd_arguments(\$args, \$exe_mysqld_bootstrap, $mysqld->name(),
$bootstrap_sql_file);
}
my $path_sql= my_find_file($install_basedir,
["mysql", "sql/share", "share/mariadb",
"share/mysql", "share", "scripts"],
"mysql_system_tables.sql",
NOT_REQUIRED);
if (-f $path_sql )
if (! -e $bootstrap_sql_file)
{
my $sql_dir= dirname($path_sql);
# Use the mysql database for system tables
mtr_tofile($bootstrap_sql_file, "use mysql;\n");
if ($opt_boot_gdb) {
gdb_arguments(\$args, \$exe_mysqld_bootstrap, $mysqld->name(),
$bootstrap_sql_file);
}
if ($opt_boot_dbx) {
dbx_arguments(\$args, \$exe_mysqld_bootstrap, $mysqld->name(),
$bootstrap_sql_file);
}
if ($opt_boot_ddd) {
ddd_arguments(\$args, \$exe_mysqld_bootstrap, $mysqld->name(),
$bootstrap_sql_file);
}
# Add the offical mysql system tables
# for a production system
mtr_appendfile_to_file("$sql_dir/mysql_system_tables.sql",
$bootstrap_sql_file);
my $path_sql= my_find_file($install_basedir,
["mysql", "sql/share", "share/mariadb",
"share/mysql", "share", "scripts"],
"mysql_system_tables.sql",
NOT_REQUIRED);
# Add the performance tables
# for a production system
mtr_appendfile_to_file("$sql_dir/mysql_performance_tables.sql",
$bootstrap_sql_file);
if (-f $path_sql )
{
my $sql_dir= dirname($path_sql);
# Use the mysql database for system tables
mtr_tofile($bootstrap_sql_file, "use mysql;\n");
# Add the mysql system tables initial data
# for a production system
mtr_appendfile_to_file("$sql_dir/mysql_system_tables_data.sql",
$bootstrap_sql_file);
# Add the offical mysql system tables
# for a production system
mtr_appendfile_to_file("$sql_dir/mysql_system_tables.sql",
$bootstrap_sql_file);
# Add test data for timezone - this is just a subset, on a real
# system these tables will be populated either by mysql_tzinfo_to_sql
# or by downloading the timezone table package from our website
mtr_appendfile_to_file("$sql_dir/mysql_test_data_timezone.sql",
$bootstrap_sql_file);
# Add the performance tables
# for a production system
mtr_appendfile_to_file("$sql_dir/mysql_performance_tables.sql",
$bootstrap_sql_file);
# Fill help tables, just an empty file when running from bk repo
# but will be replaced by a real fill_help_tables.sql when
# building the source dist
mtr_appendfile_to_file("$sql_dir/fill_help_tables.sql",
$bootstrap_sql_file);
# Add the mysql system tables initial data
# for a production system
mtr_appendfile_to_file("$sql_dir/mysql_system_tables_data.sql",
$bootstrap_sql_file);
# mysql.gtid_slave_pos was created in InnoDB, but many tests
# run without InnoDB. Alter it to MyISAM now
mtr_tofile($bootstrap_sql_file, "ALTER TABLE gtid_slave_pos ENGINE=MyISAM;\n");
}
else
{
# Install db from init_db.sql that exist in early 5.1 and 5.0
# versions of MySQL
my $init_file= "$install_basedir/mysql-test/lib/init_db.sql";
mtr_report(" - from '$init_file'");
my $text= mtr_grab_file($init_file) or
mtr_error("Can't open '$init_file': $!");
# Add test data for timezone - this is just a subset, on a real
# system these tables will be populated either by mysql_tzinfo_to_sql
# or by downloading the timezone table package from our website
mtr_appendfile_to_file("$sql_dir/mysql_test_data_timezone.sql",
$bootstrap_sql_file);
# Fill help tables, just an empty file when running from bk repo
# but will be replaced by a real fill_help_tables.sql when
# building the source dist
mtr_appendfile_to_file("$sql_dir/fill_help_tables.sql",
$bootstrap_sql_file);
# mysql.gtid_slave_pos was created in InnoDB, but many tests
# run without InnoDB. Alter it to MyISAM now
mtr_tofile($bootstrap_sql_file, "ALTER TABLE gtid_slave_pos ENGINE=MyISAM;\n");
}
else
{
# Install db from init_db.sql that exist in early 5.1 and 5.0
# versions of MySQL
my $init_file= "$install_basedir/mysql-test/lib/init_db.sql";
mtr_report(" - from '$init_file'");
my $text= mtr_grab_file($init_file) or
mtr_error("Can't open '$init_file': $!");
mtr_tofile($bootstrap_sql_file,
sql_to_bootstrap($text));
}
# Remove anonymous users
mtr_tofile($bootstrap_sql_file,
sql_to_bootstrap($text));
"DELETE FROM mysql.user where user= '';\n");
# Create mtr database
mtr_tofile($bootstrap_sql_file,
"CREATE DATABASE mtr CHARSET=latin1;\n");
# Add help tables and data for warning detection and supression
mtr_tofile($bootstrap_sql_file,
sql_to_bootstrap(mtr_grab_file("include/mtr_warnings.sql")));
# Add procedures for checking server is restored after testcase
mtr_tofile($bootstrap_sql_file,
sql_to_bootstrap(mtr_grab_file("include/mtr_check.sql")));
}
# Remove anonymous users
mtr_tofile($bootstrap_sql_file,
"DELETE FROM mysql.user where user= '';\n");
# Create mtr database
mtr_tofile($bootstrap_sql_file,
"CREATE DATABASE mtr CHARSET=latin1;\n");
# Add help tables and data for warning detection and supression
mtr_tofile($bootstrap_sql_file,
sql_to_bootstrap(mtr_grab_file("include/mtr_warnings.sql")));
# Add procedures for checking server is restored after testcase
mtr_tofile($bootstrap_sql_file,
sql_to_bootstrap(mtr_grab_file("include/mtr_check.sql")));
# Log bootstrap command
my $path_bootstrap_log= "$opt_vardir/log/bootstrap.log";
mtr_tofile($path_bootstrap_log,
@ -5153,6 +5159,11 @@ sub mysqld_start ($$) {
# Remember options used when starting
$mysqld->{'started_opts'}= $extra_opts;
# "Dynamic" version of MYSQLD_CMD is reevaluated with each mysqld_start.
# Use it to restart the server at testing a failing server start (e.g
# due to incompatible options).
$ENV{'MYSQLD_LAST_CMD'}= "$exe @$args";
return;
}

View File

@ -1234,7 +1234,7 @@ character-sets-dir MYSQL_CHARSETSDIR/
chroot (No default value)
completion-type NO_CHAIN
concurrent-insert AUTO
console FALSE
console TRUE
date-format %Y-%m-%d
datetime-format %Y-%m-%d %H:%i:%s
deadlock-search-depth-long 15

View File

@ -0,0 +1,39 @@
call mtr.add_suppression("Can't init tc log");
call mtr.add_suppression("Found 1 prepared transactions!");
call mtr.add_suppression("Aborting");
set debug_sync='RESET';
CREATE TABLE t1 (i INT) ENGINE=InnoDB;
SET GLOBAL innodb_flush_log_at_trx_commit=1;
FLUSH TABLES;
connect con1,localhost,root,,;
set debug_sync='ha_commit_trans_after_prepare WAIT_FOR go';
INSERT INTO t1 VALUES (1);;
connection default;
# Prove that no COMMIT or ROLLBACK occurred yet.
SELECT * FROM t1;
i
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT * FROM t1;
i
1
# Kill the server
FOUND 1 /was in the XA prepared state/ in mysqld.1.err
FOUND 1 /Found 1 prepared transactions!/ in mysqld.1.err
NOT FOUND /\[ERROR\] Can\'t init tc log/ in mysqld.1.err
FOUND 2 /was in the XA prepared state/ in mysqld.1.err
FOUND 1 /Found 1 prepared transactions!/ in mysqld.1.err
FOUND 1 /\[ERROR\] Can\'t init tc log/ in mysqld.1.err
FOUND 1 /Please restart mysqld without --tc-heuristic-recover/ in mysqld.1.err
FOUND 3 /was in the XA prepared state/ in mysqld.1.err
FOUND 1 /Found 1 prepared transactions!/ in mysqld.1.err
FOUND 2 /\[ERROR\] Can\'t init tc log/ in mysqld.1.err
FOUND 2 /Please restart mysqld without --tc-heuristic-recover/ in mysqld.1.err
FOUND 3 /was in the XA prepared state/ in mysqld.1.err
FOUND 1 /Found 1 prepared transactions!/ in mysqld.1.err
SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
SELECT * FROM t1;
i
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
SELECT * FROM t1;
i
DROP TABLE t1;

View File

@ -12,3 +12,4 @@
innodb_scrub : MDEV-8139 scrubbing does not work reliably
innodb_scrub_background : MDEV-8139 scrubbing does not work reliably
innodb_encryption : an adjustment for MDEV-13583 is needed

View File

@ -1,47 +1,57 @@
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 : MDEV-11208
galera_sst_xtrabackup-v2_encrypt_with_key : MDEV-11208
mysql-wsrep#33 : TODO: investigate
##############################################################################
#
# 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
galera_var_innodb_disallow_writes : MDEV-10949
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

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

@ -2,15 +2,18 @@ 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';
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
connection node_2;
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

@ -1,3 +1,4 @@
connection node_1;
CREATE TABLE t1 (f1 CHAR(10), f0 integer) ENGINE=InnoDB;
FLUSH TABLE t1 FOR EXPORT;
UNLOCK TABLES;

View File

@ -17,7 +17,7 @@ INSERT INTO t1 VALUES (1);
connection node_3;
connection node_1;
DROP TABLE t1;
SET global wsrep_sync_wait=7;
SET global wsrep_sync_wait=15;
connection node_3;
STOP SLAVE;
RESET SLAVE ALL;

View File

@ -26,3 +26,4 @@ connection node_1b;
connection node_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,9 @@
connection node_2;
SET GLOBAL wsrep_slave_threads = 0;
Warnings:
Warning 1292 Truncated incorrect wsrep_slave_threads value: '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

@ -0,0 +1,51 @@
connection node_2;
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
connection node_1;
CREATE TABLE t_wait1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t_wait1 VALUES (1);
connection node_2;
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,53 @@
connection node_2;
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
connection node_1;
CREATE TABLE t_wait8 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t_wait8 VALUES (1);
connection node_2;
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

@ -10,6 +10,7 @@ c1
5
# On node_1
connection node_1;
SELECT * FROM test.t1;
c1
1
@ -19,6 +20,7 @@ c1
5
# On node_2
connection node_2;
SELECT * FROM test.t1;
c1
1
@ -27,4 +29,6 @@ c1
4
5
DROP TABLE t1;
disconnect node_2;
disconnect node_1;
# End of test

View File

@ -13,7 +13,7 @@ COUNT(*) = 0
1
connection node_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

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

@ -38,11 +38,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
connection node_2;
select * from t1;
i c

View File

@ -1,8 +1,13 @@
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(6)) ENGINE=InnoDB;
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES (1,'node_2');
connection node_1;
INSERT INTO t1 VALUES (1,'node_1');
connection node_2a;
connection node_2;
INSERT INTO t1 VALUES (2, 'node_2');
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
wsrep_local_aborts_increment

View File

@ -9,7 +9,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,89 @@
connection node_1;
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
connection node_2;
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
connection node_1;
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
connection node_2;
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
connection node_1;
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
connection node_2;
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
connection node_1;
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
connection node_2;
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]
connection node_1;
DROP TABLE t1, t2, t3, t4, t5, t6;

View File

@ -50,8 +50,8 @@ WSREP_SST_AUTH
WSREP_SST_DONOR
WSREP_SST_DONOR_REJECTS_QUERIES OFF
WSREP_SST_METHOD rsync
WSREP_SYNC_WAIT 7
<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;
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 = PT30S; evs.info_log_mask = 0; evs.install_timeout = PT15S; 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_%'
AND VARIABLE_NAME != 'wsrep_debug_sync_waiters';

View File

@ -1,6 +1,6 @@
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;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);

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

@ -9,20 +9,15 @@ connection node_1;
UPDATE t1 SET f2 = 'b' WHERE f1 > 1;
UPDATE t1 SET f2 = 'c' WHERE f1 > 2;
connection node_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;
connection node_1;
connection node_1;
UPDATE t1 SET f2 = 'd' WHERE f1 > 3;
CREATE TABLE t2 (f1 INTEGER);
connection node_2;
connection node_1;
UPDATE t1 SET f2 = 'e' WHERE f1 > 4;
CREATE TABLE t3 (f1 INTEGER);
connection node_2;
Performing --wsrep-recover ...
Starting server ...
@ -46,13 +41,7 @@ f1 f2
4 d
5 e
6 f
SELECT COUNT(*) = 0 FROM t2;
COUNT(*) = 0
1
SELECT COUNT(*) = 0 FROM t3;
COUNT(*) = 0
1
connection node_1;
DROP TABLE t1, t2, t3;
DROP TABLE t1;
disconnect node_2;
disconnect node_1;

View File

@ -1,6 +1,9 @@
connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
Killing server ...
connection node_2a;
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1

View File

@ -9,10 +9,12 @@ SELECT 1 = 1 FROM t1;
SELECT COUNT(*) = 1 FROM mysql.slow_log WHERE sql_text = 'SELECT 1 = 1 FROM t1';
COUNT(*) = 1
1
connection node_2;
SELECT 2 = 2 FROM t1;
2 = 2
1
SELECT COUNT(*) = 1 FROM mysql.slow_log WHERE sql_text = 'SELECT 2 = 2 FROM t1';
COUNT(*) = 1
1
connection node_1;
DROP TABLE t1;

View File

@ -7,7 +7,7 @@ CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoD
INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
connection node_2;
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

@ -23,7 +23,7 @@ COUNT(*) = 0
connection node_2;
UNLOCK TABLES;
connection node_2a;
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

@ -5,7 +5,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
@ -19,7 +18,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
@ -36,11 +34,9 @@ SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
connection node_1;
INSERT INTO t1 VALUES (4);
connection node_2;
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)
@ -54,7 +50,6 @@ Warning 1287 '@@debug' is deprecated and will be removed in a future release. Pl
connection node_1;
INSERT INTO t1 VALUES (5);
connection node_2;
SET SESSION wsrep_sync_wait = 7;
SELECT MAX(id) FROM t1 ;
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2a;

View File

@ -9,9 +9,12 @@ 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);
connection node_2a;
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,5 +1,5 @@
connection node_2;
SET SESSION wsrep_sync_wait = 1;
SET SESSION wsrep_sync_wait = 8;
connection node_1;
CREATE DATABASE db1;
connection node_2;

View File

@ -1,21 +1,30 @@
connection node_1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
COMMIT;
connection node_2;
wsrep_last_committed_diff
1
connection node_2;
connection node_1;
START TRANSACTION READ ONLY;
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
COMMIT;
connection node_2;
wsrep_last_committed_diff
1
connection node_1;
START TRANSACTION;
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
COMMIT;
connection node_2;
wsrep_last_committed_diff
1
DROP TABLE t1;

View File

@ -1,6 +1,6 @@
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;
CREATE DATABASE `database with space`;
USE `database with space`;

View File

@ -6,10 +6,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;
@ -21,87 +17,36 @@ 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,7 +3,7 @@
#
SELECT @@global.wsrep_sync_wait;
@@global.wsrep_sync_wait
7
15
SELECT @@global.wsrep_causal_reads;
@@global.wsrep_causal_reads
1
@ -11,9 +11,6 @@ connection node_1;
CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB;
connection node_2;
SET GLOBAL wsrep_sync_wait = 1;
SHOW TABLES LIKE '%t1';
Tables_in_test (%t1)
t1
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
@ -31,7 +28,7 @@ UPDATE t3 SET f1 = 2;
affected rows: 1
info: Rows matched: 1 Changed: 1 Warnings: 0
connection node_2;
SET GLOBAL wsrep_sync_wait = 7;
SET GLOBAL wsrep_sync_wait = 15;
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;

View File

@ -1,12 +1,20 @@
connection node_1;
connection node_2;
connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
connection node_2;
SET GLOBAL wsrep_provider='none';
INSERT INTO t1 VALUES (2);
connection node_1;
INSERT INTO t1 VALUES (3);
connection node_2;
SET SESSION wsrep_sync_wait = 0;
INSERT INTO t1 VALUES (4);
SELECT COUNT(*) = 4 FROM t1;
COUNT(*) = 4
1
connection node_1;
SELECT COUNT(*) = 3 FROM t1;
COUNT(*) = 3
1

View File

@ -1,6 +1,9 @@
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB;
connection node_2;
SELECT 1 FROM DUAL;
1
1
LOCK TABLE t2 WRITE;
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2a;

View File

@ -2,4 +2,3 @@ CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
INSERT INTO t1 VALUES (DEFAULT);
connection node_2;
SET GLOBAL query_cache_size=1355776;
SET SESSION wsrep_sync_wait = 7;

View File

@ -56,10 +56,10 @@ t1 CREATE TABLE `t1` (
`i` int(10) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`i`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=latin1
PARTITION BY RANGE (i)
(PARTITION p1 VALUES LESS THAN (10) ENGINE = InnoDB,
PARTITION p2 VALUES LESS THAN (20) ENGINE = InnoDB,
PARTITION pMax VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
PARTITION BY RANGE (`i`)
(PARTITION `p1` VALUES LESS THAN (10) ENGINE = InnoDB,
PARTITION `p2` VALUES LESS THAN (20) ENGINE = InnoDB,
PARTITION `pMax` VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
SHOW CREATE TABLE p1;
Table Create Table
p1 CREATE TABLE `p1` (
@ -93,9 +93,9 @@ t1 CREATE TABLE `t1` (
`i` int(10) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`i`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION BY RANGE (i)
(PARTITION p1 VALUES LESS THAN (10) ENGINE = InnoDB,
PARTITION pMax VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
PARTITION BY RANGE (`i`)
(PARTITION `p1` VALUES LESS THAN (10) ENGINE = InnoDB,
PARTITION `pMax` VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
# On node_2
connection node_2;
@ -105,9 +105,9 @@ t1 CREATE TABLE `t1` (
`i` int(10) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`i`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
PARTITION BY RANGE (i)
(PARTITION p1 VALUES LESS THAN (10) ENGINE = InnoDB,
PARTITION pMax VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
PARTITION BY RANGE (`i`)
(PARTITION `p1` VALUES LESS THAN (10) ENGINE = InnoDB,
PARTITION `pMax` VALUES LESS THAN MAXVALUE ENGINE = InnoDB)
DROP TABLE t1, p1;
#
# MDEV-5146: Bulk loads into partitioned table not working

View File

@ -10,6 +10,7 @@ INSERT INTO t1 VALUES (2);
connection node_1;
INSERT INTO t1 VALUES (3);
connection node_2;
set SESSION wsrep_sync_wait=0;
INSERT INTO t1 VALUES (4);
set GLOBAL wsrep_slave_threads=5;
SELECT COUNT(*) = 5 FROM t1;
@ -31,6 +32,7 @@ SET GLOBAL wsrep_slave_threads = 1;
SELECT COUNT(*) FROM t1;
COUNT(*)
16
SET GLOBAL auto_increment_offset = 2;
connection node_1;
SELECT COUNT(*) FROM t1;
COUNT(*)
@ -40,3 +42,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,19 @@ 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: .*core_handle_uuid_msg.*|,
qr(WSREP: --wsrep-causal-reads=ON takes precedence over --wsrep-sync-wait=0. WSREP_SYNC_WAIT_BEFORE_READ is on),
qr|WSREP: JOIN message from member .* in non-primary configuration. Ignored.|,
);
$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

@ -82,3 +82,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

@ -154,3 +154,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

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