Commit 7f19330c authored by Sergei Golubchik's avatar Sergei Golubchik

Merge branch 'github/10.0-galera' into 10.1

parents 4046ed12 f4421c89
......@@ -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 "10")
SET(WSREP_PATCH_VERSION "11")
# Obtain wsrep API version
FILE(STRINGS "${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h" WSREP_API_VERSION
......
......@@ -17,6 +17,9 @@ set -e
set -u
${DEBIAN_SCRIPT_DEBUG:+ set -v -x}
# Prevent Debian's init scripts from calling systemctl
_SYSTEMCTL_SKIP_REDIRECT=true
test -x /usr/sbin/mysqld || exit 0
. /lib/lsb/init-functions
......@@ -179,8 +182,15 @@ case "${1:-''}" in
fi
;;
'bootstrap')
# Bootstrap the cluster, start the first node
# that initiates the cluster
log_daemon_msg "Bootstrapping the cluster" "mysqld"
$SELF start "${@:2}" --wsrep-new-cluster
;;
*)
echo "Usage: $SELF start|stop|restart|reload|force-reload|status"
echo "Usage: $SELF start|stop|restart|reload|force-reload|status|bootstrap"
exit 1
;;
esac
......
......@@ -39,6 +39,7 @@ let $wait_timeout= 0;
let $wait_condition_reps= 0;
while ($wait_counter)
{
--error 0,ER_NO_SUCH_TABLE,ER_LOCK_WAIT_TIMEOUT,ER_UNKNOWN_COM_ERROR
let $success= `$wait_condition`;
inc $wait_condition_reps;
if ($success)
......
......@@ -319,7 +319,7 @@ sub parse_disabled {
chomp;
next if /^\s*#/ or /^\s*$/;
mtr_error("Syntax error in $filename line $.")
unless /^\s*(?:([-0-9A-Za-z_\/]+)\.)?([-0-9A-Za-z_]+)\s*:\s*(.*?)\s*$/;
unless /^\s*(?:([-0-9A-Za-z_\/]+)\.)?([-0-9A-Za-z_#]+)\s*:\s*(.*?)\s*$/;
mtr_error("Wrong suite name in $filename line $.")
if defined $1 and defined $suitename and $1 ne $suitename;
$disabled{($1 || $suitename || '') . ".$2"} = $3;
......
......@@ -354,6 +354,7 @@ my $opt_max_save_datadir= env_or_val(MTR_MAX_SAVE_DATADIR => 20);
my $opt_max_test_fail= env_or_val(MTR_MAX_TEST_FAIL => 10);
my $opt_parallel= $ENV{MTR_PARALLEL} || 1;
my $opt_port_group_size = $ENV{MTR_PORT_GROUP_SIZE} || 10;
# lock file to stop tests
my $opt_stop_file= $ENV{MTR_STOP_FILE};
......@@ -1116,6 +1117,7 @@ sub command_line_setup {
# Specify ports
'build-thread|mtr-build-thread=i' => \$opt_build_thread,
'port-base|mtr-port-base=i' => \$opt_port_base,
'port-group-size=s' => \$opt_port_group_size,
# Test case authoring
'record' => \$opt_record,
......@@ -1806,16 +1808,16 @@ sub set_build_thread_ports($) {
$ENV{MTR_BUILD_THREAD}= $build_thread;
# Calculate baseport
$baseport= $build_thread * 20 + 10000;
if ( $baseport < 5001 or $baseport + 19 >= 32767 )
$baseport= $build_thread * $opt_port_group_size + 10000;
if ( $baseport < 5001 or $baseport + $opt_port_group_size >= 32767 )
{
mtr_error("MTR_BUILD_THREAD number results in a port",
"outside 5001 - 32767",
"($baseport - $baseport + 19)");
"($baseport - $baseport + $opt_port_group_size)");
}
mtr_report("Using MTR_BUILD_THREAD $build_thread,",
"with reserved ports $baseport..".($baseport+19));
"with reserved ports $baseport..".($baseport+($opt_port_group_size-1)));
}
......@@ -2969,8 +2971,8 @@ sub kill_leftovers ($) {
sub check_ports_free ($)
{
my $bthread= shift;
my $portbase = $bthread * 10 + 10000;
for ($portbase..$portbase+9){
my $portbase = $bthread * $opt_port_group_size + 10000;
for ($portbase..$portbase+($opt_port_group_size-1)){
if (mtr_ping_port($_)){
mtr_report(" - 'localhost:$_' was not free");
return 0; # One port was not free
......@@ -6066,6 +6068,8 @@ Options that specify ports
build-thread=# Can be set in environment variable MTR_BUILD_THREAD.
Set MTR_BUILD_THREAD="auto" to automatically aquire
a build thread id that is unique to current host
port-group-size=N Reserve groups of TCP ports of size N for each MTR thread
Options for test case authoring
......
......@@ -18,3 +18,9 @@ wpjhYxVxGFOx1ITN3jED64lUfoLHvR6NFbESYKAuAAzSNqX4HOQ3uGk2THM8JocZ
oH2+38d81Kd4HQ7DDDKS/isG0+rR60Ti1cMgu7OT7p1dZCwT/KQuI5eGjE9lubkc
yAJjaod4rVLdBri3XVvtySfS2+/75qUgv2TF7d/s7mxMq4DDt29yeKSUhZCs
-----END CERTIFICATE-----
-----BEGIN DH PARAMETERS-----
MIGHAoGBAJWyvKjE+s7OP4Lj1jXKGlJGWT4Vd5YaxPljihTsRe1aXkWAgsuwISXk
/TQ8Rx5Zmze7rtwtU0PoYxvuam9FMXYqhw2dVe4qRdeSX78DSiL/YBkQzaxlfWVy
RE9+9dzHbCtRVDlN7K1kA+mGWH4/r7NAu4Qm/003V0NTtMwQSqebAgEC
-----END DH PARAMETERS-----
-----BEGIN CERTIFICATE-----
MIIDWTCCAkGgAwIBAgIJAIlW4JmZGnU4MA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
BAYTAkZJMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
Q29tcGFueSBMdGQwIBcNMTQxMDI0MDc1MTU1WhgPMzAxNDAyMjQwNzUxNTVaMEIx
CzAJBgNVBAYTAkZJMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0Rl
ZmF1bHQgQ29tcGFueSBMdGQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
AQDDzU6xLZDD5rZENsOpTpTmqS8YisBaefU3ZeN7VJepZZ/7unM/1YLGJtuRh2Qa
MyTkvyjzf7bSFsDt9L5lfQwBBblVeWkrCvGnQmHDQQYB7JrSmFDPz9W9Mxf9Q2BW
B3lcoKXXJgMnWw0WGrt0lEdFp9gWbq8H9hwJdjpyyk4ZTIuucSOD4JUP3QFEhYU5
kdcIbDRVw81J4eAZ6EdvbjDN05S7qWjW7rJTnCHAHEd18hcsMGwjpwhjEaSdhMrM
mhOeL8kuQV0fI8v2xfYBliIn9xBZGOVzySPzwFmQceORlW6F3V5w6mwFkmuXqXWX
Qo98swTu7mb89qVYmR71d3L3AgMBAAGjUDBOMB0GA1UdDgQWBBRdWet/kGNTyvXK
wuBdP/eSldOgWjAfBgNVHSMEGDAWgBRdWet/kGNTyvXKwuBdP/eSldOgWjAMBgNV
HRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQCcJpP+DR4AJxVelNTSZa+V38c+
jgrMD2Ku2eU8NQlsjgMfNEU5Md/g7FpP8aCFzVf0kAAT7DxZmSE3uWXQbMXyVJmy
bF+qXinf71QzdWULm6sASoshC6wbHnXL9ZjWQ3gh1nqVgo3MmLQYrb3eJfKaaLoc
wpjhYxVxGFOx1ITN3jED64lUfoLHvR6NFbESYKAuAAzSNqX4HOQ3uGk2THM8JocZ
oH2+38d81Kd4HQ7DDDKS/isG0+rR60Ti1cMgu7OT7p1dZCwT/KQuI5eGjE9lubkc
yAJjaod4rVLdBri3XVvtySfS2+/75qUgv2TF7d/s7mxMq4DDt29yeKSUhZCs
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIDVzCCAj+gAwIBAgIJALBO5bqmtlYkMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
BAYTAkZJMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
Q29tcGFueSBMdGQwHhcNMTUwNjI2MDcxMjQ1WhcNMjUwNTA0MDcxMjQ1WjBCMQsw
CQYDVQQGEwJGSTEVMBMGA1UEBwwMRGVmYXVsdCBDaXR5MRwwGgYDVQQKDBNEZWZh
dWx0IENvbXBhbnkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
1DlcztIzSngGeTUFibj9GZ4ZO78ASpgYySZv/DRIVn/3hbF41ZRD/6uJlb5rf1R7
fpFsurbXNDDxeap7b/Gz2XSQy96Dbm0SbsFSZttV/R2WtlT1Wf5n9ix6RLqhKSbg
nPyL2fsDaxtZh2uywGJEXhwXFtdx3deIo/tYivDfl5Tcsv0NnZY8Vg0boBRP+FEn
ReJOdSa5LLn+QJN2Xa+wutbLHe0hI6huKUXU2YUeBfgyk1nWol5241ZUDCgDsoaW
8r2YeJNHmNInd3wERbqFgFHsR4N1+Atcyrfn/uQSj9zrTPO/Pp51KpjWf/gjxjXP
biu5De50qZ4+U4no20EIOwIDAQABo1AwTjAdBgNVHQ4EFgQU3kSPGchrOoQJ5gq1
mmV2HEra6GswHwYDVR0jBBgwFoAU3kSPGchrOoQJ5gq1mmV2HEra6GswDAYDVR0T
BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAfoBD64FJ9fAR19+vwueFGmpWNIqF
PzN7QmEpCMduV3DXuxYO73q2ikXgrVO5HWFz9IjNvzXbSRmWNzJGaZ3QYZ+Xx1JJ
8MrAOUr6djWuyD659f64dh/2jMxiQNoEHrknXm9HSqR5oJVwndFyr/zvSkYSRexE
KFciIprb9LOba9G3ZMBYBdqK+f3Ky16BMjaD6XfaTx+xjHk/8peSueXIQl+v2biz
zSfpEUa0dKCIxckrzD4JknDHFimTsrzlRftcg8t8piOXwZomFcnVunyGs2bJ/Npj
25c2e6sx7XSc5bUgPGuQcSGflZPLg9zWyJ69sVYUNAz+gqfvWfOOJuzPNg==
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIDVzCCAj+gAwIBAgIJALBO5bqmtlYkMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV
BAYTAkZJMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQg
Q29tcGFueSBMdGQwHhcNMTUwNjI2MDcxMjQ1WhcNMjUwNTA0MDcxMjQ1WjBCMQsw
CQYDVQQGEwJGSTEVMBMGA1UEBwwMRGVmYXVsdCBDaXR5MRwwGgYDVQQKDBNEZWZh
dWx0IENvbXBhbnkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
1DlcztIzSngGeTUFibj9GZ4ZO78ASpgYySZv/DRIVn/3hbF41ZRD/6uJlb5rf1R7
fpFsurbXNDDxeap7b/Gz2XSQy96Dbm0SbsFSZttV/R2WtlT1Wf5n9ix6RLqhKSbg
nPyL2fsDaxtZh2uywGJEXhwXFtdx3deIo/tYivDfl5Tcsv0NnZY8Vg0boBRP+FEn
ReJOdSa5LLn+QJN2Xa+wutbLHe0hI6huKUXU2YUeBfgyk1nWol5241ZUDCgDsoaW
8r2YeJNHmNInd3wERbqFgFHsR4N1+Atcyrfn/uQSj9zrTPO/Pp51KpjWf/gjxjXP
biu5De50qZ4+U4no20EIOwIDAQABo1AwTjAdBgNVHQ4EFgQU3kSPGchrOoQJ5gq1
mmV2HEra6GswHwYDVR0jBBgwFoAU3kSPGchrOoQJ5gq1mmV2HEra6GswDAYDVR0T
BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAfoBD64FJ9fAR19+vwueFGmpWNIqF
PzN7QmEpCMduV3DXuxYO73q2ikXgrVO5HWFz9IjNvzXbSRmWNzJGaZ3QYZ+Xx1JJ
8MrAOUr6djWuyD659f64dh/2jMxiQNoEHrknXm9HSqR5oJVwndFyr/zvSkYSRexE
KFciIprb9LOba9G3ZMBYBdqK+f3Ky16BMjaD6XfaTx+xjHk/8peSueXIQl+v2biz
zSfpEUa0dKCIxckrzD4JknDHFimTsrzlRftcg8t8piOXwZomFcnVunyGs2bJ/Npj
25c2e6sx7XSc5bUgPGuQcSGflZPLg9zWyJ69sVYUNAz+gqfvWfOOJuzPNg==
-----END CERTIFICATE-----
-----BEGIN PRIVATE KEY-----
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDUOVzO0jNKeAZ5
NQWJuP0Znhk7vwBKmBjJJm/8NEhWf/eFsXjVlEP/q4mVvmt/VHt+kWy6ttc0MPF5
qntv8bPZdJDL3oNubRJuwVJm21X9HZa2VPVZ/mf2LHpEuqEpJuCc/IvZ+wNrG1mH
a7LAYkReHBcW13Hd14ij+1iK8N+XlNyy/Q2dljxWDRugFE/4USdF4k51Jrksuf5A
k3Zdr7C61ssd7SEjqG4pRdTZhR4F+DKTWdaiXnbjVlQMKAOyhpbyvZh4k0eY0id3
fARFuoWAUexHg3X4C1zKt+f+5BKP3OtM878+nnUqmNZ/+CPGNc9uK7kN7nSpnj5T
iejbQQg7AgMBAAECggEBAJ4m7VG3db+uOGzFJY5fzEX1+qn6ibYNKJNmUJfrQmkr
zgLUoc7QQehbJhnwoN1v0OQebZ+rOC7NtnZLpNdkkPmhk3JKLTnykIT3DnhWRftt
vG2+XGUnYMQkmy1ywz0Omt6CmZnlJMQByrNPgBM8Z+SWHGLKRTHkOBCz82T/YjDr
wqug1Yv6W0wMNM/cikgoBldVG7hABCJuShjffIbUgVysK3dEPNywNAC78neoGECm
evPZOaIkWEr86SpAlwA6Yh+zTQZ03CXATcGonJdWJ015DvlKRv6QyRR0Q/Y1ONwb
f115kll15MJBEspFdSyhlMcVJlwO8WMaZ2qIzlQZmdECgYEA//P469QzX00L/urK
7IRvtSVu5CP/A/Wui90U4KoP7XgXIeExnEtzLVs1K7vjuzdpTyq+68XuC40gPcJW
RvoX229m6gRV8nC53UiV71jM8IvkyEqFYT/gfZC9KQCMSRJLtVnDMpZ3gMxAY6/5
p20o616Au8DKFFetQV0aD4Hj1/MCgYEA1ENV1WkgvN6yItB77E9kN/vbKLRh0hrg
9xj0SmMXGYyDM9NpjbgbgJIZo3ukkBtp3kEY8P9JQZRcd1EcnnSrwTB7ChdInWkR
m/LpIZBEMqNQbeu4QSzZYYS6z4tcGGx43aHqzzNBZdnQnqhYL1CvlLwhkgX6oQCo
woXqyfMNKJkCgYEA63gD1NGPwWkcVBSlQxpDup8JeZE0Fux6++kUP+u0Y39LqLuH
7IXtHBkAvY9JXv8HPvHQWw/og2/97VNQFFQYhqPiRgBfIX9bPpx8c4l6YQISI8GL
G4CsglgZ7hK2/LJ8PAascWnD3xYJVqyaPNFMB90VCaW/Qx+2IKAKTaHtfskCgYBu
1f5C4pMqrCpeTXj4Cvis1wE4PwB5QnnH7SrakOVl/N4huLn8O2948lEa8Zwbd4UP
ffR1Gwh4iuzBjQQhpZBt30/QFBphv5RnVy7uzLMfsfF0hEqBFdcoubMGXqGnSzTN
nhfLO9thQJxTzFnH0xzr0FTDOAYH/h0g/eZ8r0JmuQKBgQDjhXM+hJ3Pkwua+Fnl
nZfY5MeSzkJki/9iwVo8rSDwmZS9Nsc83oZnddM7c2x63t+zYOAcMxsVCiByMDzo
5IB781HWRBGcU8TnW1b0bAnZimjKp/qsZ/Szr38rvImqG8TjzbcSD7w0SpyRQ/Ot
A7SZFkWYfem8/q/VImjU/CNbOQ==
-----END PRIVATE KEY-----
......@@ -19,3 +19,11 @@ 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_forced_binlog_format : TODO: investigate
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
......@@ -18,6 +18,10 @@ server-id=1
#sst_port=@OPT.port
wsrep-on=1
log-bin
log-slave-updates
innodb-autoinc-lock-mode=2
default-storage-engine=innodb
wsrep-provider=@ENV.WSREP_PROVIDER
......@@ -38,6 +42,10 @@ server-id=2
#sst_port=@OPT.port
wsrep-on=1
log-bin
log-slave-updates
innodb-autoinc-lock-mode=2
default-storage-engine=innodb
wsrep-provider=@ENV.WSREP_PROVIDER
......@@ -59,8 +67,8 @@ NODE_MYSOCK_1= @mysqld.1.socket
NODE_MYPORT_2= @mysqld.2.port
NODE_MYSOCK_2= @mysqld.2.socket
NODE_MYPORT_3= @mysqld.2.port
NODE_MYSOCK_3= @mysqld.2.socket
NODE_MYPORT_3= @mysqld.3.port
NODE_MYSOCK_3= @mysqld.3.socket
NODE_GALERAPORT_2= @mysqld.2.#galera_port
NODE_GALERAPORT_3= @mysqld.3.#galera_port
......
#
# This .cnf file creates a setup with 1 standard MySQL server, followed by a 2-node Galera cluster
#
# Use default setting for mysqld processes
!include include/default_mysqld.cnf
[mysqld]
log-slave-updates
log-bin=mysqld-bin
binlog-format=row
[mysqld.1]
server-id=1
[mysqld.2]
server-id=2
wsrep_provider=@ENV.WSREP_PROVIDER
wsrep_cluster_address='gcomm://'
wsrep_provider_options='base_port=@mysqld.2.#galera_port;evs.install_timeout = PT15S; evs.max_install_timeouts=1;'
# enforce read-committed characteristics across the cluster
wsrep_causal_reads=ON
wsrep_sync_wait = 7
wsrep_node_address=127.0.0.1
wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
# Required for Galera
innodb_autoinc_lock_mode=2
innodb_flush_log_at_trx_commit=2
[mysqld.3]
wsrep_provider=@ENV.WSREP_PROVIDER
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.2.#galera_port'
wsrep_provider_options='base_port=@mysqld.3.#galera_port;evs.install_timeout = PT15S; evs.max_install_timeouts = 1;'
# enforce read-committed characteristics across the cluster
wsrep_causal_reads=ON
wsrep_sync_wait = 7
wsrep_node_address=127.0.0.1
wsrep_sst_receive_address=127.0.0.2:@mysqld.3.#sst_port
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
# Required for Galera
innodb_autoinc_lock_mode=2
innodb_flush_log_at_trx_commit=2
[mysqld.4]
wsrep_provider=@ENV.WSREP_PROVIDER
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.2.#galera_port'
wsrep_provider_options='base_port=@mysqld.4.#galera_port;evs.install_timeout = PT15S; evs.max_install_timeouts = 1;'
# enforce read-committed characteristics across the cluster
wsrep_causal_reads=ON
wsrep_sync_wait = 7
wsrep_node_address=127.0.0.1
wsrep_sst_receive_address=127.0.0.2:@mysqld.4.#sst_port
wsrep_node_incoming_address=127.0.0.1:@mysqld.4.port
# Required for Galera
innodb_autoinc_lock_mode=2
innodb_flush_log_at_trx_commit=2
[ENV]
NODE_MYPORT_1= @mysqld.1.port
NODE_MYSOCK_1= @mysqld.1.socket
NODE_MYPORT_2= @mysqld.2.port
NODE_MYSOCK_2= @mysqld.2.socket
NODE_MYPORT_3= @mysqld.3.port
NODE_MYSOCK_3= @mysqld.3.socket
NODE_MYPORT_3= @mysqld.4.port
NODE_MYSOCK_3= @mysqld.4.socket
NODE_GALERAPORT_2= @mysqld.2.#galera_port
NODE_GALERAPORT_3= @mysqld.3.#galera_port
NODE_GALERAPORT_4= @mysqld.4.#galera_port
NODE_SSTPORT_2= @mysqld.2.#sst_port
NODE_SSTPORT_3= @mysqld.3.#sst_port
NODE_SSTPORT_4= @mysqld.4.#sst_port
......@@ -6,12 +6,13 @@
--connection node_1
# We need a user with a password to perform SST, otherwise we hit LP #1378253
GRANT ALL PRIVILEGES ON *.* TO 'sst' IDENTIFIED BY 'sst';
GRANT ALL PRIVILEGES ON *.* TO 'sst';
--let $wsrep_sst_auth_orig = `SELECT @@wsrep_sst_auth`
SET GLOBAL wsrep_sst_auth = 'sst:sst';
SET GLOBAL wsrep_sst_auth = 'sst:';
--connection node_2
--source include/wait_until_connected_again.inc
--let $wsrep_sst_method_orig = `SELECT @@wsrep_sst_method`
--let $wsrep_sst_receive_address_orig = `SELECT @@wsrep_sst_receive_address`
......
--echo Killing server ...
# Write file to make mysql-test-run.pl expect the crash, but don't start it
--source include/wait_until_connected_again.inc
--let $_server_id= `SELECT @@server_id`
--let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.$_server_id.expect
--exec echo "wait" > $_expect_file_name
......
SET SESSION wsrep_sync_wait = 0;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
FLUSH TABLE t1 WITH READ LOCK;
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
SET SESSION wsrep_sync_wait = 0;
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
UNLOCK TABLES;
SET SESSION wsrep_sync_wait = 7;
SELECT COUNT(*) = 2 FROM t1;
COUNT(*) = 2
1
DROP TABLE t1;
SET SESSION wsrep_sync_wait = 0;
SET SESSION lock_wait_timeout = 60;
SET SESSION innodb_lock_wait_timeout=60;
SET SESSION wait_timeout=60;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
FLUSH TABLE t1 WITH READ LOCK;
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
SELECT 1 FROM DUAL;
1
1
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'Waiting for table metadata lock';
COUNT(*) = 1
1
UNLOCK TABLES;
SET SESSION wsrep_sync_wait = 7;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` int(11) NOT NULL,
`f2` int(11) DEFAULT NULL,
PRIMARY KEY (`f1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'Waiting for table metadata lock';
COUNT(*) = 0
1
DROP TABLE t1;
......@@ -12,3 +12,4 @@ COUNT(*) = 3
DROP TABLE t1;
STOP SLAVE;
RESET SLAVE ALL;
RESET MASTER;
START SLAVE USER='root';
Warnings:
Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
SET SESSION wsrep_sync_wait = 0;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
expected_error
1
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
START SLAVE;
DROP TABLE t1;
STOP SLAVE;
RESET SLAVE ALL;
CALL mtr.add_suppression("Slave SQL: Error 'Unknown command' on query");
CALL mtr.add_suppression("Slave: Unknown command Error_code: 1047");
CALL mtr.add_suppression("Send action {\\(nil\\), 328, TORDERED} returned -107 \\(Transport endpoint is not connected\\)");
CALL mtr.add_suppression("Slave SQL: Error in Xid_log_event: Commit could not be completed, 'Deadlock found when trying to get lock; try restarting transaction', Error_code: 1213");
CALL mtr.add_suppression("Slave SQL: Node has dropped from cluster, Error_code: 1047");
RESET MASTER;
START SLAVE USER='root';
Warnings:
Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=InnoDB;
SELECT COUNT(DISTINCT f1) = 2 * 100 * 10 * 10 FROM t1;
COUNT(DISTINCT f1) = 2 * 100 * 10 * 10
1
SELECT COUNT(*) = 2 * 100 * 10 * 10 FROM t1;
COUNT(*) = 2 * 100 * 10 * 10
1
SELECT COUNT(DISTINCT f1) = 2 * 100 * 10 * 10 FROM t1;
COUNT(DISTINCT f1) = 2 * 100 * 10 * 10
1
DROP TABLE t1;
DROP TABLE ten;
STOP SLAVE;
RESET SLAVE ALL;
START SLAVE USER='root';
Warnings:
Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) 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);
SELECT COUNT(*) = 4 FROM t1;
COUNT(*) = 4
1
DROP TABLE t1;
STOP SLAVE;
RESET SLAVE ALL;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
CREATE PROCEDURE p1 ()
BEGIN
DECLARE x INT DEFAULT 1;
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
WHILE 1 DO
INSERT INTO t1 VALUES (DEFAULT);
COMMIT;
END WHILE;
END|
CALL p1();;
CALL p1();;
Killing server ...
INSERT INTO t1 VALUES (DEFAULT);
INSERT INTO t1 VALUES (DEFAULT);
Got one of the listed errors
Got one of the listed errors
count_equal
1
CALL mtr.add_suppression("WSREP: Action message in non-primary configuration from member 0");
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE
2
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE
2
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
DROP PROCEDURE p1;
DROP TABLE t1;
CALL mtr.add_suppression("gcs_caused\\(\\) returned -1 \\(Operation not permitted\\)");
CALL mtr.add_suppression("WSREP: Action message in non-primary configuration from member 0");
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
FLUSH TABLES t1 FOR EXPORT;
INSERT INTO t1 VALUES (2);
SET SESSION wsrep_sync_wait = 0;
UNLOCK TABLES;
COMMIT;
SET AUTOCOMMIT=ON;
SELECT * FROM t1;
f1
2
wsrep_local_aborts_increment
1
DROP TABLE t1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
LOCK TABLE t1 WRITE;
INSERT INTO t1 VALUES (1);;
INSERT INTO t1 VALUES (2);
UNLOCK TABLES;
COMMIT;
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
wsrep_local_aborts_increment
1
DROP TABLE t1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=MyISAM;
CREATE TEMPORARY TABLE t2 (f1 INTEGER) ENGINE=MyISAM;
CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB;
CREATE TEMPORARY TABLE t4 (f1 INTEGER) ENGINE=InnoDB;
CREATE TABLE t5 (f1 INTEGER);
SET AUTOCOMMIT=OFF;
START TRANSACTION;
DROP TABLE t1, t2, t3, t4;
INSERT INTO t5 VALUES (1);
COMMIT;
SHOW CREATE TABLE t1;
ERROR 42S02: Table 'test.t1' doesn't exist
SHOW CREATE TABLE t2;
ERROR 42S02: Table 'test.t2' doesn't exist
SHOW CREATE TABLE t3;
ERROR 42S02: Table 'test.t3' doesn't exist
SHOW CREATE TABLE t4;
ERROR 42S02: Table 'test.t4' doesn't exist
CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test.t2,test.t4'' on query\. Default database: 'test'\. Query: 'DROP TABLE t1, t2, t3, t4', Error_code: 1051");
DROP TABLE t5;
......@@ -19,6 +19,13 @@ wsrep_last_committed_diff
FLUSH USER_RESOURCES;
wsrep_last_committed_diff
1
FLUSH TABLES;
wsrep_last_committed_diff
1
CREATE TABLE t2 (f1 INTEGER);
FLUSH TABLES t2;
wsrep_last_committed_diff
1
CREATE TABLE t1 (f1 INTEGER);
FLUSH LOGS;
FLUSH TABLES WITH READ LOCK;
......@@ -29,4 +36,19 @@ FLUSH TABLES t1 FOR EXPORT;
UNLOCK TABLES;
wsrep_last_committed_diff
1
LOCK TABLES t1 WRITE;
FLUSH TABLES t1;
UNLOCK TABLES;
wsrep_last_committed_diff
1
LOCK TABLES t1 READ;
FLUSH TABLES t1;
ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
UNLOCK TABLES;
wsrep_last_committed_diff
1
FLUSH TABLES t1;
wsrep_last_committed_diff
1
DROP TABLE t1;
DROP TABLE t2;
RESET MASTER;
SET SESSION binlog_format = 'STATEMENT';
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SET SESSION binlog_format = 'MIXED';
INSERT INTO t1 VALUES (2);
SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120;
Log_name Pos Event_type Server_id End_log_pos Info
mysqld-bin.000001 <Pos> Query 1 <End_log_pos> use `test`; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB
mysqld-bin.000001 <Pos> Query 1 <End_log_pos> BEGIN
mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
mysqld-bin.000001 <Pos> Write_rows 1 <End_log_pos> table_id: ### flags: STMT_END_F
mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
mysqld-bin.000001 <Pos> Query 1 <End_log_pos> BEGIN
mysqld-bin.000001 <Pos> Table_map 1 <End_log_pos> table_id: ### (test.t1)
mysqld-bin.000001 <Pos> Write_rows 1 <End_log_pos> table_id: ### flags: STMT_END_F
mysqld-bin.000001 <Pos> Xid 1 <End_log_pos> COMMIT /* xid=### */
DROP TABLE t1;
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
INSERT INTO t1 VALUES (1);
SET SESSION wsrep_sync_wait = 0;
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
FLUSH TABLES WITH READ LOCK;;
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
SET SESSION lock_wait_timeout = 1;
SET SESSION innodb_lock_wait_timeout=1;
SET SESSION wait_timeout=1;
INSERT INTO t2 VALUES (2);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
UNLOCK TABLES;
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
INSERT INTO t1 VALUES (3);
SELECT COUNT(*) = 2 FROM t1;
COUNT(*) = 2
1
DROP TABLE t1;
......@@ -4,13 +4,13 @@ CREATE TABLE t1 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 VARCHAR(100), FULLTEXT (f
SELECT COUNT(*) = 13 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE name LIKE 'test/%';
COUNT(*) = 13
1
INSERT INTO t1 (f2) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
SELECT COUNT(f2) = 10000 FROM t1 WHERE MATCH(f2) AGAINST ('foobarbaz');
COUNT(f2) = 10000
INSERT INTO t1 (f2) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3;
SELECT COUNT(f2) = 1000 FROM t1 WHERE MATCH(f2) AGAINST ('foobarbaz');
COUNT(f2) = 1000
1
UPDATE t1 SET f2 = 'abcdefjhk';
SELECT COUNT(f2) = 10000 FROM t1 WHERE MATCH(f2) AGAINST ('abcdefjhk');
COUNT(f2) = 10000
SELECT COUNT(f2) = 1000 FROM t1 WHERE MATCH(f2) AGAINST ('abcdefjhk');
COUNT(f2) = 1000
1
DROP TABLE t1;
CREATE TABLE t1 (f1 VARCHAR(100), FULLTEXT (f1)) ENGINE=InnoDB;
......
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
SET GLOBAL wsrep_provider_options = 'gcs.fc_limit=1';
FLUSH TABLES WITH READ LOCK;
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (5);
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'query end' AND INFO = 'INSERT INTO t1 VALUES (5)';
COUNT(*) = 1
1
UNLOCK TABLES;
INSERT INTO t1 VALUES (6);
SELECT COUNT(*) = 6 FROM t1;
......
SET SESSION wsrep_on=OFF;
CREATE TABLE t1 (f1 INTEGER);
CREATE TABLE t1 (f1 INTEGER);
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
<ISO TIMESTAMP> server id 2 end_log_pos 120 Start: binlog v 4, server v 5.6.24-debug-log created 150804 11:37:14 at startup
# Warning: this binlog is either in use or was not closed properly.
ROLLBACK/*!*/;
BINLOG '
unnAVQ8CAAAAdAAAAHgAAAABAAQANS42LjI0LWRlYnVnLWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAC6ecBVEzgNAAgAEgAEBAQEEgAAXAAEGggAAAAICAgCAAAACgoKGRkAAKNu
Jfk=
'/*!*/;
# at 120
<ISO TIMESTAMP> server id 1 end_log_pos 91 Query thread_id=<QUERY_THREAD_ID> exec_time=0 error_code=0
use `test`/*!*/;
SET TIMESTAMP=<TIMESTAMP>/*!*/;
SET @@session.pseudo_thread_id=<PSEUDO_THREAD_ID>/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=1073741824/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (f1 INTEGER)
/*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
SET SESSION wsrep_on=ON;
CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query");
DROP TABLE t1;
Setting SST method to mysqldump ...
GRANT ALL PRIVILEGES ON *.* TO 'sst' IDENTIFIED BY 'sst';
SET GLOBAL wsrep_sst_auth = 'sst:sst';
GRANT ALL PRIVILEGES ON *.* TO 'sst';
SET GLOBAL wsrep_sst_auth = 'sst:';
SET GLOBAL wsrep_sst_method = 'mysqldump';
Performing State Transfer on a server that has been shut down cleanly and restarted
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
......
Got one of the listed errors
Got one of the listed errors
Got one of the listed errors
Got one of the listed errors
SET SESSION innodb_lock_wait_timeout=600;
SET SESSION lock_wait_timeout=600;
CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 INTEGER) Engine=InnoDB;
INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
SET SESSION wsrep_sync_wait = 0;
SET SESSION wsrep_sync_wait = 7;
SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT1H';
SELECT COUNT(*) = 100000 FROM t1;
COUNT(*) = 100000
1
......@@ -13,20 +18,6 @@ UPDATE t1 SET f2 = 1;
SELECT COUNT(*) = 200000 FROM t1 WHERE f2 = 1;
COUNT(*) = 200000
1
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
ROLLBACK;
SELECT COUNT(*) = 200000 FROM t1;
COUNT(*) = 200000
1
SELECT COUNT(*) = 200000 FROM t1;
COUNT(*) = 200000
1
SET AUTOCOMMIT=OFF;
START TRANSACTION;
UPDATE t1 SET f2 = 2;
ROLLBACK;
START TRANSACTION;
SELECT COUNT(*) = 200000 FROM t1;
COUNT(*) = 200000
......
......@@ -21,9 +21,9 @@ SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N
VARIABLE_VALUE = 1
1
INSERT INTO t1 VALUES (6);
GRANT ALL PRIVILEGES ON *.* TO 'sst' IDENTIFIED BY 'sst';
SET GLOBAL wsrep_sst_auth = 'sst:sst';
GRANT ALL PRIVILEGES ON *.* TO 'sst' IDENTIFIED BY 'sst';
GRANT ALL PRIVILEGES ON *.* TO 'sst';
SET GLOBAL wsrep_sst_auth = 'sst:';
GRANT ALL PRIVILEGES ON *.* TO 'sst';
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1
......
......@@ -13,13 +13,13 @@ INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
SELECT COUNT(*) = 6 FROM t1;
COUNT(*) = 6
1
SELECT COUNT(*) = 6 FROM t2;
COUNT(*) = 6
1
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'closing tables';
SELECT COUNT(*) = 10 FROM t1;
COUNT(*) = 10
0
SELECT COUNT(*) = 10 FROM t2;
COUNT(*) = 10
0
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'committed%';
COUNT(*) = 2
1
SET GLOBAL wsrep_slave_threads = 1;;
......
CREATE TABLE t1 (f1 CHAR(5)) ENGINE=InnoDB;
CREATE TABLE t2 (f1 CHAR(5)) ENGINE=InnoDB;
CREATE TABLE t3 (f1 CHAR(5)) ENGINE=InnoDB;
CREATE TABLE t4 (f1 CHAR(5)) ENGINE=InnoDB;
SET SESSION sql_mode='STRICT_ALL_TABLES';
PREPARE st1 FROM 'INSERT INTO t1 VALUES ("abc")';
PREPARE st2 FROM 'INSERT INTO t2 VALUES ("abc")';
PREPARE st3 FROM 'INSERT INTO t3 VALUES ("abc")';
PREPARE st4 FROM 'INSERT INTO t4 VALUES ("abc")';
EXECUTE st1;
EXECUTE st2;
EXECUTE st3;
EXECUTE st4;
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
SELECT COUNT(*) = 1 FROM t2;
COUNT(*) = 1
1
SELECT COUNT(*) = 1 FROM t3;
COUNT(*) = 1
1
SELECT COUNT(*) = 1 FROM t4;
COUNT(*) = 1
1
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
ALTER TABLE t1 DROP COLUMN f1;
EXECUTE st1;
ERROR 22007: Incorrect integer value: 'abc' for column 'f2' at row 1
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
DROP TABLE t4;
......@@ -4,5 +4,15 @@ INSERT INTO t1 VALUES (1);
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
CREATE USER foo@localhost;
# Open connection to node 2 using 'foo' user.
# Connect with foo_node_2
INSERT INTO t1 VALUES (2);
ERROR HY000: The MariaDB server is running with the --read-only option so it cannot execute this statement
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
SET GLOBAL read_only=FALSE;
DROP TABLE t1;
DROP USER foo@localhost;
CREATE TABLE t1 (id INT PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
START TRANSACTION;
SELECT * FROM t1;
id f2
INSERT INTO t1 VALUES (1,1);
SELECT * FROM t1;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
ROLLBACK;
DELETE FROM t1;
INSERT INTO t1 VALUES (1,1);
START TRANSACTION;
SELECT * FROM t1;
id f2
1 1
UPDATE t1 SET f2 = 2;
UPDATE t1 SET f2 = 3;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
ROLLBACK;
DELETE FROM t1;
START TRANSACTION;
INSERT INTO t1 VALUES (1,1);
INSERT INTO t1 VALUES (1,2);
COMMIT;
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
DROP TABLE t1;
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
SET GLOBAL wsrep_provider_options = "socket.ssl_compression=No";
ERROR HY000: Incorrect arguments to SET
CREATE TABLE t1 (f1 VARCHAR(333) PRIMARY KEY, f2 BLOB) Engine=InnoDB;
INSERT INTO t1 VALUES (REPEAT('a', 333), REPEAT('b', 65535));
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = REPEAT('a', 333) AND f2 = REPEAT('b', 65535);
COUNT(*) = 1
1
DROP TABLE t1;
CALL mtr.add_suppression("Unknown parameter 'socket\.ssl_compression'");
CALL mtr.add_suppression("Set options returned 7");
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
VARIABLE_VALUE = 'Synced'
1
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2
1
Setting SST method to mysqldump ...
GRANT ALL PRIVILEGES ON *.* TO 'sst' IDENTIFIED BY 'sst';
SET GLOBAL wsrep_sst_auth = 'sst:sst';
GRANT ALL PRIVILEGES ON *.* TO 'sst';
SET GLOBAL wsrep_sst_auth = 'sst:';
SET GLOBAL wsrep_sst_method = 'mysqldump';
Performing State Transfer on a server that has been temporarily disconnected
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
......
Setting SST method to mysqldump ...
GRANT ALL PRIVILEGES ON *.* TO 'sst';
SET GLOBAL wsrep_sst_auth = 'sst:';
SET GLOBAL wsrep_sst_method = 'mysqldump';
CREATE USER sslsst;
GRANT ALL PRIVILEGES ON *.* TO sslsst;
GRANT USAGE ON *.* TO sslsst REQUIRE SSL;
SET GLOBAL wsrep_sst_auth = 'sslsst:';
Performing State Transfer on a server that has been temporarily disconnected
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node1_committed_before');
INSERT INTO t1 VALUES ('node1_committed_before');
INSERT INTO t1 VALUES ('node1_committed_before');
INSERT INTO t1 VALUES ('node1_committed_before');
INSERT INTO t1 VALUES ('node1_committed_before');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node2_committed_before');
INSERT INTO t1 VALUES ('node2_committed_before');
INSERT INTO t1 VALUES ('node2_committed_before');
INSERT INTO t1 VALUES ('node2_committed_before');
INSERT INTO t1 VALUES ('node2_committed_before');
COMMIT;
Unloading wsrep provider ...
SET GLOBAL wsrep_provider = 'none';
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node1_committed_during');
INSERT INTO t1 VALUES ('node1_committed_during');
INSERT INTO t1 VALUES ('node1_committed_during');
INSERT INTO t1 VALUES ('node1_committed_during');
INSERT INTO t1 VALUES ('node1_committed_during');
COMMIT;
START TRANSACTION;
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
Loading wsrep provider ...
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node2_committed_after');
INSERT INTO t1 VALUES ('node2_committed_after');
INSERT INTO t1 VALUES ('node2_committed_after');
INSERT INTO t1 VALUES ('node2_committed_after');
INSERT INTO t1 VALUES ('node2_committed_after');
COMMIT;
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
COMMIT;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 VALUES ('node1_committed_after');
INSERT INTO t1 VALUES ('node1_committed_after');
INSERT INTO t1 VALUES ('node1_committed_after');
INSERT INTO t1 VALUES ('node1_committed_after');
INSERT INTO t1 VALUES ('node1_committed_after');
COMMIT;
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
ROLLBACK;
SELECT COUNT(*) = 35 FROM t1;
COUNT(*) = 35
1
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
COMMIT;
SET AUTOCOMMIT=ON;
SELECT COUNT(*) = 35 FROM t1;
COUNT(*) = 35
1
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
COUNT(*) = 0
1
DROP TABLE t1;
COMMIT;
SET AUTOCOMMIT=ON;
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
DROP USER sst;
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
CALL mtr.add_suppression("InnoDB: Error: Table \"mysql\"\\.\"innodb_index_stats\" not found");
CALL mtr.add_suppression("InnoDB: New log files created");
CALL mtr.add_suppression("InnoDB: Creating foreign key constraint system tables");
CALL mtr.add_suppression("Can't open and lock time zone table");
CALL mtr.add_suppression("Can't open and lock privilege tables");
CALL mtr.add_suppression("Info table is not ready to be used");
CALL mtr.add_suppression("Native table .* has the wrong structure");
DROP USER sslsst;
CREATE TABLE wsrep_local_indexes (wsrep_local_index INTEGER);
INSERT INTO wsrep_local_indexes VALUES ((SELECT variable_value FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE variable_name = 'wsrep_local_index'));
INSERT INTO wsrep_local_indexes VALUES ((SELECT variable_value FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE variable_name = 'wsrep_local_index'));
SELECT COUNT(*) = 2 FROM wsrep_local_indexes;
COUNT(*) = 2
1
SELECT COUNT(DISTINCT wsrep_local_index) = 2 FROM wsrep_local_indexes;
COUNT(DISTINCT wsrep_local_index) = 2
1
SELECT COUNT(*) = 0 FROM wsrep_local_indexes WHERE wsrep_local_index NOT IN (0, 1);
COUNT(*) = 0
1
DROP TABLE wsrep_local_indexes;
......@@ -7,12 +7,12 @@ UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
SELECT * FROM t1 WHERE f1 = 2 FOR UPDATE;
f1 f2
2 a
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_enter_sync';
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync';
COMMIT;;
SET SESSION wsrep_sync_wait = 0;
UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_enter_sync';
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'b';
COUNT(*) = 1
1
......
CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
UPDATE t1 SET f1 = 2 WHERE f1 = 1;
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
COUNT(*) = 1
1
DROP TABLE t1;
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 4
1
CREATE TABLE t1 (f1 INTEGER);
INSERT INTO t1 VALUES (1);
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
DROP TABLE t1;
......@@ -104,3 +104,11 @@ COUNT(*) = 1
SET GLOBAL wsrep_slave_threads = 1;
DROP TABLE t1;
DROP TABLE t2;
#
# lp:1372840 - Changing wsrep_slave_threads causes future connections to hang
#
CREATE TABLE t1 (i INT AUTO_INCREMENT PRIMARY KEY) ENGINE=INNODB;
SET GLOBAL wsrep_slave_threads = 4;
SET GLOBAL wsrep_slave_threads = 1;
DROP TABLE t1;
# End of tests
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 4
1
CREATE TABLE t1 (f1 INTEGER);
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (13);
Shutting down server ...
INSERT INTO t1 VALUES (11);
INSERT INTO t1 VALUES (12);
INSERT INTO t1 VALUES (14);
INSERT INTO t1 VALUES (131);
INSERT INTO t1 VALUES (22);
Shutting down server ...
INSERT INTO t1 VALUES (21);
INSERT INTO t1 VALUES (23);
INSERT INTO t1 VALUES (24);
INSERT INTO t1 VALUES (221);
INSERT INTO t1 VALUES (34);
Shutting down server ...
INSERT INTO t1 VALUES (31);
INSERT INTO t1 VALUES (32);
INSERT INTO t1 VALUES (33);
INSERT INTO t1 VALUES (341);
SELECT COUNT(*) = 19 FROM t1;
COUNT(*) = 19
1
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 4
1
SELECT COUNT(*) = 19 FROM t1;
COUNT(*) = 19
1
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 4
1
SELECT COUNT(*) = 19 FROM t1;
COUNT(*) = 19
1
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 4
1
SELECT COUNT(*) = 19 FROM t1;
COUNT(*) = 19
1
DROP TABLE t1;
CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside");
CALL mtr.add_suppression("Action message in non-primary configuration from member 0");
CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside");
CALL mtr.add_suppression("Action message in non-primary configuration from member 0");
CALL mtr.add_suppression("Action message in non-primary configuration from member 0");
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 4
1
CREATE TABLE t1 (f1 INTEGER);
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (3);
INSERT INTO t1 VALUES (4);
INSERT INTO t1 VALUES (13);
Killing server ...
INSERT INTO t1 VALUES (11);
INSERT INTO t1 VALUES (12);
INSERT INTO t1 VALUES (14);
INSERT INTO t1 VALUES (131);
INSERT INTO t1 VALUES (22);
Killing server ...
INSERT INTO t1 VALUES (21);
INSERT INTO t1 VALUES (23);
INSERT INTO t1 VALUES (24);
INSERT INTO t1 VALUES (221);
INSERT INTO t1 VALUES (34);
Killing server ...
INSERT INTO t1 VALUES (31);
INSERT INTO t1 VALUES (32);
INSERT INTO t1 VALUES (33);
INSERT INTO t1 VALUES (341);
SELECT COUNT(*) = 19 FROM t1;
COUNT(*) = 19
1
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 4
1
SELECT COUNT(*) = 19 FROM t1;
COUNT(*) = 19
1
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 4
1
SELECT COUNT(*) = 19 FROM t1;
COUNT(*) = 19
1
SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 4
1
SELECT COUNT(*) = 19 FROM t1;
COUNT(*) = 19
1
DROP TABLE t1;
CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside");
CALL mtr.add_suppression("WSREP: gcs_caused\\(\\) returned -1 \\(Operation not permitted\\)");
CALL mtr.add_suppression("Action message in non-primary configuration from member 0");
CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside");
CALL mtr.add_suppression("Action message in non-primary configuration from member 0");
CALL mtr.add_suppression("Action message in non-primary configuration from member 0");
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY);
CREATE TABLE t3 (f1 INTEGER PRIMARY KEY);
CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW CALL p1(NEW.f1);
CREATE PROCEDURE p1 (IN x INT)
BEGIN
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
ROLLBACK TO event_logging;
INSERT t3 VALUES (x);
END;
SAVEPOINT event_logging;
INSERT INTO t2 VALUES (x);
RELEASE SAVEPOINT event_logging;
END|
INSERT INTO t2 VALUES (1);
INSERT INTO t1 VALUES (1);
DROP PROCEDURE p1;
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY);
CREATE TABLE t3 (f1 INTEGER PRIMARY KEY);
CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW CALL p1(NEW.f1);
CREATE PROCEDURE p1 (IN x INT)
BEGIN
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
ROLLBACK TO event_logging;
INSERT t3 VALUES (x);
END;
SAVEPOINT event_logging;
INSERT INTO t2 VALUES (x);
END|
INSERT INTO t2 VALUES (1);
INSERT INTO t1 VALUES (1);
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
SELECT COUNT(*) = 1 FROM t2;
COUNT(*) = 1
1
SELECT COUNT(*) = 1 FROM t3;
COUNT(*) = 1
1
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
SELECT COUNT(*) = 1 FROM t2;
COUNT(*) = 1
1
SELECT COUNT(*) = 1 FROM t3;
COUNT(*) = 1
1
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
DROP PROCEDURE p1;
Setting SST method to mysqldump ...
GRANT ALL PRIVILEGES ON *.* TO 'sst' IDENTIFIED BY 'sst';
SET GLOBAL wsrep_sst_auth = 'sst:sst';
GRANT ALL PRIVILEGES ON *.* TO 'sst';
SET GLOBAL wsrep_sst_auth = 'sst:';
SET GLOBAL wsrep_sst_method = 'mysqldump';
Performing State Transfer on a server that has been temporarily disconnected
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
......
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
SET GLOBAL wsrep_OSU_method = "RSU";
SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue';
ALTER TABLE t1 ADD COLUMN f2 INTEGER;;
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_OSU_method = "TOI";
SET DEBUG_SYNC= 'now SIGNAL continue';
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
COUNT(*) = 2
1
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
COUNT(*) = 2
1
DROP TABLE t1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
SET GLOBAL wsrep_OSU_method = "TOI";
SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue';
ALTER TABLE t1 ADD COLUMN f2 INTEGER;;
SET SESSION wsrep_sync_wait = 0;
SET GLOBAL wsrep_OSU_method = "RSU";
SET DEBUG_SYNC= 'now SIGNAL continue';
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
COUNT(*) = 2
1
INSERT INTO t1 VALUES (1,2);
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
COUNT(*) = 2
1
INSERT INTO t1 VALUES (3,4);
DROP TABLE t1;
SET GLOBAL WSREP_OSU_METHOD = TOI;
......@@ -60,8 +60,8 @@ push @::global_suppressions,
qr(WSREP: .*Failed to open backend connection: -110 .*),
qr(WSREP: .*Failed to open channel 'my_wsrep_cluster' at .*),
qr(WSREP: gcs connect failed: Connection timed out),
qr|WSREP: wsrep::connect\(\) failed: 7|,
qr(WSREP: SYNC message from member [0-9]* in non-primary configuration. Ignored.),
qr|WSREP: wsrep::connect\(.*\) failed: 7|,
qr(WSREP: SYNC message from member .* in non-primary configuration. Ignored.),
qr(WSREP: Could not find peer:),
qr(WSREP: TO isolation failed for: .*),
qr|WSREP: gcs_caused\(\) returned .*|,
......
#
# Test that applying plays well with FLUSH TABLE table_name WITH READ LOCK. The applier
# thread should block until UNLOCK TABLEs.
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
--connection node_1
SET SESSION wsrep_sync_wait = 0;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
FLUSH TABLE t1 WITH READ LOCK;
--connection node_2
INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (2);
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
--connection node_1a
SET SESSION wsrep_sync_wait = 0;
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'Waiting for table metadata lock'
--source include/wait_condition.inc
SELECT COUNT(*) = 0 FROM t1;
--connection node_1
UNLOCK TABLES;
SET SESSION wsrep_sync_wait = 7;
SELECT COUNT(*) = 2 FROM t1;
DROP TABLE t1;
--lock_wait_timeout=5 --innodb_lock_wait_timeout=5 --wait_timeout=5
#
# Test that applying a DDL plays well with FLUSH TABLE table_name WITH READ LOCK. The applier
# thread should block until UNLOCK TABLEs.
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
--connection node_1
SET SESSION wsrep_sync_wait = 0;
# Those values are valid only for connection node_1. The global values from the -master.opt file apply to applier threads.
SET SESSION lock_wait_timeout = 60;
SET SESSION innodb_lock_wait_timeout=60;
SET SESSION wait_timeout=60;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
FLUSH TABLE t1 WITH READ LOCK;
--connection node_2
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
--connection node_1
SELECT 1 FROM DUAL;
# Sleep for longer than the global timeout ...
--sleep 6
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'Waiting for table metadata lock';
UNLOCK TABLES;
SET SESSION wsrep_sync_wait = 7;
SHOW CREATE TABLE t1;
SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'Waiting for table metadata lock';
DROP TABLE t1;
......@@ -45,3 +45,6 @@ DROP TABLE t1;
STOP SLAVE;
RESET SLAVE ALL;
--connection node_1
RESET MASTER;
!include ../galera_3nodes_as_slave.cnf
#
# Test the behavior of a Galera async slave if it goes non-prim. Async replication
# should abort with an error but it should be possible to restart it.
#
# The galera/galera_2node_slave.cnf describes the setup of the nodes
#
--source include/have_innodb.inc
--source include/have_log_bin.inc
--source include/big_test.inc
# Step #1. Establish replication
#
# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc
#
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--source include/galera_cluster.inc
--connection node_2
--disable_query_log
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_1;
--enable_query_log
START SLAVE USER='root';
SET SESSION wsrep_sync_wait = 0;
--connection node_1
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
# Step #2. Force async slave to go non-primary
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connection node_3
--source include/wait_until_connected_again.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
# Step #3. Force async replication to fail by creating a replication event while the slave is non-prim
--connection node_1
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
--connection node_2
--sleep 5
--let $value = query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1)
--connection node_3
--disable_query_log
--eval SELECT "$value" IN ("Error 'Unknown command' on query. Default database: 'test'. Query: 'BEGIN'", "Node has dropped from cluster") AS expected_error
--enable_query_log
# Step #4. Bring back the async slave and restart replication
--connection node_2
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
--connection node_3
--source include/wait_until_connected_again.inc
--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
--connection node_2
--source include/galera_wait_ready.inc
--source include/wait_until_connected_again.inc
START SLAVE;
# Confirm that the replication events have arrived
--let $wait_condition = SELECT COUNT(*) = 5 FROM t1;
--source include/wait_condition.inc
--connection node_1
DROP TABLE t1;
--sleep 2
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
STOP SLAVE;
RESET SLAVE ALL;
CALL mtr.add_suppression("Slave SQL: Error 'Unknown command' on query");
CALL mtr.add_suppression("Slave: Unknown command Error_code: 1047");
CALL mtr.add_suppression("Send action {\\(nil\\), 328, TORDERED} returned -107 \\(Transport endpoint is not connected\\)");
CALL mtr.add_suppression("Slave SQL: Error in Xid_log_event: Commit could not be completed, 'Deadlock found when trying to get lock; try restarting transaction', Error_code: 1213");
CALL mtr.add_suppression("Slave SQL: Node has dropped from cluster, Error_code: 1047");
--connection node_1
RESET MASTER;
!include ../galera_2nodes_as_slave.cnf
[mysqld]
wsrep-preordered=TRUE
#
# Test Galera as a slave to a MySQL master with --wsrep-preordered=TRUE
#
# The galera/galera_2node_slave.cnf describes the setup of the nodes
#
--source include/have_innodb.inc
--source include/have_log_bin.inc
# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--source include/galera_cluster.inc
--connection node_2
--disable_query_log
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_1;
--enable_query_log
START SLAVE USER='root';
#
# Issue many large-ish transaction on the async master
#
--connection node_1
CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=InnoDB;
--disable_query_log
--let $count = 100
while ($count)
{
--eval INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2;
--dec $count
}
--enable_query_log
#
# While the async transactions are being applied, issue another set of transactions
# on the Galera node.
#
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
--let $count = 100
--disable_query_log
while ($count)
{
--eval INSERT INTO t1 (f2) SELECT 1 FROM ten AS a1, ten AS a2;
--dec $count
}
--enable_query_log
#
# Confirm that all transactions successfully committed
#
--let $wait_condition = SELECT COUNT(*) = 2 * 100 * 10 * 10 FROM t1;
--source include/wait_condition.inc
SELECT COUNT(DISTINCT f1) = 2 * 100 * 10 * 10 FROM t1;
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connection node_3
SELECT COUNT(*) = 2 * 100 * 10 * 10 FROM t1;
SELECT COUNT(DISTINCT f1) = 2 * 100 * 10 * 10 FROM t1;
#
# Cleanup
#
--connection node_1
DROP TABLE t1;
DROP TABLE ten;
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
STOP SLAVE;
RESET SLAVE ALL;
!include ../galera_2nodes_as_slave.cnf
[mysqld]
wsrep-mysql-replication-bundle=2
#
# Test the wsrep_replication_bundle variable. We expect that multiple async replication events
# will be grouped together and thus a smaller number of wsrep_last_committed transactions will
# be reported.
#
--source include/have_innodb.inc
# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--source include/galera_cluster.inc
--connection node_2
--disable_query_log
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1;
--enable_query_log
START SLAVE;
--connection node_1
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) 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);
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
--let $wait_condition = SELECT COUNT(*) = 4 FROM t1;
--source include/wait_condition.inc
# With wsrep_mysql_replication_bundle = 2, the last insert is not delivered
# because there are not enough events remaining to complete an entire bundle
SELECT COUNT(*) = 4 FROM t1;
# Bundle is now complete, the last INSERT and the DROP are delivered
--connection node_1
DROP TABLE t1;
--connection node_2
--sleep 1
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
STOP SLAVE;
RESET SLAVE ALL;
!include ../galera_2nodes.cnf
[mysqld]
#wsrep_sst_method=xtrabackup-v2
#wsrep_sst_auth="root:"
#wsrep_debug=ON
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
#
# Test that autoincrement works correctly while the cluster membership
# is changing and IST takes place.
#
--source include/big_test.inc
--source include/galera_cluster.inc
--source include/have_innodb.inc
--connection node_1
--let $connection_id = `SELECT CONNECTION_ID()`
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
# Issue an endless stream of autoincrement inserts
DELIMITER |;
CREATE PROCEDURE p1 ()
BEGIN
DECLARE x INT DEFAULT 1;
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
WHILE 1 DO
INSERT INTO t1 VALUES (DEFAULT);
COMMIT;
END WHILE;
END|
DELIMITER ;|
--send CALL p1();
--sleep 2
--connection node_2
--send CALL p1();
--sleep 2
# Kill and restart node #2
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--connection node_2a
--source include/kill_galera.inc
--sleep 10
--source include/start_mysqld.inc
--sleep 25
--source include/wait_until_connected_again.inc
INSERT INTO t1 VALUES (DEFAULT);
# Terminate the stored procedure
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
--connection node_1a
--disable_query_log
--eval KILL CONNECTION $connection_id
--enable_query_log
INSERT INTO t1 VALUES (DEFAULT);
--connection node_1
# CR_SERVER_LOST
--error 2013,2006
--reap
--connection node_2
# CR_SERVER_LOST
--error 2013,2006
--reap
--sleep 10
# Confirm that the count is correct and that the cluster is intact
--connection node_1a
--let $count = `SELECT COUNT(*) FROM t1`
--connection node_2a
--disable_query_log
--eval SELECT COUNT(*) = $count AS count_equal FROM t1
--enable_query_log
CALL mtr.add_suppression("WSREP: Action message in non-primary configuration from member 0");
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--connection node_1a
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
DROP PROCEDURE p1;
DROP TABLE t1;
CALL mtr.add_suppression("gcs_caused\\(\\) returned -1 \\(Operation not permitted\\)");
CALL mtr.add_suppression("WSREP: Action message in non-primary configuration from member 0");
--source include/galera_cluster.inc
--source include/have_innodb.inc
#
# Test that a local FLUSH TABLES FOR EXPORT will NOT be broken by an incoming remote transaction against that table
#
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
--connection node_2
SET AUTOCOMMIT=OFF;
--let $wsrep_local_bf_aborts_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
FLUSH TABLES t1 FOR EXPORT;
--connection node_1
INSERT INTO t1 VALUES (2);
--connection node_2
SET SESSION wsrep_sync_wait = 0;
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'Waiting for table metadata lock'
--source include/wait_condition.inc
UNLOCK TABLES;
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'Waiting for table metadata lock'
--source include/wait_condition.inc
COMMIT;
SET AUTOCOMMIT=ON;
--let $wait_condition = SELECT COUNT(*) = 1 FROM t1
--source include/wait_condition.inc
SELECT * FROM t1;
--let $wsrep_local_bf_aborts_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
--disable_query_log
--eval SELECT $wsrep_local_bf_aborts_after - $wsrep_local_bf_aborts_before = 0 AS wsrep_local_aborts_increment;
--enable_query_log
DROP TABLE t1;
......@@ -2,7 +2,7 @@
--source include/have_innodb.inc
#
# Test that a local LOCK TABLE will be broken by an incoming remote transaction against that table
# Test that a local LOCK TABLE will NOT be broken by an incoming remote transaction against that table
#
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
......@@ -12,22 +12,25 @@ SET AUTOCOMMIT=OFF;
--let $wsrep_local_bf_aborts_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_bf_aborts'`
LOCK TABLE t1 WRITE;
# Issue a concurrent INSERT against the lock table that will block
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--send INSERT INTO t1 VALUES (1);
--connection node_1
INSERT INTO t1 VALUES (2);
# The concurent insert is allowed to complete because the LOCK TABLE is now broken
--connection node_2a
--error 0
--reap
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'Waiting for table metadata lock'
--source include/wait_condition.inc
UNLOCK TABLES;
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'Waiting for table metadata lock'
--source include/wait_condition.inc
COMMIT;
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'`
--disable_query_log
--eval SELECT $wsrep_local_bf_aborts_after - $wsrep_local_bf_aborts_before = 1 AS wsrep_local_aborts_increment;
--eval SELECT $wsrep_local_bf_aborts_after - $wsrep_local_bf_aborts_before = 0 AS wsrep_local_aborts_increment;
--enable_query_log
DROP TABLE t1;
......@@ -4,6 +4,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/big_test.inc
CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
......
#
# Test that multi-table DROP TABLE statements are properly replicated
# See http://dev.mysql.com/doc/relnotes/mysql/5.6/en/news-5-6-20.html
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
CREATE TABLE t1 (f1 INTEGER) ENGINE=MyISAM;
CREATE TEMPORARY TABLE t2 (f1 INTEGER) ENGINE=MyISAM;
CREATE TABLE t3 (f1 INTEGER) ENGINE=InnoDB;
CREATE TEMPORARY TABLE t4 (f1 INTEGER) ENGINE=InnoDB;
CREATE TABLE t5 (f1 INTEGER);
SET AUTOCOMMIT=OFF;
START TRANSACTION;
DROP TABLE t1, t2, t3, t4;
INSERT INTO t5 VALUES (1);
COMMIT;
--connection node_2
--error ER_NO_SUCH_TABLE
SHOW CREATE TABLE t1;
--error ER_NO_SUCH_TABLE
SHOW CREATE TABLE t2;
--error ER_NO_SUCH_TABLE
SHOW CREATE TABLE t3;
--error ER_NO_SUCH_TABLE
SHOW CREATE TABLE t4;
CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test.t2,test.t4'' on query\. Default database: 'test'\. Query: 'DROP TABLE t1, t2, t3, t4', Error_code: 1051");
--connection node_1
DROP TABLE t5;
......@@ -77,8 +77,32 @@ FLUSH USER_RESOURCES;
--enable_query_log
--connection node_2
--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
--connection node_1
FLUSH TABLES;
--connection node_2
--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
--disable_query_log
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff;
--enable_query_log
--connection node_1
CREATE TABLE t2 (f1 INTEGER);
--connection node_2
--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
--connection node_1
FLUSH TABLES t2;
--connection node_2
--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
--disable_query_log
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff;
--enable_query_log
#
# The following statements should not be replicated: FLUSH LOGS, FLUSH TABLES
# The following statements should not be replicated: FLUSH LOGS, FLUSH TABLES WITH LOCKS
#
......@@ -103,5 +127,47 @@ UNLOCK TABLES;
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before AS wsrep_last_committed_diff;
--enable_query_log
## Test LOCK TABLES with FLUSH TABLES
## LOCK TABLES t1 write followed by flush tables t1 should succeed due to MDL upgrade.
## LOCK tables t2 read followed by flush tables t2 should fail with ER_TABLE_NOT_LOCKED_FOR_WRITE
--connection node_2
--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
--connection node_1
LOCK TABLES t1 WRITE;
FLUSH TABLES t1;
UNLOCK TABLES;
--connection node_2
--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
--disable_query_log
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff;
--enable_query_log
--connection node_2
--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
--connection node_1
LOCK TABLES t1 READ;
--error ER_TABLE_NOT_LOCKED_FOR_WRITE
FLUSH TABLES t1;
UNLOCK TABLES;
--connection node_2
--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
--disable_query_log
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before AS wsrep_last_committed_diff;
--enable_query_log
--connection node_1
FLUSH TABLES t1;
--connection node_2
--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
--disable_query_log
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff;
--enable_query_log
--connection node_1
DROP TABLE t1;
DROP TABLE t2;
#
# Test that wsrep_forced_binlog_format=ROW indeed prevents the log to be switched to STATEMENT format on a per-connection basis
#
--source include/have_log_bin.inc
--source include/have_innodb.inc
--source include/galera_cluster.inc
--connection node_1
RESET MASTER;
SET SESSION binlog_format = 'STATEMENT';
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SET SESSION binlog_format = 'MIXED';
INSERT INTO t1 VALUES (2);
--replace_regex /xid=[0-9]+/xid=###/ /table_id: [0-9]+/table_id: ###/
--replace_column 2 <Pos> 5 <End_log_pos>
SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 120;
DROP TABLE t1;
......@@ -2,9 +2,10 @@
--source include/have_innodb.inc
#
# At this time, issing a FLUSH TABLES WITH READ LOCK causes SELECT and SHOW to hang if
# casuality can not be ensured because another node issued a statement in the meantime
# which could not be applied because FTWRL blocks the applier as well
# At this time, issing a FLUSH TABLES WITH READ LOCK causes SELECT and SHOW to
# hang if causality can not be ensured because another node issued a statement
# in the meantime which could not be applied because FTWRL blocks the applier
# as well
#
# See LP bug 1271177
#
......
#
# Test the following sequence of events:
#
# 1. issue a remote transaction
# 2. applier is blocked from applying the transaction locally using apply_monitor_slave_enter_sync
# 3. FTWRL is issued and blocks in ApplyOrder>::drain_common
# 4. applier is unblocked
# 5. remote transaction is applied
# 6. FTWRL is granted
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_debug_sync.inc
--source suite/galera/include/galera_have_debug_sync.inc
--connection node_1
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
--connection node_2
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
--connection node_1
INSERT INTO t1 VALUES (1);
--connection node_2
SET SESSION wsrep_sync_wait = 0;
# Wait until applier has blocked
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_debug_sync_waiters' AND VARIABLE_VALUE = 'apply_monitor_slave_enter_sync'
--source include/wait_condition.inc
SELECT COUNT(*) = 0 FROM t1;
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--connection node_2a
--send FLUSH TABLES WITH READ LOCK;
--connection node_2
--sleep 1
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'Init' AND INFO = 'FLUSH TABLES WITH READ LOCK'
--source include/wait_condition.inc
SET GLOBAL wsrep_provider_options = 'dbug=';
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
--connection node_2a
--reap
--connection node_2
SET SESSION lock_wait_timeout = 1;
SET SESSION innodb_lock_wait_timeout=1;
SET SESSION wait_timeout=1;
--error ER_LOCK_WAIT_TIMEOUT
INSERT INTO t2 VALUES (2);
--connection node_2a
UNLOCK TABLES;
--connection node_2
SELECT COUNT(*) = 1 FROM t1;
INSERT INTO t1 VALUES (3);
--connection node_1
SELECT COUNT(*) = 2 FROM t1;
DROP TABLE t1;
......@@ -24,16 +24,16 @@ SELECT COUNT(*) = 13 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE name LIKE '
#
--connection node_1
# Insert 10K rows
INSERT INTO t1 (f2) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;
# Insert 1K rows
INSERT INTO t1 (f2) SELECT 'foobarbaz' FROM ten AS a1, ten AS a2, ten AS a3;
--connection node_2
SELECT COUNT(f2) = 10000 FROM t1 WHERE MATCH(f2) AGAINST ('foobarbaz');
SELECT COUNT(f2) = 1000 FROM t1 WHERE MATCH(f2) AGAINST ('foobarbaz');
UPDATE t1 SET f2 = 'abcdefjhk';
--connection node_1
SELECT COUNT(f2) = 10000 FROM t1 WHERE MATCH(f2) AGAINST ('abcdefjhk');
SELECT COUNT(f2) = 1000 FROM t1 WHERE MATCH(f2) AGAINST ('abcdefjhk');
--connection node_2
......
......@@ -9,6 +9,9 @@ CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
--connection node_2
SELECT COUNT(*) = 1 FROM t1;
--sleep 1
--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
SET GLOBAL wsrep_provider_options = 'gcs.fc_limit=1';
......@@ -24,13 +27,14 @@ INSERT INTO t1 VALUES (4);
# This query will hang because flow control will kick in
--send
INSERT INTO t1 VALUES (5);
--sleep 1
--sleep 2
--let $galera_connection_name = node_1a
--let $galera_server_number = 1
--source include/galera_connect.inc
--connection node_1a
SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'query end' AND INFO = 'INSERT INTO t1 VALUES (5)';
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'query end' AND INFO = 'INSERT INTO t1 VALUES (5)';
--source include/wait_condition.inc
--connection node_2
# Unblock the slave applier thread
......
......@@ -6,6 +6,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/big_test.inc
CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
......
#
# Test that GRA_* files are generated on applier failure and are readable.
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
--connection node_2
--exec rm -rf $MYSQLTEST_VARDIR/mysqld.2/data/GRA_*.log
# Create applier failure
SET SESSION wsrep_on=OFF;
CREATE TABLE t1 (f1 INTEGER);
--connection node_1
CREATE TABLE t1 (f1 INTEGER);
--connection node_2
SELECT COUNT(*) = 0 FROM t1;
# Compose a valid binlog from a header file and the GRA file
--let $gra_binlog_file = $MYSQLTEST_VARDIR/tmp/gra.log
--exec rm -rf $gra_binlog_file
--exec cp std_data/binlog-header.log $gra_binlog_file
--exec cat $MYSQLTEST_VARDIR/mysqld.2/data/GRA_*.log >> $gra_binlog_file
# Make sure the binlog thus produced is readable and contains the failure
--replace_regex /SET TIMESTAMP=[0-9]+/SET TIMESTAMP=<TIMESTAMP>/ /#[0-9]+ +[0-9]+:[0-9]+:[0-9]+/<ISO TIMESTAMP>/ /pseudo_thread_id=[0-9]+/pseudo_thread_id=<PSEUDO_THREAD_ID>/ /thread_id=[0-9]+/thread_id=<QUERY_THREAD_ID>/
--exec $MYSQL_BINLOG $gra_binlog_file
SET SESSION wsrep_on=ON;
CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query");
DROP TABLE t1;
......@@ -2,6 +2,8 @@
[mysqld]
wsrep_sst_method=xtrabackup-v2
wsrep_sst_auth=root:
innodb_flush_log_at_trx_commit=0
[mysqld.1]
......
......@@ -2,6 +2,7 @@
[mysqld]
wsrep_sst_method=xtrabackup-v2
wsrep_sst_auth=root:
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.ignore_sb=true'
......
#
# This test checks that applier threads are immune to KILL QUERY and KILL STATEMENT
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
--connection node_1
--let $applier_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE != 'wsrep aborter idle' OR STATE IS NULL LIMIT 1`
--disable_query_log
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR
--eval KILL $applier_thread
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR
--eval KILL QUERY $applier_thread
--let $aborter_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep aborter idle' LIMIT 1`
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR
--eval KILL $aborter_thread
--error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR
--eval KILL QUERY $aborter_thread
--enable_query_log
......@@ -3,6 +3,10 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--connection node_1
SET SESSION innodb_lock_wait_timeout=600;
SET SESSION lock_wait_timeout=600;
CREATE TABLE ten (f1 INTEGER);
INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
......@@ -10,6 +14,12 @@ 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;
--let $wsrep_provider_options_node2 = `SELECT @@wsrep_provider_options`
SET SESSION wsrep_sync_wait = 7;
SET GLOBAL wsrep_provider_options = 'repl.causal_read_timeout=PT1H';
SELECT COUNT(*) = 100000 FROM t1;
INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
......@@ -20,21 +30,6 @@ UPDATE t1 SET f2 = 1;
--connection node_2
SELECT COUNT(*) = 200000 FROM t1 WHERE f2 = 1;
# Rollback
--connection node_1
SET AUTOCOMMIT=OFF;
START TRANSACTION;
INSERT INTO t1 (f2) SELECT a1.f1 FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5;
ROLLBACK;
SELECT COUNT(*) = 200000 FROM t1;
--connection node_2
SELECT COUNT(*) = 200000 FROM t1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
UPDATE t1 SET f2 = 2;
ROLLBACK;
--connection node_1
START TRANSACTION;
SELECT COUNT(*) = 200000 FROM t1;
......@@ -51,5 +46,9 @@ COMMIT;
--error ER_LOCK_DEADLOCK
COMMIT;
--disable_query_log
--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_node2';
--enable_query_log
DROP TABLE t1;
DROP TABLE ten;
......@@ -104,11 +104,11 @@ INSERT INTO t1 VALUES (6);
--connection node_3
# We need a user with a password for mysqldump SST
GRANT ALL PRIVILEGES ON *.* TO 'sst' IDENTIFIED BY 'sst';
SET GLOBAL wsrep_sst_auth = 'sst:sst';
GRANT ALL PRIVILEGES ON *.* TO 'sst';
SET GLOBAL wsrep_sst_auth = 'sst:';
--connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4
GRANT ALL PRIVILEGES ON *.* TO 'sst' IDENTIFIED BY 'sst';
GRANT ALL PRIVILEGES ON *.* TO 'sst';
--disable_query_log
--eval SET GLOBAL wsrep_sst_method = 'mysqldump';
......
......@@ -4,6 +4,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/big_test.inc
# Create a second connection to node1 so that we can run transactions concurrently
--let $galera_connection_name = node_1a
......
......@@ -4,6 +4,7 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/big_test.inc
# Create a second connection to node1 so that we can run transactions concurrently
--let $galera_connection_name = node_1a
......
......@@ -35,9 +35,9 @@ INSERT INTO t2 VALUES (1);
--connection node_2
SELECT COUNT(*) = 6 FROM t1;
SELECT COUNT(*) = 6 FROM t2;
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'closing tables';
SELECT COUNT(*) = 10 FROM t1;
SELECT COUNT(*) = 10 FROM t2;
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE LIKE 'committed%';
--eval SET GLOBAL wsrep_slave_threads = $wsrep_slave_threads_orig;
......
#
# A simple test for PREPARE / EXECUTE -style prepared statements with Galera
#
# C-API-level prepared-statements can not be triggered from inside mysqltest, however
# can be exercised when running an MTR test suite with the --ps-protocol switch.
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
CREATE TABLE t1 (f1 CHAR(5)) ENGINE=InnoDB;
CREATE TABLE t2 (f1 CHAR(5)) ENGINE=InnoDB;
CREATE TABLE t3 (f1 CHAR(5)) ENGINE=InnoDB;
CREATE TABLE t4 (f1 CHAR(5)) ENGINE=InnoDB;
SET SESSION sql_mode='STRICT_ALL_TABLES';
PREPARE st1 FROM 'INSERT INTO t1 VALUES ("abc")';
PREPARE st2 FROM 'INSERT INTO t2 VALUES ("abc")';
PREPARE st3 FROM 'INSERT INTO t3 VALUES ("abc")';
PREPARE st4 FROM 'INSERT INTO t4 VALUES ("abc")';
EXECUTE st1;
EXECUTE st2;
EXECUTE st3;
EXECUTE st4;
--connection node_2
SELECT COUNT(*) = 1 FROM t1;
SELECT COUNT(*) = 1 FROM t2;
SELECT COUNT(*) = 1 FROM t3;
SELECT COUNT(*) = 1 FROM t4;
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
ALTER TABLE t1 DROP COLUMN f1;
--connection node_1
--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
EXECUTE st1;
--connection node_1
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
DROP TABLE t4;
......@@ -17,7 +17,23 @@ INSERT INTO t1 VALUES (1);
--connection node_2
SELECT COUNT(*) = 1 FROM t1;
SET GLOBAL read_only=FALSE;
CREATE USER foo@localhost;
--echo # Open connection to node 2 using 'foo' user.
--let $port_2= \$NODE_MYPORT_2
--connect(foo_node_2,127.0.0.1,foo,,test,$port_2,)
--echo
--echo # Connect with foo_node_2
--connection foo_node_2
--error ER_OPTION_PREVENTS_STATEMENT
INSERT INTO t1 VALUES (2);
--connection node_2
SELECT COUNT(*) = 1 FROM t1;
# Cleanup
SET GLOBAL read_only=FALSE;
DROP TABLE t1;
DROP USER foo@localhost;
......@@ -22,6 +22,7 @@ INSERT INTO t1 VALUES (1);
--let $galera_server_number = 2
--source include/galera_connect.inc
--connection node_2a
--source include/wait_until_ready.inc
SELECT COUNT(*) = 1 FROM t1;
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
......
#
# Test that the SERIALIZABLE isolation level behaves as expected.
# A local serializable transaction is aborted by an incoming remote update
#
# wsrep_sync_wait does not work well with serializable, see mysql-wsrep#130
# hence the need to use --sleep .
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
--connection node_1
CREATE TABLE t1 (id INT PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
#
# Read (local transaction) / Write (remote transaction) conflict
#
SET AUTOCOMMIT=OFF;
SET SESSION TRANSACTION ISOLATION LEVEL SERIALIZABLE;
START TRANSACTION;
SELECT * FROM t1;
--connection node_2
INSERT INTO t1 VALUES (1,1);
--sleep 2
--connection node_1
--error ER_LOCK_DEADLOCK
SELECT * FROM t1;
ROLLBACK;
DELETE FROM t1;
#
# Write (local transaction) / Write (remote transaction) conflict
#
--connection node_1
INSERT INTO t1 VALUES (1,1);
START TRANSACTION;
SELECT * FROM t1;
--connection node_2
UPDATE t1 SET f2 = 2;
--sleep 2
--connection node_1
--error ER_LOCK_DEADLOCK
UPDATE t1 SET f2 = 3;
ROLLBACK;
DELETE FROM t1;
#
# Write (local transaction) / Write (remote transaction) conflict
# Local transaction writes before remote one.
# Nothing special happens here - ordinary deadlock on COMMIT
#
--connection node_1
START TRANSACTION;
--connection node_1
INSERT INTO t1 VALUES (1,1);
--connection node_2
INSERT INTO t1 VALUES (1,2);
--connection node_1
--error ER_LOCK_DEADLOCK
COMMIT;
DROP TABLE t1;
......@@ -38,7 +38,7 @@ SET GLOBAL wsrep_cluster_address = '';
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
--source include/wait_condition.inc
--sleep 5
--sleep 10
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--source include/wait_until_connected_again.inc
......
!include ../galera_2nodes.cnf
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;socket.ssl=yes;socket.ssl_cert=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem;socket.ssl_key=@ENV.MYSQL_TEST_DIR/std_data/galera-key.pem;socket.ssl_compression=YES'
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;socket.ssl=yes;socket.ssl_cert=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem;socket.ssl_key=@ENV.MYSQL_TEST_DIR/std_data/galera-key.pem;socket.ssl_compression=YES'
#
# Test SSL compression. The accompanying galera_ssl_compression.cnf has a customized wsrep_provider_options setting that enables SSL and compression.
#
# Unfortunately there is no wire-level traffic bytes counter that would allow us to determine that compression kicked in, so we can only
# perform a most basic replication check.
#
--source include/galera_cluster.inc
--source include/have_innodb.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';
--connection node_2
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';
--connection node_1
# Check that the socket.ssl_compression provider option is not dynamic
--error ER_WRONG_ARGUMENTS
SET GLOBAL wsrep_provider_options = "socket.ssl_compression=No";
CREATE TABLE t1 (f1 VARCHAR(333) PRIMARY KEY, f2 BLOB) Engine=InnoDB;
INSERT INTO t1 VALUES (REPEAT('a', 333), REPEAT('b', 65535));
--connection node_2
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = REPEAT('a', 333) AND f2 = REPEAT('b', 65535);
--connection node_1
DROP TABLE t1;
CALL mtr.add_suppression("Unknown parameter 'socket\.ssl_compression'");
CALL mtr.add_suppression("Set options returned 7");
!include ../galera_2nodes.cnf
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;socket.ssl=yes;socket.ssl_cert=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem;socket.ssl_key=@ENV.MYSQL_TEST_DIR/std_data/galera-key.pem'
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;socket.ssl=yes;socket.ssl_cert=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem;socket.ssl_key=@ENV.MYSQL_TEST_DIR/std_data/galera-key.pem'
#
# Test upgrading the SSL certificates in a rolling fashion.
#
# 1. The starting state with the old key and cert is is described in galera_ssl_upgrade.cnf
#
--source include/galera_cluster.inc
--source include/have_innodb.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';
# 2. Restart node #1 with a socket.ssl_ca that includes both the new and the old certificate
--connection node_1
--source include/shutdown_mysqld.inc
--let $start_mysqld_params = --wsrep-cluster-address=gcomm://127.0.0.1:$NODE_GALERAPORT_2 --wsrep_provider_options=base_port=$NODE_GALERAPORT_1;socket.ssl=yes;socket.ssl_ca=$MYSQL_TEST_DIR/std_data/galera-upgrade-ca-cert.pem;socket.ssl_cert=$MYSQL_TEST_DIR/std_data/galera-cert.pem;socket.ssl_key=$MYSQL_TEST_DIR/std_data/galera-key.pem
--source include/start_mysqld.inc
--source include/wait_until_connected_again.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';
# 3. Restart node #2 with the new socket.ssl_ca , socket.ssl_cert and socket.ssl_key
--connection node_2
--source include/shutdown_mysqld.inc
--let $start_mysqld_params = --wsrep_provider_options=base_port=$NODE_GALERAPORT_2;socket.ssl=yes;socket.ssl_ca=$MYSQL_TEST_DIR/std_data/galera-upgrade-ca-cert.pem;socket.ssl_cert=$MYSQL_TEST_DIR/std_data/galera-upgrade-server-cert.pem;socket.ssl_key=$MYSQL_TEST_DIR/std_data/galera-upgrade-server-key.pem
--source include/start_mysqld.inc
--source include/wait_until_connected_again.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';
# 4. Restart node #1 with the new socket.ssl_ca , socket.ssl_cert and socket.ssl_key
--connection node_1
--source include/shutdown_mysqld.inc
--let $start_mysqld_params = --wsrep-cluster-address=gcomm://127.0.0.1:$NODE_GALERAPORT_2 --wsrep_provider_options=base_port=$NODE_GALERAPORT_1;socket.ssl=yes;socket.ssl_ca=$MYSQL_TEST_DIR/std_data/galera-upgrade-ca-cert.pem;socket.ssl_cert=$MYSQL_TEST_DIR/std_data/galera-upgrade-server-cert.pem;socket.ssl_key=$MYSQL_TEST_DIR/std_data/galera-upgrade-server-key.pem
--source include/start_mysqld.inc
--source include/wait_until_connected_again.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';
# Upgrade complete. Both nodes now use the new key and certificate
!include ../galera_2nodes.cnf
# We do not set mysqldump-related SST options here because doing so on startup
# causes the first MTR connection to be forefully dropped by Galera, which in turn confuses MTR
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
[mysqld]
wsrep_debug=ON
ssl-ca=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem
ssl-cert=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem
ssl-key=@ENV.MYSQL_TEST_DIR/std_data/galera-key.pem
[client]
ssl-ca=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem
ssl-cert=@ENV.MYSQL_TEST_DIR/std_data/client-cert.pem
ssl-key=@ENV.MYSQL_TEST_DIR/std_data/client-key.pem
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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