mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge branch '10.5' into '10.6'
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
# include/wait_condition_with_debug_and_kill.inc
|
||||
#
|
||||
# SUMMARY
|
||||
#
|
||||
# Waits until the passed statement returns true, or the operation
|
||||
# times out. If the operation times out, the additional error
|
||||
# statement will be executed and server is killed.
|
||||
#
|
||||
# USAGE
|
||||
#
|
||||
# let $wait_condition=
|
||||
# SELECT c = 3 FROM t;
|
||||
# let $wait_condition_on_error_output= select count(*) from t;
|
||||
# [let $explicit_default_wait_timeout= N] # to override the default reset
|
||||
# --source include/wait_condition_with_debug_and_kill.inc
|
||||
#
|
||||
# OR
|
||||
#
|
||||
# let $wait_timeout= 60; # Override default 30 seconds with 60.
|
||||
# let $wait_condition=
|
||||
# SELECT c = 3 FROM t;
|
||||
# let $wait_condition_on_error_output= select count(*) from t;
|
||||
# --source include/wait_condition_with_debug_and_kill.inc
|
||||
# --echo Executed the test condition $wait_condition_reps times
|
||||
#
|
||||
#
|
||||
# EXAMPLE
|
||||
# events_bugs.test, events_time_zone.test
|
||||
#
|
||||
|
||||
--source include/wait_condition_with_debug.inc
|
||||
if (!$success)
|
||||
{
|
||||
--source include/kill_galera.inc
|
||||
}
|
16
mysql-test/suite/galera/r/MDEV-35946.result
Normal file
16
mysql-test/suite/galera/r/MDEV-35946.result
Normal file
@@ -0,0 +1,16 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
|
||||
SET SESSION wsrep_sync_wait=0;
|
||||
SET SESSION wsrep_sync_wait=DEFAULT;
|
||||
DELETE FROM mysql.wsrep_streaming_log;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
SET SESSION wsrep_sync_wait=0;
|
||||
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
|
||||
VARIABLE_VALUE
|
||||
Primary
|
||||
SET SESSION wsrep_sync_wait=DEFAULT;
|
||||
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender (.*) is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
|
@@ -7,6 +7,7 @@ LOCK TABLE t1 WRITE;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
connection node_2;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
UNLOCK TABLES;
|
||||
COMMIT;
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
|
30
mysql-test/suite/galera/r/galera_ssl_cipher.result
Normal file
30
mysql-test/suite/galera/r/galera_ssl_cipher.result
Normal file
@@ -0,0 +1,30 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
# Correct Galera library found
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
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
|
||||
connection node_1;
|
||||
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
VARIABLE_VALUE = 2
|
||||
1
|
||||
connection node_2;
|
||||
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
VARIABLE_VALUE = 2
|
||||
1
|
||||
connection node_1;
|
||||
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
VARIABLE_VALUE = 2
|
||||
1
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
call mtr.add_suppression("WSREP: write_handler\\(\\)");
|
||||
connection node_2;
|
||||
call mtr.add_suppression("WSREP: write_handler\\(\\)");
|
41
mysql-test/suite/galera/t/MDEV-35946.test
Normal file
41
mysql-test/suite/galera/t/MDEV-35946.test
Normal file
@@ -0,0 +1,41 @@
|
||||
#
|
||||
# MDEV-35946: Assertion `thd->is_error()' failed in Sql_cmd_dml::prepare
|
||||
#
|
||||
--source include/have_innodb.inc
|
||||
--source include/galera_cluster.inc
|
||||
|
||||
# Save original auto_increment_offset values.
|
||||
--let $node_1=node_1
|
||||
--let $node_2=node_2
|
||||
--source include/auto_increment_offset_save.inc
|
||||
|
||||
#
|
||||
# Disconnect from the cluster
|
||||
#
|
||||
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=1';
|
||||
SET SESSION wsrep_sync_wait=0;
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
|
||||
--source include/wait_condition.inc
|
||||
SET SESSION wsrep_sync_wait=DEFAULT;
|
||||
|
||||
#
|
||||
# If bug is present, assertion will fire
|
||||
# during the execution of the following DELETE
|
||||
#
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
DELETE FROM mysql.wsrep_streaming_log;
|
||||
|
||||
|
||||
#
|
||||
# Reconnect to the cluster
|
||||
#
|
||||
SET SESSION wsrep_sync_wait=0;
|
||||
SET GLOBAL wsrep_provider_options = 'gmcast.isolate=0';
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 'Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
|
||||
--source include/wait_condition.inc
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
|
||||
SET SESSION wsrep_sync_wait=DEFAULT;
|
||||
|
||||
|
||||
--source include/auto_increment_offset_restore.inc
|
||||
CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender (.*) is not in state transfer \\(SYNCED\\)\\. Message ignored\\.");
|
5
mysql-test/suite/galera/t/galera_bf_abort_lock_table.cnf
Normal file
5
mysql-test/suite/galera/t/galera_bf_abort_lock_table.cnf
Normal file
@@ -0,0 +1,5 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
wsrep-debug=1
|
||||
loose-galera-bf-abort-lock-table=1
|
@@ -1,5 +1,6 @@
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/force_restart.inc
|
||||
|
||||
#
|
||||
# Test that a local LOCK TABLE will NOT be broken by an incoming remote transaction against that table
|
||||
@@ -16,13 +17,16 @@ LOCK TABLE t1 WRITE;
|
||||
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
|
||||
--let $wait_condition_on_error_output = SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
|
||||
--source include/wait_condition_with_debug_and_kill.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
|
||||
--let $wait_condition_on_error_output = SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
|
||||
--source include/wait_condition_with_debug_and_kill.inc
|
||||
|
||||
COMMIT;
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
|
11
mysql-test/suite/galera/t/galera_ssl_cipher.cnf
Normal file
11
mysql-test/suite/galera/t/galera_ssl_cipher.cnf
Normal file
@@ -0,0 +1,11 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld]
|
||||
loose-galera-ssl-cipher=1
|
||||
wsrep-debug=1
|
||||
|
||||
[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;cert.log_conflicts=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;cert.log_conflicts=YES'
|
82
mysql-test/suite/galera/t/galera_ssl_cipher.test
Normal file
82
mysql-test/suite/galera/t/galera_ssl_cipher.test
Normal file
@@ -0,0 +1,82 @@
|
||||
#
|
||||
# Test upgrading the SSL chipher
|
||||
#
|
||||
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_ssl_communication.inc
|
||||
--source include/have_openssl.inc
|
||||
--source include/force_restart.inc
|
||||
|
||||
#
|
||||
# Lowest supported Galera library version
|
||||
#
|
||||
--let $galera_version=26.4.21
|
||||
source ../wsrep/include/check_galera_version.inc;
|
||||
|
||||
# Save original auto_increment_offset values.
|
||||
--let $node_1=node_1
|
||||
--let $node_2=node_2
|
||||
--source include/auto_increment_offset_save.inc
|
||||
|
||||
# Setup galera ports
|
||||
--connection node_1
|
||||
--source suite/galera/include/galera_base_port.inc
|
||||
--let $NODE_GALERAPORT_1 = $_NODE_GALERAPORT
|
||||
|
||||
--connection node_2
|
||||
--source suite/galera/include/galera_base_port.inc
|
||||
--let $NODE_GALERAPORT_2 = $_NODE_GALERAPORT
|
||||
|
||||
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_cipher
|
||||
|
||||
--connection node_1
|
||||
--source include/shutdown_mysqld.inc
|
||||
--let $restart_noprint = 1
|
||||
--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;socket.ssl_cipher=AES256-SHA
|
||||
--source include/start_mysqld.inc
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
|
||||
--source include/wait_condition.inc
|
||||
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, socket.ssl_key and socket.ssl_cipher
|
||||
|
||||
--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;socket.ssl_cipher=AES256-SHA
|
||||
--source include/start_mysqld.inc
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
|
||||
--source include/wait_condition.inc
|
||||
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, socket.ssl_key and socket.ssl_cipher
|
||||
|
||||
--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;socket.ssl_cipher=AES256-SHA
|
||||
--source include/start_mysqld.inc
|
||||
--source include/wait_until_connected_again.inc
|
||||
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment';
|
||||
--source include/wait_condition.inc
|
||||
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
|
||||
# 5. Make sure node_2 is ready as well
|
||||
--connection node_2
|
||||
--source include/galera_wait_ready.inc
|
||||
|
||||
# Upgrade complete. Both nodes now use the new key and certificate
|
||||
|
||||
# Restore original auto_increment_offset values.
|
||||
--source include/auto_increment_offset_restore.inc
|
||||
|
||||
--connection node_1
|
||||
call mtr.add_suppression("WSREP: write_handler\\(\\)");
|
||||
--connection node_2
|
||||
call mtr.add_suppression("WSREP: write_handler\\(\\)");
|
@@ -1,9 +1,6 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
log-bin
|
||||
wsrep-debug=1
|
||||
|
||||
[mysqld.1]
|
||||
[mysqld]
|
||||
log-bin
|
||||
wsrep-debug=1
|
||||
loose-mysql-wsrep198=1
|
||||
|
@@ -22,7 +22,8 @@ LOCK TABLE t2 WRITE;
|
||||
--connection node_2
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'Waiting for table metadata lock'
|
||||
--source include/wait_condition.inc
|
||||
--let $wait_condition_on_error_output = SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
|
||||
--source include/wait_condition_with_debug_and_kill.inc
|
||||
|
||||
--connection node_1
|
||||
INSERT INTO t2 VALUES (1);
|
||||
|
Reference in New Issue
Block a user