Commit 93b50e64 authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: remove galera/wsrep magic from mtr

parent 4bb49d84
......@@ -34,7 +34,6 @@ BEGIN
AND variable_name != 'INNODB_USE_NATIVE_AIO'
AND variable_name not like 'GTID%POS'
AND variable_name != 'GTID_BINLOG_STATE'
AND variable_name != 'WSREP_DATA_HOME_DIR'
ORDER BY variable_name;
-- Dump all databases, there should be none
......
......@@ -226,14 +226,6 @@ INSERT INTO global_suppressions VALUES
("Slave I/O: Notifying master by SET @master_binlog_checksum= @@global.binlog_checksum failed with error.*"),
("Slave I/O: Setting master-side filtering of @@skip_replication failed with error:.*"),
("Slave I/O: Setting @mariadb_slave_capability failed with error:.*"),
/*
Galera-related warnings.
*/
("WSREP: Could not open saved state file for reading: .*"),
("WSREP: last inactive check more than .* skipping check"),
("WSREP: Gap in state sequence. Need state transfer."),
("WSREP: Failed to prepare for incremental state transfer: .*"),
("THE_LAST_SUPPRESSION")||
......
# To be used in a test which should be skipped if server is compiled with wsrep
# support (-DWITH_WSREP=ON) and wsrep plugin is ACTIVE.
-- require r/not_wsrep.require
disable_query_log;
SELECT VERSION() LIKE '%wsrep%' AS 'HAVE_WSREP';
enable_query_log;
......@@ -861,8 +861,6 @@ sub collect_one_test_case {
# Suite has no config, autodetect which one to use
if ($tinfo->{rpl_test}) {
$config= "suite/rpl/my.cnf";
} elsif ($tinfo->{galera_test}) {
$config= "suite/galera/my.cnf";
} else {
$config= "include/default_my.cnf";
}
......@@ -983,7 +981,6 @@ my $tags_map= {'big_test' => ['big_test', 1],
'master-slave' => ['rpl_test', 1],
'ndb_master-slave' => ['rpl_test', 1, 'ndb_test', 1],
'long_test' => ['long_test', 1],
'galera_init' => ['galera_test', 1],
};
my $tags_regex_string= join('|', keys %$tags_map);
my $tags_regex= qr:include/($tags_regex_string)\.inc:o;
......
......@@ -137,6 +137,8 @@ my $opt_start_exit;
my $start_only;
my $file_wsrep_provider;
our @global_suppressions;
END {
if ( defined $opt_tmpdir_pid and $opt_tmpdir_pid == $$ )
{
......@@ -188,6 +190,7 @@ my @DEFAULT_SUITES= qw(
sys_vars-
unit-
vcol-
wsrep-
);
my $opt_suites;
......@@ -413,7 +416,6 @@ sub main {
check_ndbcluster_support();
check_ssl_support();
check_debug_support();
check_wsrep_support();
if (!$opt_suites) {
$opt_suites= join ',', collect_default_suites(@DEFAULT_SUITES);
......@@ -2399,24 +2401,6 @@ sub environment_setup {
$ENV{'NDB_EXAMPLES_OUTPUT'}= $path_ndb_testrun_log;
}
# ----------------------------------------------------
# Setup env for wsrep
# ----------------------------------------------------
if (have_wsrep()) {
if (defined $ENV{'WSREP_PROVIDER'} ) {
# Nothing needs to be done! WSREP_PROVIDER env is already set & checked;
# will be used.
} else {
$ENV{'WSREP_PROVIDER'}= $file_wsrep_provider;
}
if ($ENV{'WSREP_PROVIDER'} ne "") {
mtr_verbose("WSREP_PROVIDER set to $ENV{'WSREP_PROVIDER'}");
} else {
mtr_verbose("WSREP_PROVIDER isn't available");
}
}
# ----------------------------------------------------
# mysql clients
# ----------------------------------------------------
......@@ -3194,41 +3178,6 @@ sub ndbcluster_start ($) {
return 0;
}
sub have_wsrep() {
my $wsrep_on= $mysqld_variables{'wsrep-on'};
return defined $wsrep_on
}
sub check_wsrep_provider_env {
if (defined $ENV{'WSREP_PROVIDER'}) {
if (mtr_file_exists($ENV{'WSREP_PROVIDER'}) eq "") {
mtr_error("WSREP_PROVIDER env set to an invalid path");
return 0; # error
}
# Ok, WSREP_PROVIDER set to a valid path.
return 1;
}
# Ok, WSREP_PROVIDER not defined.
return 2;
}
sub check_wsrep_support() {
if (have_wsrep())
{
mtr_report(" - binaries built with wsrep patch");
$file_wsrep_provider=
mtr_file_exists("/usr/lib/galera/libgalera_smm.so",
"/usr/lib64/galera/libgalera_smm.so");
if ((check_wsrep_provider_env() == 1) || ($file_wsrep_provider ne "")) {
# Add galera test suites
mtr_report(" - adding wsrep, galera to default test suites");
push @DEFAULT_SUITES, qw(wsrep galera);
}
}
}
sub mysql_server_start($) {
my ($mysqld, $tinfo) = @_;
......@@ -4837,6 +4786,7 @@ sub extract_warning_lines ($$) {
# Perl code.
my @antipatterns =
(
@global_suppressions,
qr/error .*connecting to master/,
qr/Plugin 'ndbcluster' will be forced to shutdown/,
qr/InnoDB: Error: in ALTER TABLE `test`.`t[12]`/,
......@@ -4891,10 +4841,6 @@ sub extract_warning_lines ($$) {
qr|Plugin 'FEEDBACK' registration as a INFORMATION SCHEMA failed|,
qr|'log-bin-use-v1-row-events' is MySQL 5.6 compatible option|,
qr|InnoDB: Setting thread \d+ nice to \d+ failed, current nice \d+, errno 13|, # setpriority() fails under valgrind
# Galera-related warnings.
qr|WSREP:.*down context.*|,
qr|WSREP: Failed to send state UUID:.*|,
qr|WSREP: wsrep_sst_receive_address.*|,
);
my $matched_lines= [];
......
......@@ -1065,93 +1065,6 @@ The following options may be given as the first argument:
-V, --version Output version information and exit.
--wait-timeout=# The number of seconds the server waits for activity on a
connection before closing it
--wsrep-OSU-method[=name]
Method for Online Schema Upgrade
--wsrep-auto-increment-control
To automatically control the assignment of autoincrement
variables
(Defaults to on; use --skip-wsrep-auto-increment-control to disable.)
--wsrep-causal-reads
(DEPRECATED) Setting this variable is equivalent to
setting wsrep_sync_wait READ flag
--wsrep-certify-nonPK
Certify tables with no primary key
(Defaults to on; use --skip-wsrep-certify-nonPK to disable.)
--wsrep-cluster-address=name
Address to initially connect to cluster
--wsrep-cluster-name=name
Name for the cluster
--wsrep-convert-LOCK-to-trx
To convert locking sessions into transactions
--wsrep-data-home-dir=name
home directory for wsrep provider
--wsrep-dbug-option=name
DBUG options to provider library
--wsrep-debug To enable debug level logging
--wsrep-desync To desynchronize the node from the cluster
--wsrep-drupal-282555-workaround
To use a workaround forbad autoincrement value
--wsrep-forced-binlog-format=name
binlog format to take effect over user's choice
--wsrep-load-data-splitting
To commit LOAD DATA transaction after every 10K rows
inserted
(Defaults to on; use --skip-wsrep-load-data-splitting to disable.)
--wsrep-log-conflicts
To log multi-master conflicts
--wsrep-max-ws-rows=#
Max number of rows in write set
--wsrep-max-ws-size=#
Max write set size (bytes)
--wsrep-mysql-replication-bundle=#
mysql replication group commit
--wsrep-node-address=name
Node address
--wsrep-node-incoming-address=name
Client connection address
--wsrep-node-name=name
Node name
--wsrep-notify-cmd=name
--wsrep-on To enable wsrep replication
(Defaults to on; use --skip-wsrep-on to disable.)
--wsrep-provider=name
Path to replication provider library
--wsrep-provider-options=name
provider specific options
--wsrep-recover Recover database state after crash and exit
--wsrep-replicate-myisam
To enable myisam replication
--wsrep-restart-slave
Should MySQL slave be restarted automatically, when node
joins back to cluster
--wsrep-retry-autocommit=#
Max number of times to retry a failed autocommit
statement
--wsrep-slave-FK-checks
Should slave thread do foreign key constraint checks
(Defaults to on; use --skip-wsrep-slave-FK-checks to disable.)
--wsrep-slave-UK-checks
Should slave thread do secondary index uniqueness checks
--wsrep-slave-threads=#
Number of slave appliers to launch
--wsrep-sst-auth=name
Authentication for SST connection
--wsrep-sst-donor=name
preferred donor node for the SST
--wsrep-sst-donor-rejects-queries
Reject client queries when donating state snapshot
transfer
--wsrep-sst-method=name
State snapshot transfer method
--wsrep-sst-receive-address=name
Address where node is waiting for SST contact
--wsrep-start-position=name
global transaction position to start from
--wsrep-sync-wait[=#]
Ensure "synchronous" read view before executing an
operation of the type specified by bitmask: 1 -
READ(includes SELECT, SHOW and BEGIN/START TRANSACTION);
2 - UPDATE and DELETE; 4 - INSERT and REPLACE
Variables (--variable-name=value)
allow-suspicious-udfs FALSE
......@@ -1451,44 +1364,6 @@ use-stat-tables NEVER
userstat FALSE
verbose TRUE
wait-timeout 28800
wsrep-OSU-method TOI
wsrep-auto-increment-control TRUE
wsrep-causal-reads FALSE
wsrep-certify-nonPK TRUE
wsrep-cluster-address
wsrep-cluster-name my_wsrep_cluster
wsrep-convert-LOCK-to-trx FALSE
wsrep-data-home-dir
wsrep-dbug-option
wsrep-debug FALSE
wsrep-desync FALSE
wsrep-drupal-282555-workaround FALSE
wsrep-forced-binlog-format NONE
wsrep-load-data-splitting TRUE
wsrep-log-conflicts FALSE
wsrep-max-ws-rows 131072
wsrep-max-ws-size 1073741824
wsrep-mysql-replication-bundle 0
wsrep-node-address
wsrep-node-incoming-address AUTO
wsrep-notify-cmd
wsrep-on FALSE
wsrep-provider none
wsrep-provider-options
wsrep-recover FALSE
wsrep-replicate-myisam FALSE
wsrep-restart-slave FALSE
wsrep-retry-autocommit 1
wsrep-slave-FK-checks TRUE
wsrep-slave-UK-checks FALSE
wsrep-slave-threads 1
wsrep-sst-auth (No default value)
wsrep-sst-donor
wsrep-sst-donor-rejects-queries FALSE
wsrep-sst-method rsync
wsrep-sst-receive-address AUTO
wsrep-start-position 00000000-0000-0000-0000-000000000000:-1
wsrep-sync-wait 0
To see what values a running MySQL server is using, type
'mysqladmin variables' instead of 'mysqld --verbose --help'.
......@@ -2,8 +2,10 @@
# (i.e. wsrep_on=ON). It includes have_wsrep.inc.
--source include/have_wsrep.inc
--source include/have_innodb.inc
if (`SELECT COUNT(*)=0 FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME = 'wsrep_on' AND VARIABLE_VALUE='ON'`)
{
--skip Test requires wsrep_on=ON
}
# Use default setting for mysqld processes
!include include/default_mysqld.cnf
[mysqld.1]
[mysqld]
wsrep-on=1
binlog-format=row
#galera_port=OPT.port
#sst_port=OPT.port
innodb-autoinc-lock-mode=2
innodb-locks-unsafe-for-binlog=1
wsrep-cluster-address=gcomm://
wsrep_provider=@ENV.WSREP_PROVIDER
wsrep_cluster_address='gcomm://'
wsrep_provider_options='base_port=@mysqld.1.#galera_port'
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
# enforce read-committed characteristics across the cluster
wsrep_causal_reads=ON
[mysqld.1]
#galera_port=@OPT.port
#sst_port=@OPT.port
wsrep_provider_options='base_port=@mysqld.1.#galera_port'
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
[mysqld.2]
binlog-format=row
#galera_port=OPT.port
#sst_port=OPT.port
wsrep_provider=@ENV.WSREP_PROVIDER
#galera_port=@OPT.port
#sst_port=@OPT.port
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
wsrep_provider_options='base_port=@mysqld.2.#galera_port'
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
# enforce read-committed characteristics across the cluster
wsrep_causal_reads=ON
[ENV]
NODE_MYPORT_1= @mysqld.1.port
......
package My::Suite::WSREP;
use File::Basename;
use My::Find;
@ISA = qw(My::Suite);
return "Not run for embedded server" if $::opt_embedded_server;
return "WSREP is not compiled in" unless defined $::mysqld_variables{'wsrep-on'};
my ($provider) = grep { -f $_ } $ENV{WSREP_PROVIDER},
"/usr/lib/galera/libgalera_smm.so",
"/usr/lib64/galera/libgalera_smm.so";
return "No wsrep provider library" unless -f $provider;
$ENV{WSREP_PROVIDER} = $provider;
my ($path) = grep { -f "$_/wsrep_sst_rsync"; } "$::bindir/scripts", $::path_client_bindir;
return "No SST scripts" unless $path;
push @::global_suppressions,
(
qr(WSREP:.*down context.*),
qr(WSREP: Failed to send state UUID:.*),
qr(WSREP: wsrep_sst_receive_address.*),
qr(WSREP: Could not open saved state file for reading: .*),
qr(WSREP: last inactive check more than .* skipping check),
qr(WSREP: Gap in state sequence. Need state transfer.),
qr(WSREP: Failed to prepare for incremental state transfer: .*),
);
$ENV{PATH}="$path:$ENV{PATH}";
bless { };
--binlog-format=row --innodb_autoinc_lock_mode=2 --innodb_locks_unsafe_for_binlog=1 --wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep_provider_options='base_port=$GALERA_BASE_PORT' --wsrep-on=1 --log-bin
--log-bin
--binlog-format=row --innodb_autoinc_lock_mode=2 --innodb_locks_unsafe_for_binlog=1 --wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --wsrep_provider_options='base_port=$GALERA_BASE_PORT' --thread_handling=pool-of-threads
--thread_handling=pool-of-threads
--source include/have_wsrep.inc
--source include/have_wsrep_enabled.inc
--echo
--echo #
......
--source include/galera_cluster.inc
--source include/have_innodb.inc
--echo #
--echo # MDEV#5552 Deadlock when inserting NULL column value in column with
......@@ -20,14 +19,12 @@ SELECT * FROM test.t1;
--connection node_2
SELECT * FROM test.t1;
--echo
--echo # On node_1
--connection node_1
INSERT INTO t1 VALUES (1);
UPDATE t1 SET c1=NULL WHERE c1=1;
SELECT * FROM test.t1;
--echo
--echo # On node_2
--connection node_2
......
......@@ -4,7 +4,6 @@
--source include/not_embedded.inc
--source include/have_perfschema.inc
--source include/platform.inc
--source include/not_wsrep.inc
#
# force lower-case-table-names=1 (linux/macosx have different defaults)
......@@ -23,7 +22,7 @@ perl;
log-slow-queries pid-file slow-query-log-file log-basename
datadir slave-load-tmpdir tmpdir socket thread-pool-size
large-files-support lower-case-file-system system-time-zone
wsrep-node-name version.*/;
version.*/;
# Plugins which may or may not be there:
@plugins=qw/innodb ndb archive blackhole federated partition ndbcluster
......@@ -31,7 +30,7 @@ perl;
thread-concurrency super-large-pages mutex-deadlock-detector
connect null-audit aria oqgraph sphinx thread-handling
test-sql-discovery rpl-semi-sync query-cache-info
query-response-time metadata-lock-info locales/;
query-response-time metadata-lock-info locales wsrep/;
# And substitute the content some environment variables with their
# names:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment