mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge 11.0 into 11.1
This commit is contained in:
@ -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;
|
||||
|
@ -22,8 +22,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
|
||||
@ -93,8 +94,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
|
||||
|
@ -42,7 +42,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
|
||||
|
||||
@ -71,7 +71,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
|
||||
|
@ -30,7 +30,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;
|
||||
@ -61,7 +61,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;
|
||||
@ -93,7 +93,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;
|
||||
|
@ -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
|
||||
@ -26,9 +26,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%';
|
||||
|
||||
|
@ -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
|
||||
|
@ -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");
|
||||
@ -67,11 +67,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
|
||||
|
@ -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';
|
||||
|
@ -42,7 +42,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
|
||||
@ -75,7 +77,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
|
||||
|
||||
#
|
||||
|
Reference in New Issue
Block a user