mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge 10.6 into 10.11
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
SELECT plugin_name,plugin_version,plugin_maturity FROM information_schema.plugins where plugin_name like 'wsrep' ORDER BY plugin_maturity,plugin_name;
|
||||
SELECT plugin_name,plugin_version,plugin_maturity FROM information_schema.plugins WHERE plugin_name like 'wsrep' ORDER BY plugin_maturity,plugin_name;
|
||||
plugin_name plugin_version plugin_maturity
|
||||
wsrep 1.0 Stable
|
||||
|
18
mysql-test/suite/wsrep/r/wsrep-recover-gtid-nobinlog.result
Normal file
18
mysql-test/suite/wsrep/r/wsrep-recover-gtid-nobinlog.result
Normal file
@@ -0,0 +1,18 @@
|
||||
CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
# Case 1: Server goes through graceful shutdown and is restarted
|
||||
connection default;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
Expect 100-10-2
|
||||
SELECT WSREP_LAST_SEEN_GTID();
|
||||
WSREP_LAST_SEEN_GTID()
|
||||
100-10-2
|
||||
Performing --wsrep-recover ...
|
||||
Using --wsrep-start-position when starting mysqld ...
|
||||
Expect 100-10-2
|
||||
SELECT WSREP_LAST_SEEN_GTID();
|
||||
WSREP_LAST_SEEN_GTID()
|
||||
100-10-2
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
DROP TABLE t1;
|
65
mysql-test/suite/wsrep/r/wsrep-recover-gtid.result
Normal file
65
mysql-test/suite/wsrep/r/wsrep-recover-gtid.result
Normal file
@@ -0,0 +1,65 @@
|
||||
CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
# Case 1: Server goes through graceful shutdown and is restarted
|
||||
connection default;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
Performing --wsrep-recover ...
|
||||
Using --wsrep-start-position when starting mysqld ...
|
||||
Expect 100-10-2
|
||||
SELECT WSREP_LAST_SEEN_GTID();
|
||||
WSREP_LAST_SEEN_GTID()
|
||||
100-10-2
|
||||
SELECT @@GLOBAL.gtid_binlog_pos;
|
||||
@@GLOBAL.gtid_binlog_pos
|
||||
100-10-2
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
# Case 2: Server is killed after the transaction gets prepared
|
||||
# but before it is written into binlog. As there is not GTID assigned,
|
||||
# the transaction must be rolled back during recovery.
|
||||
connect con, localhost, root;
|
||||
SET DEBUG_SYNC = "ha_commit_trans_after_prepare SIGNAL reached WAIT_FOR continue";
|
||||
INSERT INTO t1 VALUES (2);
|
||||
connection default;
|
||||
SET DEBUG_SYNC = "now WAIT_FOR reached";
|
||||
# Kill the server
|
||||
Performing --wsrep-recover ...
|
||||
Using --wsrep-start-position when starting mysqld ...
|
||||
Expect 100-10-2
|
||||
SELECT WSREP_LAST_SEEN_GTID();
|
||||
WSREP_LAST_SEEN_GTID()
|
||||
100-10-2
|
||||
SELECT @@GLOBAL.gtid_binlog_pos;
|
||||
@@GLOBAL.gtid_binlog_pos
|
||||
100-10-2
|
||||
Expect 1
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
disconnect con;
|
||||
# Case 3: Server is killed after the transaction gets written into binlog
|
||||
# but before it is committed in storage engine. In this case the
|
||||
# transaction must be committed during recovery as it had a valid
|
||||
# GTID assigned.
|
||||
connect con, localhost, root;
|
||||
SET DEBUG_SYNC = "commit_before_get_LOCK_commit_ordered SIGNAL reached WAIT_FOR continue";
|
||||
INSERT INTO t1 VALUES (3);
|
||||
connection default;
|
||||
SET DEBUG_SYNC = "now WAIT_FOR reached";
|
||||
# Kill the server
|
||||
Performing --wsrep-recover ...
|
||||
Using --wsrep-start-position when starting mysqld ...
|
||||
Expect 100-10-3
|
||||
SELECT WSREP_LAST_SEEN_GTID();
|
||||
WSREP_LAST_SEEN_GTID()
|
||||
100-10-3
|
||||
SELECT @@GLOBAL.gtid_binlog_pos;
|
||||
@@GLOBAL.gtid_binlog_pos
|
||||
100-10-3
|
||||
Expect 1 3
|
||||
SELECT * FROM t1;
|
||||
f1
|
||||
1
|
||||
3
|
||||
disconnect con;
|
||||
DROP TABLE t1;
|
8
mysql-test/suite/wsrep/r/wsrep_mixed_case_cmd_arg.result
Normal file
8
mysql-test/suite/wsrep/r/wsrep_mixed_case_cmd_arg.result
Normal file
@@ -0,0 +1,8 @@
|
||||
#
|
||||
# MDEV-27126: my_getopt compares option names case sensitively
|
||||
#
|
||||
# Check if the variable is set correctly from options
|
||||
SELECT @@GLOBAL.wsrep_slave_uk_checks;
|
||||
@@GLOBAL.wsrep_slave_uk_checks
|
||||
1
|
||||
# End of test.
|
@@ -9,9 +9,9 @@ return wsrep_not_ok() if wsrep_not_ok();
|
||||
|
||||
push @::global_suppressions,
|
||||
(
|
||||
qr(WSREP: Could not open saved state file for reading: .*),
|
||||
qr(WSREP: Could not open state file for reading: .*),
|
||||
qr|WSREP: access file\(.*gvwstate.dat\) failed\(No such file or directory\)|,
|
||||
qr(WSREP: Could not open saved state file for reading: ),
|
||||
qr(WSREP: Could not open state file for reading: ),
|
||||
qr|WSREP: access file\(.*gvwstate.dat\) failed ?\(No such file or directory\)|,
|
||||
);
|
||||
|
||||
bless { };
|
||||
|
@@ -5,4 +5,3 @@ wsrep-on=ON
|
||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep-cluster-address=gcomm://
|
||||
innodb_autoinc_lock_mode=2
|
||||
|
||||
|
@@ -17,4 +17,3 @@ SELECT * FROM test.c;
|
||||
# Cleanup
|
||||
DROP TABLE c;
|
||||
DROP TABLE p;
|
||||
|
||||
|
@@ -9,4 +9,3 @@
|
||||
|
||||
SELECT @@wsrep_on;
|
||||
SET @@GLOBAL.wsrep_cluster_address='gcomm://';
|
||||
|
||||
|
@@ -4,4 +4,3 @@
|
||||
wsrep-on=ON
|
||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep-cluster-address=gcomm://
|
||||
|
||||
|
@@ -5,4 +5,4 @@
|
||||
# MDEV-7604: wsrep plugin lists its status as Unknown
|
||||
#
|
||||
|
||||
SELECT plugin_name,plugin_version,plugin_maturity FROM information_schema.plugins where plugin_name like 'wsrep' ORDER BY plugin_maturity,plugin_name;
|
||||
SELECT plugin_name,plugin_version,plugin_maturity FROM information_schema.plugins WHERE plugin_name like 'wsrep' ORDER BY plugin_maturity,plugin_name;
|
||||
|
@@ -1,3 +1,4 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_wsrep_enabled.inc
|
||||
--source include/have_binlog_format_row.inc
|
||||
|
||||
|
@@ -23,4 +23,3 @@ SHOW STATUS LIKE 'wsrep_thread_count';
|
||||
--echo # variables
|
||||
|
||||
SELECT VARIABLE_NAME FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE "wsrep%" ORDER BY VARIABLE_NAME;
|
||||
|
||||
|
@@ -8,7 +8,7 @@
|
||||
--let $galera_version=26.4.21
|
||||
source include/check_galera_version.inc;
|
||||
|
||||
source include/galera_variables_ok.inc;
|
||||
source include/galera_variables_ok_debug.inc;
|
||||
|
||||
--replace_column 2 #
|
||||
SHOW GLOBAL STATUS LIKE 'wsrep%';
|
||||
@@ -25,4 +25,3 @@ SHOW STATUS LIKE 'wsrep_thread_count';
|
||||
--echo # variables
|
||||
|
||||
SELECT VARIABLE_NAME FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE "wsrep%" ORDER BY VARIABLE_NAME;
|
||||
|
||||
|
10
mysql-test/suite/wsrep/t/wsrep-recover-gtid-nobinlog.cnf
Normal file
10
mysql-test/suite/wsrep/t/wsrep-recover-gtid-nobinlog.cnf
Normal file
@@ -0,0 +1,10 @@
|
||||
!include ../my.cnf
|
||||
|
||||
[mysqld.1]
|
||||
wsrep-on=ON
|
||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep-cluster-address=gcomm://
|
||||
binlog-format=ROW
|
||||
wsrep-gtid-domain-id=100
|
||||
server-id=10
|
||||
innodb-autoinc-lock-mode=2
|
28
mysql-test/suite/wsrep/t/wsrep-recover-gtid-nobinlog.test
Normal file
28
mysql-test/suite/wsrep/t/wsrep-recover-gtid-nobinlog.test
Normal file
@@ -0,0 +1,28 @@
|
||||
# Test wsrep GTID recovery with binlog off. The test restarts the server
|
||||
# and verifies that the GTID returned by SELECT WSREP_LAST_SEEN_GTID()
|
||||
# gets initialized properly during server restart.
|
||||
#
|
||||
--source include/have_wsrep.inc
|
||||
--source include/have_wsrep_provider.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_debug_sync.inc
|
||||
|
||||
CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
|
||||
--echo # Case 1: Server goes through graceful shutdown and is restarted
|
||||
--connection default
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
--echo Expect 100-10-2
|
||||
SELECT WSREP_LAST_SEEN_GTID();
|
||||
|
||||
--source include/shutdown_mysqld.inc
|
||||
--let $galera_wsrep_recover_server_id = 1
|
||||
--source suite/galera/include/galera_wsrep_recover.inc
|
||||
--source suite/galera/include/start_mysqld.inc
|
||||
|
||||
--echo Expect 100-10-2
|
||||
SELECT WSREP_LAST_SEEN_GTID();
|
||||
SELECT * FROM t1;
|
||||
|
||||
DROP TABLE t1;
|
14
mysql-test/suite/wsrep/t/wsrep-recover-gtid.cnf
Normal file
14
mysql-test/suite/wsrep/t/wsrep-recover-gtid.cnf
Normal file
@@ -0,0 +1,14 @@
|
||||
!include ../my.cnf
|
||||
|
||||
[mysqld.1]
|
||||
wsrep-on=ON
|
||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep-cluster-address=gcomm://
|
||||
binlog-format=ROW
|
||||
log-bin
|
||||
log-slave-updates
|
||||
gtid-domain-id=10
|
||||
gtid-strict-mode=ON
|
||||
wsrep-gtid-mode=ON
|
||||
wsrep-gtid-domain-id=100
|
||||
server-id=10
|
73
mysql-test/suite/wsrep/t/wsrep-recover-gtid.test
Normal file
73
mysql-test/suite/wsrep/t/wsrep-recover-gtid.test
Normal file
@@ -0,0 +1,73 @@
|
||||
# Test wsrep recovery with gtid_mode=ON. The test crashes the server
|
||||
# in different commit stages and verifies that the GTID returned by
|
||||
# SELECT WSREP_LAST_SEEN_GTID() and @@GLOBAL.gtid_binlog_pos get
|
||||
# initialized properly during server restart.
|
||||
#
|
||||
--source include/have_wsrep.inc
|
||||
--source include/have_wsrep_provider.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_log_bin.inc
|
||||
--source include/have_debug_sync.inc
|
||||
|
||||
CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
|
||||
--echo # Case 1: Server goes through graceful shutdown and is restarted
|
||||
--connection default
|
||||
INSERT INTO t1 VALUES (1);
|
||||
--source include/shutdown_mysqld.inc
|
||||
--let $galera_wsrep_recover_server_id = 1
|
||||
--source suite/galera/include/galera_wsrep_recover.inc
|
||||
--source suite/galera/include/start_mysqld.inc
|
||||
|
||||
--echo Expect 100-10-2
|
||||
SELECT WSREP_LAST_SEEN_GTID();
|
||||
SELECT @@GLOBAL.gtid_binlog_pos;
|
||||
SELECT * FROM t1;
|
||||
|
||||
--echo # Case 2: Server is killed after the transaction gets prepared
|
||||
--echo # but before it is written into binlog. As there is not GTID assigned,
|
||||
--echo # the transaction must be rolled back during recovery.
|
||||
--connect con, localhost, root
|
||||
SET DEBUG_SYNC = "ha_commit_trans_after_prepare SIGNAL reached WAIT_FOR continue";
|
||||
--send INSERT INTO t1 VALUES (2)
|
||||
|
||||
--connection default
|
||||
SET DEBUG_SYNC = "now WAIT_FOR reached";
|
||||
--source include/kill_mysqld.inc
|
||||
--let $galera_wsrep_recover_server_id = 1
|
||||
--source suite/galera/include/galera_wsrep_recover.inc
|
||||
--source suite/galera/include/start_mysqld.inc
|
||||
--source include/wait_wsrep_ready.inc
|
||||
|
||||
--echo Expect 100-10-2
|
||||
SELECT WSREP_LAST_SEEN_GTID();
|
||||
SELECT @@GLOBAL.gtid_binlog_pos;
|
||||
--echo Expect 1
|
||||
SELECT * FROM t1;
|
||||
--disconnect con
|
||||
|
||||
--echo # Case 3: Server is killed after the transaction gets written into binlog
|
||||
--echo # but before it is committed in storage engine. In this case the
|
||||
--echo # transaction must be committed during recovery as it had a valid
|
||||
--echo # GTID assigned.
|
||||
|
||||
--connect con, localhost, root
|
||||
SET DEBUG_SYNC = "commit_before_get_LOCK_commit_ordered SIGNAL reached WAIT_FOR continue";
|
||||
--send INSERT INTO t1 VALUES (3)
|
||||
|
||||
--connection default
|
||||
SET DEBUG_SYNC = "now WAIT_FOR reached";
|
||||
--source include/kill_mysqld.inc
|
||||
--let $galera_wsrep_recover_server_id = 1
|
||||
--source suite/galera/include/galera_wsrep_recover.inc
|
||||
--source suite/galera/include/start_mysqld.inc
|
||||
--source include/wait_wsrep_ready.inc
|
||||
--echo Expect 100-10-3
|
||||
SELECT WSREP_LAST_SEEN_GTID();
|
||||
SELECT @@GLOBAL.gtid_binlog_pos;
|
||||
--echo Expect 1 3
|
||||
SELECT * FROM t1;
|
||||
|
||||
--disconnect con
|
||||
|
||||
DROP TABLE t1;
|
@@ -6,4 +6,4 @@ binlog-format=ROW
|
||||
innodb-flush-log-at-trx-commit=1
|
||||
wsrep-cluster-address=gcomm://
|
||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
innodb-autoinc-lock-mode=2
|
||||
innodb-autoinc-lock-mode=2
|
||||
|
@@ -2,7 +2,6 @@
|
||||
--source include/have_wsrep_provider.inc
|
||||
--source include/have_binlog_format_row.inc
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # wsrep_forced_binlog_format
|
||||
--echo #
|
||||
|
6
mysql-test/suite/wsrep/t/wsrep_mixed_case_cmd_arg.cnf
Normal file
6
mysql-test/suite/wsrep/t/wsrep_mixed_case_cmd_arg.cnf
Normal file
@@ -0,0 +1,6 @@
|
||||
!include ../my.cnf
|
||||
|
||||
[mysqld.1]
|
||||
wsrep-on=ON
|
||||
wsrep-provider=@ENV.WSREP_PROVIDER
|
||||
wsrep-cluster-address=gcomm://
|
1
mysql-test/suite/wsrep/t/wsrep_mixed_case_cmd_arg.opt
Normal file
1
mysql-test/suite/wsrep/t/wsrep_mixed_case_cmd_arg.opt
Normal file
@@ -0,0 +1 @@
|
||||
--wsrep-slave-uk-checks=1
|
11
mysql-test/suite/wsrep/t/wsrep_mixed_case_cmd_arg.test
Normal file
11
mysql-test/suite/wsrep/t/wsrep_mixed_case_cmd_arg.test
Normal file
@@ -0,0 +1,11 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_wsrep_provider.inc
|
||||
--source include/have_binlog_format_row.inc
|
||||
--echo #
|
||||
--echo # MDEV-27126: my_getopt compares option names case sensitively
|
||||
--echo #
|
||||
|
||||
--echo # Check if the variable is set correctly from options
|
||||
SELECT @@GLOBAL.wsrep_slave_uk_checks;
|
||||
|
||||
--echo # End of test.
|
@@ -41,4 +41,3 @@ eval SET @@GLOBAL.wsrep_max_ws_rows = $wsrep_max_ws_rows_slave;
|
||||
|
||||
--source include/rpl_end.inc
|
||||
--echo # End of test.
|
||||
|
||||
|
@@ -44,7 +44,6 @@ SET GLOBAL wsrep_sst_method='method;';
|
||||
SELECT @@global.wsrep_sst_method;
|
||||
SHOW WARNINGS;
|
||||
|
||||
|
||||
--disable_query_log
|
||||
SET @@global.wsrep_sst_method = @wsrep_sst_method_saved;
|
||||
--enable_query_log
|
||||
|
@@ -9,4 +9,3 @@ wsrep-on=OFF
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
|
||||
|
Reference in New Issue
Block a user