diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 13:22:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-18 13:22:53 +0000 |
commit | 347c164c35eddab388009470e6848cb361ac93f8 (patch) | |
tree | 2c0c44eac690f510bb0a35b2a13b36d606b77b6b /mysql-test/suite/encryption | |
parent | Releasing progress-linux version 1:10.11.7-4~progress7.99u1. (diff) | |
download | mariadb-347c164c35eddab388009470e6848cb361ac93f8.tar.xz mariadb-347c164c35eddab388009470e6848cb361ac93f8.zip |
Merging upstream version 1:10.11.8.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/encryption')
20 files changed, 77 insertions, 66 deletions
diff --git a/mysql-test/suite/encryption/r/corrupted_during_recovery.result b/mysql-test/suite/encryption/r/corrupted_during_recovery.result index 7329999d..8fef209e 100644 --- a/mysql-test/suite/encryption/r/corrupted_during_recovery.result +++ b/mysql-test/suite/encryption/r/corrupted_during_recovery.result @@ -9,7 +9,7 @@ INSERT INTO t2 VALUES(2); SELECT * FROM t1; ERROR 42000: Unknown storage engine 'InnoDB' SELECT * FROM t1; -Got one of the listed errors +ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate. SELECT * FROM t2; a 2 diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change.result b/mysql-test/suite/encryption/r/innodb-bad-key-change.result index e2034f14..e69d427e 100644 --- a/mysql-test/suite/encryption/r/innodb-bad-key-change.result +++ b/mysql-test/suite/encryption/r/innodb-bad-key-change.result @@ -32,7 +32,7 @@ foobar 2 # Restart server with keysbad3.txt # restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keysbad3.txt SELECT * FROM t1; -ERROR 42S02: Table 'test.t1' doesn't exist in engine +ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate. # restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keysbad3.txt DROP TABLE t1; # Start server with keys3.txt @@ -44,31 +44,31 @@ INSERT INTO t2 VALUES ('foobar',1,2); # Restart server with keys2.txt # restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt SELECT * FROM t2; -ERROR 42S02: Table 'test.t2' doesn't exist in engine +ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate. SELECT * FROM t2 where id = 1; -ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate. +ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate. SELECT * FROM t2 where b = 1; -ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate. +ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate. INSERT INTO t2 VALUES ('tmp',3,3); -ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate. +ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate. DELETE FROM t2 where b = 3; -ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate. +ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate. DELETE FROM t2 where id = 3; -ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate. +ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate. UPDATE t2 set b = b +1; -ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate. +ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate. OPTIMIZE TABLE t2; Table Op Msg_type Msg_text -test.t2 optimize Error Table test/t2 is corrupted. Please drop the table and recreate. +test.t2 optimize Error Table `test`.`t2` is corrupted. Please drop the table and recreate. test.t2 optimize error Corrupt ALTER TABLE t2 ADD COLUMN d INT; -ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate. +ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate. ANALYZE TABLE t2; Table Op Msg_type Msg_text -test.t2 analyze Error Table test/t2 is corrupted. Please drop the table and recreate. +test.t2 analyze Error Table `test`.`t2` is corrupted. Please drop the table and recreate. test.t2 analyze error Corrupt TRUNCATE TABLE t2; -ERROR HY000: Table test/t2 is corrupted. Please drop the table and recreate. +ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate. DROP TABLE t2; # Start server with keys2.txt diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change2.result b/mysql-test/suite/encryption/r/innodb-bad-key-change2.result index 3cda2bd5..c02c543a 100644 --- a/mysql-test/suite/encryption/r/innodb-bad-key-change2.result +++ b/mysql-test/suite/encryption/r/innodb-bad-key-change2.result @@ -14,24 +14,24 @@ ENCRYPTED=YES ENCRYPTION_KEY_ID=4; INSERT INTO t1 VALUES (1,'foo'),(2,'bar'); # restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt SELECT * FROM t1; -ERROR 42S02: Table 'test.t1' doesn't exist in engine +ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate. SHOW WARNINGS; Level Code Message -Error 1932 Table 'test.t1' doesn't exist in engine +Error 1877 Table `test`.`t1` is corrupted. Please drop the table and recreate. ALTER TABLE t1 ENGINE=InnoDB; -ERROR HY000: Table test/t1 is corrupted. Please drop the table and recreate. +ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate. SHOW WARNINGS; Level Code Message -Error 1877 Table test/t1 is corrupted. Please drop the table and recreate. +Error 1877 Table `test`.`t1` is corrupted. Please drop the table and recreate. OPTIMIZE TABLE t1; Table Op Msg_type Msg_text -test.t1 optimize Error Table test/t1 is corrupted. Please drop the table and recreate. +test.t1 optimize Error Table `test`.`t1` is corrupted. Please drop the table and recreate. test.t1 optimize error Corrupt SHOW WARNINGS; Level Code Message CHECK TABLE t1; Table Op Msg_type Msg_text -test.t1 check Error Table test/t1 is corrupted. Please drop the table and recreate. +test.t1 check Error Table `test`.`t1` is corrupted. Please drop the table and recreate. test.t1 check error Corrupt SHOW WARNINGS; Level Code Message @@ -41,7 +41,7 @@ backup: t1 UNLOCK TABLES; # restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt ALTER TABLE t1 DISCARD TABLESPACE; -ERROR 42S02: Table 'test.t1' doesn't exist in engine +ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate. DROP TABLE t1; CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES ENCRYPTION_KEY_ID=4; @@ -62,7 +62,7 @@ t1 CREATE TABLE `t1` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci `ENCRYPTED`=YES `ENCRYPTION_KEY_ID`=4 # restart: --innodb-encrypt-tables --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt RENAME TABLE t1 TO t1new; -ERROR HY000: Error on rename of './test/t1' to './test/t1new' (errno: 155 "The table does not exist in the storage engine") +ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate. ALTER TABLE t1 RENAME TO t1new; -ERROR HY000: Table test/t1 is corrupted. Please drop the table and recreate. +ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate. DROP TABLE t1; diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change4.result b/mysql-test/suite/encryption/r/innodb-bad-key-change4.result index e808d50b..40b377e6 100644 --- a/mysql-test/suite/encryption/r/innodb-bad-key-change4.result +++ b/mysql-test/suite/encryption/r/innodb-bad-key-change4.result @@ -12,13 +12,13 @@ INSERT INTO t1 VALUES (1,'foo'),(2,'bar'); # restart: --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt OPTIMIZE TABLE t1; Table Op Msg_type Msg_text -test.t1 optimize Error Table 'test.t1' doesn't exist in engine -test.t1 optimize status Operation failed +test.t1 optimize Error Table `test`.`t1` is corrupted. Please drop the table and recreate. +test.t1 optimize error Corrupt SHOW WARNINGS; Level Code Message CHECK TABLE t1; Table Op Msg_type Msg_text -test.t1 check Error Table test/t1 is corrupted. Please drop the table and recreate. +test.t1 check Error Table `test`.`t1` is corrupted. Please drop the table and recreate. test.t1 check error Corrupt SHOW WARNINGS; Level Code Message diff --git a/mysql-test/suite/encryption/r/innodb-compressed-blob.result b/mysql-test/suite/encryption/r/innodb-compressed-blob.result index 0dc873b9..6c645ecf 100644 --- a/mysql-test/suite/encryption/r/innodb-compressed-blob.result +++ b/mysql-test/suite/encryption/r/innodb-compressed-blob.result @@ -1,7 +1,7 @@ call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted; key_version=1"); call mtr.add_suppression("InnoDB: Recovery failed to read page"); call mtr.add_suppression("InnoDB: Unable to decompress ..test.t[1-3]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]"); -call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` is corrupted"); +call mtr.add_suppression("Table `test`\\.`t[12]` is corrupted"); # Restart mysqld --file-key-management-filename=keys2.txt # restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt SET GLOBAL innodb_file_per_table = ON; @@ -17,9 +17,9 @@ insert into t3 values (1, repeat('secret',6000)); # Restart mysqld --file-key-management-filename=keys3.txt # restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys3.txt select count(*) from t1 FORCE INDEX (b) where b like 'secret%'; -ERROR 42S02: Table 'test.t1' doesn't exist in engine +ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate. select count(*) from t2 FORCE INDEX (b) where b like 'secret%'; -ERROR 42S02: Table 'test.t2' doesn't exist in engine +ERROR HY000: Table `test`.`t2` is corrupted. Please drop the table and recreate. select count(*) from t3 FORCE INDEX (b) where b like 'secret%'; count(*) 1 diff --git a/mysql-test/suite/encryption/r/innodb-encryption-disable.result b/mysql-test/suite/encryption/r/innodb-encryption-disable.result index 179bc550..86c6d636 100644 --- a/mysql-test/suite/encryption/r/innodb-encryption-disable.result +++ b/mysql-test/suite/encryption/r/innodb-encryption-disable.result @@ -1,8 +1,7 @@ -call mtr.add_suppression("InnoDB: Table `test`\\.`t[15]` (has an unreadable root page|is corrupted)"); +call mtr.add_suppression("Table `test`\\.`t[15]` (has an unreadable root page|is corrupted)"); call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[15]\\.ibd' cannot be decrypted\\."); call mtr.add_suppression("InnoDB: Recovery failed to read page"); call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t[15].ibd looks corrupted; key_version=1"); -call mtr.add_suppression("InnoDB: Table `test`\\.`t[15]` is corrupted"); call mtr.add_suppression("Couldn't load plugins from 'file_key_management"); # restart: --innodb-encrypt-tables=ON --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt create table t5 ( @@ -24,9 +23,9 @@ insert into t1 values (1,2,'maria','db','encryption'); alter table t1 encrypted='yes' `encryption_key_id`=1; # restart: --innodb-encrypt-tables=OFF select * from t1; -ERROR 42S02: Table 'test.t1' doesn't exist in engine +ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate. select * from t5; -ERROR 42S02: Table 'test.t5' doesn't exist in engine +ERROR HY000: Table `test`.`t5` is corrupted. Please drop the table and recreate. # restart: --innodb-encrypt-tables=ON --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt drop table t1; drop table t5; diff --git a/mysql-test/suite/encryption/r/innodb-force-corrupt.result b/mysql-test/suite/encryption/r/innodb-force-corrupt.result index ad75df95..16cce1d2 100644 --- a/mysql-test/suite/encryption/r/innodb-force-corrupt.result +++ b/mysql-test/suite/encryption/r/innodb-force-corrupt.result @@ -1,4 +1,4 @@ -call mtr.add_suppression("InnoDB: Table `test`\\.`t[13]` (has an unreadable root page|is corrupted)"); +call mtr.add_suppression("Table `test`\\.`t[13]` (has an unreadable root page|is corrupted)"); call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=\\d+, page number=[36]\\] in file .*test.t[123]\\.ibd looks corrupted; key_version="); call mtr.add_suppression("\\[ERROR\\] InnoDB: We detected index corruption in an InnoDB type table"); call mtr.add_suppression("\\[ERROR\\] (mysqld|mariadbd).*: Index for table 't2' is corrupt; try to repair it"); @@ -18,11 +18,11 @@ COMMIT; # Corrupt tables # restart SELECT * FROM t1; -ERROR 42S02: Table 'test.t1' doesn't exist in engine +ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate. SELECT * FROM t2; Got one of the listed errors SELECT * FROM t3; -ERROR 42S02: Table 'test.t3' doesn't exist in engine +ERROR HY000: Table `test`.`t3` is corrupted. Please drop the table and recreate. # Restore the original tables # restart DROP TABLE t1,t2,t3; diff --git a/mysql-test/suite/encryption/r/innodb-missing-key.result b/mysql-test/suite/encryption/r/innodb-missing-key.result index d5c1e079..83c9166d 100644 --- a/mysql-test/suite/encryption/r/innodb-missing-key.result +++ b/mysql-test/suite/encryption/r/innodb-missing-key.result @@ -38,11 +38,11 @@ SELECT COUNT(1) FROM t2; COUNT(1) 2048 SELECT COUNT(1) FROM t2,t1 where t2.a = t1.a; -ERROR 42S02: Table 'test.t1' doesn't exist in engine +ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate. SELECT COUNT(1) FROM t1 where b = 'ab'; -ERROR HY000: Table test/t1 is corrupted. Please drop the table and recreate. +ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate. SELECT COUNT(1) FROM t1; -ERROR HY000: Table test/t1 is corrupted. Please drop the table and recreate. +ERROR HY000: Table `test`.`t1` is corrupted. Please drop the table and recreate. # Start server with keys2.txt # restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt diff --git a/mysql-test/suite/encryption/r/innodb-redo-nokeys.result b/mysql-test/suite/encryption/r/innodb-redo-nokeys.result index b7d6eb50..78c2a200 100644 --- a/mysql-test/suite/encryption/r/innodb-redo-nokeys.result +++ b/mysql-test/suite/encryption/r/innodb-redo-nokeys.result @@ -23,6 +23,15 @@ insert into t2 select * from t1; insert into t3 select * from t1; insert into t4 select * from t1; commit; + +# Flush all dirty pages from buffer pool +SET @no_checkpoint_save_pct= @@GLOBAL.innodb_max_dirty_pages_pct; +SET @no_checkpoint_save_pct_lwm= @@GLOBAL.innodb_max_dirty_pages_pct_lwm; +SET GLOBAL innodb_max_dirty_pages_pct_lwm=0.0; +SET GLOBAL innodb_max_dirty_pages_pct=0.0; +SET GLOBAL innodb_max_dirty_pages_pct= @no_checkpoint_save_pct; +SET GLOBAL innodb_max_dirty_pages_pct_lwm= @no_checkpoint_save_pct_lwm; + CREATE TABLE t5 (a VARCHAR(8)) ENGINE=InnoDB ENCRYPTED=YES; SET GLOBAL innodb_flush_log_at_trx_commit=1; begin; @@ -42,6 +51,6 @@ SELECT * FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS -FOUND 1 /\[ERROR\] InnoDB: Encryption key is not found for .*test.t1.ibd/ in mysqld.1.err +FOUND 1 /\[ERROR\] InnoDB: Encryption key is not found for .*test.t[1-5].ibd/ in mysqld.1.err # restart: --file-key-management-filename=MYSQL_TEST_DIR/std_data/keys2.txt drop table t1,t2,t3,t4,t5; diff --git a/mysql-test/suite/encryption/t/corrupted_during_recovery.test b/mysql-test/suite/encryption/t/corrupted_during_recovery.test index 1240ee1a..e4a31a0b 100644 --- a/mysql-test/suite/encryption/t/corrupted_during_recovery.test +++ b/mysql-test/suite/encryption/t/corrupted_during_recovery.test @@ -60,7 +60,7 @@ call mtr.add_suppression("Table .*t1.* is corrupted. Please drop the table and r let $restart_parameters=--innodb_force_recovery=1 --skip-innodb-buffer-pool-load-at-startup; --source include/restart_mysqld.inc ---error ER_NO_SUCH_TABLE_IN_ENGINE,ER_TABLE_CORRUPT +--error ER_TABLE_CORRUPT SELECT * FROM t1; SELECT * FROM t2; CHECK TABLE t2; diff --git a/mysql-test/suite/encryption/t/encrypt_and_grep.test b/mysql-test/suite/encryption/t/encrypt_and_grep.test index 687f14e8..12593837 100644 --- a/mysql-test/suite/encryption/t/encrypt_and_grep.test +++ b/mysql-test/suite/encryption/t/encrypt_and_grep.test @@ -24,8 +24,9 @@ insert t2 values (repeat('tempsecret', 12)); insert t3 values (repeat('dummysecret', 12)); --echo # Wait max 10 min for key encryption threads to encrypt all spaces +--let $tables_count= `select count(*) + @@global.innodb_undo_tablespaces from information_schema.tables where engine = 'InnoDB'` --let $wait_timeout= 600 ---let $wait_condition=SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 +--let $wait_condition=SELECT COUNT(*) = $tables_count FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 --source include/wait_condition.inc --sorted_result @@ -95,8 +96,9 @@ UNLOCK TABLES; SET GLOBAL innodb_encrypt_tables = on; --echo # Wait max 10 min for key encryption threads to encrypt all spaces +--let $tables_count= `select count(*) + @@global.innodb_undo_tablespaces from information_schema.tables where engine = 'InnoDB'` --let $wait_timeout= 600 ---let $wait_condition=SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0; +--let $wait_condition=SELECT COUNT(*) = $tables_count FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0 --source include/wait_condition.inc --sorted_result diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change.test b/mysql-test/suite/encryption/t/innodb-bad-key-change.test index 05a3b5f4..e9537847 100644 --- a/mysql-test/suite/encryption/t/innodb-bad-key-change.test +++ b/mysql-test/suite/encryption/t/innodb-bad-key-change.test @@ -43,7 +43,7 @@ SELECT * FROM t1; -- source include/restart_mysqld.inc --disable_warnings ---error ER_NO_SUCH_TABLE_IN_ENGINE +--error ER_TABLE_CORRUPT SELECT * FROM t1; --enable_warnings @@ -72,7 +72,7 @@ INSERT INTO t2 VALUES ('foobar',1,2); -- source include/restart_mysqld.inc --disable_warnings ---error ER_NO_SUCH_TABLE_IN_ENGINE +--error ER_TABLE_CORRUPT SELECT * FROM t2; --error ER_TABLE_CORRUPT diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change2.test b/mysql-test/suite/encryption/t/innodb-bad-key-change2.test index 21a9ddb2..9ae3c722 100644 --- a/mysql-test/suite/encryption/t/innodb-bad-key-change2.test +++ b/mysql-test/suite/encryption/t/innodb-bad-key-change2.test @@ -32,7 +32,7 @@ INSERT INTO t1 VALUES (1,'foo'),(2,'bar'); --let $restart_parameters=--plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt --source include/restart_mysqld.inc ---error ER_NO_SUCH_TABLE_IN_ENGINE +--error ER_TABLE_CORRUPT SELECT * FROM t1; --replace_regex /key_id [1-9][0-9]*/\1 / SHOW WARNINGS; @@ -63,7 +63,7 @@ UNLOCK TABLES; --let $restart_parameters=--plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt --source include/restart_mysqld.inc ---error ER_NO_SUCH_TABLE_IN_ENGINE +--error ER_TABLE_CORRUPT ALTER TABLE t1 DISCARD TABLESPACE; # Drop table will succeed. DROP TABLE t1; @@ -95,7 +95,7 @@ SHOW CREATE TABLE t1; --let $restart_parameters= --innodb-encrypt-tables --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt --source include/restart_mysqld.inc ---error ER_ERROR_ON_RENAME +--error ER_TABLE_CORRUPT RENAME TABLE t1 TO t1new; --error ER_TABLE_CORRUPT ALTER TABLE t1 RENAME TO t1new; diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change3.test b/mysql-test/suite/encryption/t/innodb-bad-key-change3.test index 9c2918f3..f4065290 100644 --- a/mysql-test/suite/encryption/t/innodb-bad-key-change3.test +++ b/mysql-test/suite/encryption/t/innodb-bad-key-change3.test @@ -16,7 +16,7 @@ call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* becau --let $MYSQLD_DATADIR = `SELECT @@datadir` --let SEARCH_RANGE = 10000000 --let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd ---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --shutdown_server --source include/wait_until_disconnected.inc @@ -25,7 +25,7 @@ call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* becau 4;770A8A65DA156D24EE2A093277530143 EOF ---exec echo "restart:--innodb-encrypt-tables --innodb-stats-persistent --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--write_line "restart:--innodb-encrypt-tables --innodb-stats-persistent --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --enable_reconnect --source include/wait_until_connected_again.inc @@ -47,7 +47,7 @@ UNLOCK TABLES; ALTER TABLE t1 DISCARD TABLESPACE; ---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --shutdown_server --source include/wait_until_disconnected.inc @@ -62,7 +62,7 @@ ib_discard_tablespaces("test", "t1"); ib_restore_tablespaces("test", "t1"); EOF ---exec echo "restart:--innodb-encrypt-tables --innodb-stats-persistent --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys2.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--write_line "restart:--innodb-encrypt-tables --innodb-stats-persistent --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys2.txt" $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --enable_reconnect --source include/wait_until_connected_again.inc --source include/restart_mysqld.inc @@ -80,7 +80,7 @@ SELECT * FROM t1; -- let SEARCH_FILE=$t1_IBD -- source include/search_pattern_in_file.inc ---exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --shutdown_server --source include/wait_until_disconnected.inc --remove_file $MYSQLTEST_VARDIR/keys1.txt @@ -89,7 +89,7 @@ SELECT * FROM t1; 4;770A8A65DA156D24EE2A093277530143 EOF ---exec echo "restart:--innodb-encrypt-tables --innodb-stats-persistent --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--write_line "restart:--innodb-encrypt-tables --innodb-stats-persistent --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQLTEST_VARDIR/keys1.txt" $MYSQLTEST_VARDIR/tmp/mysqld.1.expect --enable_reconnect --source include/wait_until_connected_again.inc DROP TABLE t1; diff --git a/mysql-test/suite/encryption/t/innodb-compressed-blob.test b/mysql-test/suite/encryption/t/innodb-compressed-blob.test index 12d061a8..645c7235 100644 --- a/mysql-test/suite/encryption/t/innodb-compressed-blob.test +++ b/mysql-test/suite/encryption/t/innodb-compressed-blob.test @@ -7,7 +7,7 @@ call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted; key_version=1"); call mtr.add_suppression("InnoDB: Recovery failed to read page"); call mtr.add_suppression("InnoDB: Unable to decompress ..test.t[1-3]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]"); -call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` is corrupted"); +call mtr.add_suppression("Table `test`\\.`t[12]` is corrupted"); --echo # Restart mysqld --file-key-management-filename=keys2.txt -- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt @@ -28,9 +28,9 @@ insert into t3 values (1, repeat('secret',6000)); -- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys3.txt -- source include/restart_mysqld.inc ---error ER_NO_SUCH_TABLE_IN_ENGINE +--error ER_TABLE_CORRUPT select count(*) from t1 FORCE INDEX (b) where b like 'secret%'; ---error ER_NO_SUCH_TABLE_IN_ENGINE +--error ER_TABLE_CORRUPT select count(*) from t2 FORCE INDEX (b) where b like 'secret%'; select count(*) from t3 FORCE INDEX (b) where b like 'secret%'; diff --git a/mysql-test/suite/encryption/t/innodb-encryption-disable.test b/mysql-test/suite/encryption/t/innodb-encryption-disable.test index 939ad2b5..7a7e590e 100644 --- a/mysql-test/suite/encryption/t/innodb-encryption-disable.test +++ b/mysql-test/suite/encryption/t/innodb-encryption-disable.test @@ -7,11 +7,10 @@ # MDEV-9559: Server without encryption configs crashes if selecting from an implicitly encrypted table # -call mtr.add_suppression("InnoDB: Table `test`\\.`t[15]` (has an unreadable root page|is corrupted)"); +call mtr.add_suppression("Table `test`\\.`t[15]` (has an unreadable root page|is corrupted)"); call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[15]\\.ibd' cannot be decrypted\\."); call mtr.add_suppression("InnoDB: Recovery failed to read page"); call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t[15].ibd looks corrupted; key_version=1"); -call mtr.add_suppression("InnoDB: Table `test`\\.`t[15]` is corrupted"); # Suppression for builds where file_key_management plugin is linked statically call mtr.add_suppression("Couldn't load plugins from 'file_key_management"); @@ -43,9 +42,9 @@ alter table t1 encrypted='yes' `encryption_key_id`=1; --let $restart_parameters=--innodb-encrypt-tables=OFF --source include/restart_mysqld.inc ---error ER_NO_SUCH_TABLE_IN_ENGINE +--error ER_TABLE_CORRUPT select * from t1; ---error ER_NO_SUCH_TABLE_IN_ENGINE +--error ER_TABLE_CORRUPT select * from t5; --let $restart_parameters=--innodb-encrypt-tables=ON --plugin-load-add=file_key_management --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt diff --git a/mysql-test/suite/encryption/t/innodb-force-corrupt.test b/mysql-test/suite/encryption/t/innodb-force-corrupt.test index 51771f1e..861cc78c 100644 --- a/mysql-test/suite/encryption/t/innodb-force-corrupt.test +++ b/mysql-test/suite/encryption/t/innodb-force-corrupt.test @@ -7,7 +7,7 @@ # Don't test under embedded -- source include/not_embedded.inc -call mtr.add_suppression("InnoDB: Table `test`\\.`t[13]` (has an unreadable root page|is corrupted)"); +call mtr.add_suppression("Table `test`\\.`t[13]` (has an unreadable root page|is corrupted)"); call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=\\d+, page number=[36]\\] in file .*test.t[123]\\.ibd looks corrupted; key_version="); call mtr.add_suppression("\\[ERROR\\] InnoDB: We detected index corruption in an InnoDB type table"); call mtr.add_suppression("\\[ERROR\\] (mysqld|mariadbd).*: Index for table 't2' is corrupt; try to repair it"); @@ -68,11 +68,11 @@ EOF --source include/start_mysqld.inc ---error ER_NO_SUCH_TABLE_IN_ENGINE +--error ER_TABLE_CORRUPT SELECT * FROM t1; --error ER_GET_ERRMSG,ER_NOT_KEYFILE SELECT * FROM t2; ---error ER_NO_SUCH_TABLE_IN_ENGINE +--error ER_TABLE_CORRUPT SELECT * FROM t3; --source include/shutdown_mysqld.inc diff --git a/mysql-test/suite/encryption/t/innodb-missing-key.test b/mysql-test/suite/encryption/t/innodb-missing-key.test index 53fc820a..0c7a1df9 100644 --- a/mysql-test/suite/encryption/t/innodb-missing-key.test +++ b/mysql-test/suite/encryption/t/innodb-missing-key.test @@ -46,7 +46,7 @@ CREATE TABLE t4(a int not null primary key auto_increment, b varchar(128)) engin SELECT SLEEP(5); SELECT COUNT(1) FROM t3; SELECT COUNT(1) FROM t2; ---error ER_NO_SUCH_TABLE_IN_ENGINE +--error ER_TABLE_CORRUPT SELECT COUNT(1) FROM t2,t1 where t2.a = t1.a; --error ER_TABLE_CORRUPT SELECT COUNT(1) FROM t1 where b = 'ab'; diff --git a/mysql-test/suite/encryption/t/innodb-redo-nokeys.test b/mysql-test/suite/encryption/t/innodb-redo-nokeys.test index 52c12761..9cf515f5 100644 --- a/mysql-test/suite/encryption/t/innodb-redo-nokeys.test +++ b/mysql-test/suite/encryption/t/innodb-redo-nokeys.test @@ -44,7 +44,9 @@ insert into t3 select * from t1; insert into t4 select * from t1; commit; +let $no_checkpoint_flush= 1; --source ../../suite/innodb/include/no_checkpoint_start.inc + # # We test redo log page read at recv_read_page using # keys that are not in std_data/keys.txt. If checkpoint @@ -77,7 +79,7 @@ WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED'); let SEARCH_FILE = $MYSQLTEST_VARDIR/log/mysqld.1.err; -let SEARCH_PATTERN = \[ERROR\] InnoDB: Encryption key is not found for .*test.t1.ibd; +let SEARCH_PATTERN = \[ERROR\] InnoDB: Encryption key is not found for .*test.t[1-5].ibd; --source include/search_pattern_in_file.inc # diff --git a/mysql-test/suite/encryption/t/innodb_encrypt_freed.test b/mysql-test/suite/encryption/t/innodb_encrypt_freed.test index 7ba0b5a2..26c1e8df 100644 --- a/mysql-test/suite/encryption/t/innodb_encrypt_freed.test +++ b/mysql-test/suite/encryption/t/innodb_encrypt_freed.test @@ -21,7 +21,7 @@ CREATE TABLE t1(f1 BIGINT PRIMARY KEY, f2 int not null, SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0; CREATE TABLE t2 (f1 int not null)engine=innodb; -let $restart_parameters="--debug=d,ib_log_checkpoint_avoid"; +let $restart_parameters=--debug=d,ib_log_checkpoint_avoid; --source include/restart_mysqld.inc # Stop the purge |