-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #828 from tempesta-tech/sysprg/10.1-MDEV-10754
MDEV-10754 wsrep_sst_rsync does not support innodb_data_home_dir
- Loading branch information
Showing
8 changed files
with
379 additions
and
1 deletion.
There are no files selected for viewing
262 changes: 262 additions & 0 deletions
262
mysql-test/suite/galera/r/galera_sst_rsync_data_dir.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,262 @@ | ||
Performing State Transfer on a server that has been shut down cleanly and restarted | ||
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; | ||
Shutting down server ... | ||
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'); | ||
Starting server ... | ||
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; | ||
Performing State Transfer on a server that starts from a clean var directory | ||
This is accomplished by shutting down node #2 and removing its var directory before restarting it | ||
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; | ||
Shutting down server ... | ||
Cleaning var directory ... | ||
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'); | ||
Starting server ... | ||
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; | ||
Performing State Transfer on a server that has been killed and restarted | ||
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; | ||
Killing server ... | ||
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'); | ||
Performing --wsrep-recover ... | ||
Starting server ... | ||
Using --wsrep-start-position when starting mysqld ... | ||
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
!include ../galera_2nodes.cnf | ||
|
||
[mysqld] | ||
wsrep_sst_method=rsync | ||
|
||
[mysqld.1] | ||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true' | ||
|
||
[mysqld.2] | ||
innodb_data_home_dir=@ENV.MYSQL_TMP_DIR/rsync_test_2 | ||
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--source include/big_test.inc | ||
--source include/galera_cluster.inc | ||
|
||
--let $node_1=node_1 | ||
--let $node_2=node_2 | ||
--source include/auto_increment_offset_save.inc | ||
|
||
--source suite/galera/include/galera_st_shutdown_slave.inc | ||
--source suite/galera/include/galera_st_clean_slave.inc | ||
|
||
--source suite/galera/include/galera_st_kill_slave.inc | ||
--source suite/galera/include/galera_st_kill_slave_ddl.inc | ||
--source include/auto_increment_offset_restore.inc | ||
|
||
# cleanup temporary database files: | ||
--remove_files_wildcard $MYSQL_TMP_DIR/rsync_test_2 * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.