Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Merge 10.3 into 10.4
We omit commit a3bdce8 and commit a0e2a29 because they would make the test galera_3nodes.galera_gtid_2_cluster fail and disable it.
- Loading branch information
Showing
12 changed files
with
248 additions
and
106 deletions.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| SET default_storage_engine = InnoDB; | ||
| CREATE TABLE t1 (pk INT PRIMARY KEY, c VARCHAR(256)); | ||
| CREATE TABLE t2 AS SELECT * FROM t1; | ||
| drop table t1,t2; | ||
| SET GLOBAL innodb_encryption_threads = 0; | ||
| SET GLOBAL innodb_encryption_threads = 4; | ||
| CREATE TABLE `table10_int_autoinc` (`col_int_key` int, pk int auto_increment, `col_int` int, key (`col_int_key` ),primary key (pk)) engine=innodb; | ||
| INSERT /*! IGNORE */ INTO table10_int_autoinc VALUES (NULL, NULL, -474021888) , (1, NULL, NULL) , (1141047296, NULL, NULL) , (NULL, NULL, NULL) , (NULL, NULL, 1) , (NULL, NULL, 9) , (0, NULL, 1225785344) , (NULL, NULL, 1574174720) , (2, NULL, NULL) , (6, NULL, 3); | ||
| CREATE TABLE `table1_int_autoinc` (`col_int_key` int, pk int auto_increment, `col_int` int,key (`col_int_key` ), primary key (pk)) engine=innodb; | ||
| CREATE TABLE `table0_int_autoinc` (`col_int_key` int, pk int auto_increment, `col_int` int, key (`col_int_key` ),primary key (pk)) engine=innodb; | ||
| INSERT /*! IGNORE */ INTO table1_int_autoinc VALUES (4, NULL, NULL); | ||
| INSERT IGNORE INTO `table0_int_autoinc` ( `col_int_key` ) VALUES ( 1 ), ( 3 ), ( 4 ), ( 1 ); | ||
| INSERT IGNORE INTO `table1_int_autoinc` ( `col_int` ) VALUES ( 1 ), ( 0 ), ( 7 ), ( 9 ); | ||
| INSERT IGNORE INTO `table10_int_autoinc` ( `col_int` ) VALUES ( 6 ), ( 2 ), ( 3 ), ( 6 ); | ||
| # Wait max 10 min for key encryption threads to decrypt all spaces | ||
| # Success! | ||
| SET GLOBAL innodb_encryption_threads = 0; | ||
| SET GLOBAL innodb_encrypt_tables = OFF; | ||
| DROP TABLE table0_int_autoinc, table1_int_autoinc, table10_int_autoinc; | ||
| # restart |
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
File renamed without changes.
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,86 @@ | ||
| --source include/have_innodb.inc | ||
| --source include/have_file_key_management_plugin.inc | ||
| --source include/not_embedded.inc | ||
| # This is needed for longer testcase timeout at least P7/P8 | ||
| --source include/big_test.inc | ||
|
|
||
| # | ||
| # MDEV-8164: Server crashes in pfs_mutex_enter_func after fil_crypt_is_closing or alike | ||
| # | ||
| SET default_storage_engine = InnoDB; | ||
|
|
||
| CREATE TABLE t1 (pk INT PRIMARY KEY, c VARCHAR(256)); | ||
| CREATE TABLE t2 AS SELECT * FROM t1; | ||
|
|
||
| --disable_abort_on_error | ||
| --disable_warnings | ||
| --disable_query_log | ||
|
|
||
| let $i = 40; | ||
| while ($i) | ||
| { | ||
| SET GLOBAL innodb_encrypt_tables = ON; | ||
| SET GLOBAL innodb_encryption_threads = 1; | ||
| CREATE OR REPLACE TABLE t1 AS SELECT * FROM t2; | ||
| CREATE OR REPLACE TABLE t2 AS SELECT * FROM t1; | ||
| SET GLOBAL innodb_encryption_rotation_iops = 100; | ||
| SET GLOBAL innodb_encrypt_tables = OFF; | ||
| CREATE OR REPLACE TABLE t2 AS SELECT * FROM t1; | ||
| CREATE OR REPLACE TABLE t1 AS SELECT * FROM t2; | ||
| dec $i; | ||
| } | ||
|
|
||
| --enable_abort_on_error | ||
| --enable_warnings | ||
| --enable_query_log | ||
|
|
||
| drop table t1,t2; | ||
| SET GLOBAL innodb_encryption_threads = 0; | ||
|
|
||
| # | ||
| # MDEV-8173: InnoDB; Failing assertion: crypt_data->type == 1 | ||
| # | ||
|
|
||
| SET GLOBAL innodb_encryption_threads = 4; | ||
|
|
||
| CREATE TABLE `table10_int_autoinc` (`col_int_key` int, pk int auto_increment, `col_int` int, key (`col_int_key` ),primary key (pk)) engine=innodb; | ||
| INSERT /*! IGNORE */ INTO table10_int_autoinc VALUES (NULL, NULL, -474021888) , (1, NULL, NULL) , (1141047296, NULL, NULL) , (NULL, NULL, NULL) , (NULL, NULL, 1) , (NULL, NULL, 9) , (0, NULL, 1225785344) , (NULL, NULL, 1574174720) , (2, NULL, NULL) , (6, NULL, 3); | ||
|
|
||
| CREATE TABLE `table1_int_autoinc` (`col_int_key` int, pk int auto_increment, `col_int` int,key (`col_int_key` ), primary key (pk)) engine=innodb; | ||
|
|
||
| CREATE TABLE `table0_int_autoinc` (`col_int_key` int, pk int auto_increment, `col_int` int, key (`col_int_key` ),primary key (pk)) engine=innodb; | ||
|
|
||
| INSERT /*! IGNORE */ INTO table1_int_autoinc VALUES (4, NULL, NULL); | ||
| INSERT IGNORE INTO `table0_int_autoinc` ( `col_int_key` ) VALUES ( 1 ), ( 3 ), ( 4 ), ( 1 ); | ||
| INSERT IGNORE INTO `table1_int_autoinc` ( `col_int` ) VALUES ( 1 ), ( 0 ), ( 7 ), ( 9 ); | ||
| INSERT IGNORE INTO `table10_int_autoinc` ( `col_int` ) VALUES ( 6 ), ( 2 ), ( 3 ), ( 6 ); | ||
|
|
||
| --echo # Wait max 10 min for key encryption threads to decrypt all spaces | ||
| let $cnt=600; | ||
| while ($cnt) | ||
| { | ||
| let $success=`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0`; | ||
| if ($success) | ||
| { | ||
| let $cnt=0; | ||
| } | ||
| if (!$success) | ||
| { | ||
| real_sleep 1; | ||
| dec $cnt; | ||
| } | ||
| } | ||
| if (!$success) | ||
| { | ||
| SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION; | ||
| SHOW STATUS LIKE 'innodb_encryption%'; | ||
| -- die Timeout waiting for encryption threads | ||
| } | ||
| --echo # Success! | ||
|
|
||
| SET GLOBAL innodb_encryption_threads = 0; | ||
| SET GLOBAL innodb_encrypt_tables = OFF; | ||
|
|
||
| DROP TABLE table0_int_autoinc, table1_int_autoinc, table10_int_autoinc; | ||
|
|
||
| -- source include/restart_mysqld.inc |
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 @@ | ||
| --loose-innodb-log-file-size=1048576 --loose-innodb-log-files-in-group=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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| CREATE TABLE t(i INT) ENGINE=INNODB; | ||
| INSERT INTO t VALUES | ||
| (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), | ||
| (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), | ||
| (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), | ||
| (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), | ||
| (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), | ||
| (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), | ||
| (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), | ||
| (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), | ||
| (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), | ||
| (0), (1), (2), (3), (4), (5), (6), (7), (8), (9); | ||
| # Generate enough data to overwrite innodb redo log | ||
| # on the next "INSERT INTO t SELECT * FROM t" execution. | ||
| INSERT INTO t SELECT * FROM t; | ||
| INSERT INTO t SELECT * FROM t; | ||
| INSERT INTO t SELECT * FROM t; | ||
| INSERT INTO t SELECT * FROM t; | ||
| INSERT INTO t SELECT * FROM t; | ||
| INSERT INTO t SELECT * FROM t; | ||
| INSERT INTO t SELECT * FROM t; | ||
| INSERT INTO t SELECT * FROM t; | ||
| INSERT INTO t SELECT * FROM t; | ||
| # xtrabackup backup | ||
| FOUND 1 /failed: redo log block is overwritten/ in backup.log | ||
| FOUND 1 /failed: redo log block checksum does not match/ in backup.log | ||
| FOUND 1 /failed: unknown reason/ in backup.log | ||
| DROP TABLE t; |
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,70 @@ | ||
| --source include/have_innodb.inc | ||
| --source include/have_debug_sync.inc | ||
|
|
||
| CREATE TABLE t(i INT) ENGINE=INNODB; | ||
|
|
||
| INSERT INTO t VALUES | ||
| (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), | ||
| (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), | ||
| (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), | ||
| (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), | ||
| (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), | ||
| (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), | ||
| (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), | ||
| (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), | ||
| (0), (1), (2), (3), (4), (5), (6), (7), (8), (9), | ||
| (0), (1), (2), (3), (4), (5), (6), (7), (8), (9); | ||
| --echo # Generate enough data to overwrite innodb redo log | ||
| --echo # on the next "INSERT INTO t SELECT * FROM t" execution. | ||
| --let $i = 0 | ||
| while ($i < 9) { | ||
| INSERT INTO t SELECT * FROM t; | ||
| --inc $i | ||
| } | ||
|
|
||
| --echo # xtrabackup backup | ||
| --let $targetdir=$MYSQLTEST_VARDIR/tmp/backup | ||
| --let $backuplog=$MYSQLTEST_VARDIR/tmp/backup.log | ||
|
|
||
| --let before_innodb_log_copy_thread_started=INSERT INTO test.t SELECT * FROM test.t | ||
|
|
||
| --disable_result_log | ||
| --error 1 | ||
| --exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --dbug=+d,mariabackup_events > $backuplog | ||
| --enable_result_log | ||
|
|
||
| --let SEARCH_PATTERN=failed: redo log block is overwritten | ||
| --let SEARCH_FILE=$backuplog | ||
| --source include/search_pattern_in_file.inc | ||
| --remove_file $backuplog | ||
| --rmdir $targetdir | ||
|
|
||
| --let before_innodb_log_copy_thread_started=INSERT INTO test.t VALUES (0), (1), (2), (3), (4), (5), (6), (7), (8), (9) | ||
|
|
||
| --disable_result_log | ||
| --error 1 | ||
| --exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --dbug=+d,mariabackup_events,log_checksum_mismatch > $backuplog | ||
| --enable_result_log | ||
|
|
||
| --let SEARCH_PATTERN=failed: redo log block checksum does not match | ||
| --let SEARCH_FILE=$backuplog | ||
| --source include/search_pattern_in_file.inc | ||
| --remove_file $backuplog | ||
| --rmdir $targetdir | ||
|
|
||
| --let before_innodb_log_copy_thread_started=INSERT INTO test.t SELECT * FROM test.t LIMIT 50000 | ||
|
|
||
| --disable_result_log | ||
| --error 1 | ||
| --exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir --innodb-log-checksums=0 --dbug=+d,mariabackup_events > $backuplog | ||
| --enable_result_log | ||
|
|
||
| --let SEARCH_PATTERN=failed: unknown reason | ||
| --let SEARCH_FILE=$backuplog | ||
| --source include/search_pattern_in_file.inc | ||
| --remove_file $backuplog | ||
| --rmdir $targetdir | ||
|
|
||
| --let before_innodb_log_copy_thread_started= | ||
|
|
||
| DROP TABLE t; |
Oops, something went wrong.