mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Merge 10.2 into 10.3
This commit is contained in:
@@ -4,6 +4,7 @@ call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` (has an unreadable root
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[12]\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t1.ibd looks corrupted; key_version=1");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` is corrupted");
|
||||
call mtr.add_suppression("File '.*mysql-test.std_data.keysbad3\\.txt' not found");
|
||||
# Start server with keys2.txt
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
@@ -30,8 +31,6 @@ foobar 2
|
||||
SELECT * FROM t1;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist in engine
|
||||
DROP TABLE t1;
|
||||
Warnings:
|
||||
Warning 192 Table test/t1 in file ./test/t1.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
||||
# Start server with keys3.txt
|
||||
SET GLOBAL innodb_default_encryption_key_id=5;
|
||||
CREATE TABLE t2 (c VARCHAR(8), id int not null primary key, b int, key(b)) ENGINE=InnoDB ENCRYPTED=YES;
|
||||
|
@@ -3,6 +3,9 @@ call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page n
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
|
||||
call mtr.add_suppression("InnoDB: Tablespace for table \`test\`.\`t1\` is set as discarded\\.");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted");
|
||||
call mtr.add_suppression("InnoDB: Cannot delete tablespace .* because it is not found in the tablespace memory cache");
|
||||
call mtr.add_suppression("InnoDB: ALTER TABLE `test`\\.`t1` DISCARD TABLESPACE failed to find tablespace");
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
|
||||
ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
|
||||
@@ -11,7 +14,6 @@ SELECT * FROM t1;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist in engine
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 192 Table test/t1 in file ./test/t1.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
||||
Error 1932 Table 'test.t1' doesn't exist in engine
|
||||
ALTER TABLE t1 ENGINE=InnoDB;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist in engine
|
||||
@@ -40,9 +42,12 @@ CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
|
||||
ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
|
||||
ALTER TABLE t1 DISCARD TABLESPACE;
|
||||
restore: t1 .ibd and .cfg files
|
||||
ALTER TABLE t1 IMPORT TABLESPACE;
|
||||
ALTER TABLE t1 DISCARD TABLESPACE;
|
||||
Warnings:
|
||||
Warning 1814 Tablespace has been discarded for table `t1`
|
||||
Warning 1812 Tablespace is missing for table 'test/t1'
|
||||
restore: t1 .ibd and .cfg files
|
||||
ALTER TABLE t1 IMPORT TABLESPACE;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
|
@@ -2,13 +2,13 @@ call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root pa
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted");
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(8)) ENGINE=InnoDB
|
||||
ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
|
||||
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize Warning Table test/t1 in file ./test/t1.ibd is encrypted but encryption service or used key_id is not available. Can't continue reading table.
|
||||
test.t1 optimize Error Table 'test.t1' doesn't exist in engine
|
||||
test.t1 optimize status Operation failed
|
||||
SHOW WARNINGS;
|
||||
|
@@ -1,6 +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\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
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");
|
||||
# Restart mysqld --file-key-management-filename=keys2.txt
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
set GLOBAL innodb_default_encryption_key_id=4;
|
||||
@@ -14,9 +15,9 @@ insert into t2 values (1, repeat('secret',6000));
|
||||
insert into t3 values (1, repeat('secret',6000));
|
||||
# Restart mysqld --file-key-management-filename=keys3.txt
|
||||
select count(*) from t1 FORCE INDEX (b) where b like 'secret%';
|
||||
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist in engine
|
||||
select count(*) from t2 FORCE INDEX (b) where b like 'secret%';
|
||||
ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
|
||||
ERROR 42S02: Table 'test.t2' doesn't exist in engine
|
||||
select count(*) from t3 FORCE INDEX (b) where b like 'secret%';
|
||||
count(*)
|
||||
1
|
||||
|
@@ -2,6 +2,7 @@ call mtr.add_suppression("InnoDB: Table `test`\\.`t[15]` (has an unreadable root
|
||||
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("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
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");
|
||||
create table t5 (
|
||||
`intcol1` int(32) DEFAULT NULL,
|
||||
|
@@ -1,5 +1,6 @@
|
||||
call mtr.add_suppression("InnoDB: 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=3221342974");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t[13]` is corrupted");
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
set global innodb_compression_algorithm = 1;
|
||||
# Create and populate tables to be corrupted
|
||||
|
@@ -2,6 +2,7 @@ call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root pa
|
||||
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\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file .*test.t[12].ibd looks corrupted; key_version=1");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted");
|
||||
# Start server with keys2.txt
|
||||
CREATE TABLE t1(a int not null primary key auto_increment, b varchar(128)) engine=innodb ENCRYPTED=YES ENCRYPTION_KEY_ID=19;
|
||||
CREATE TABLE t2(a int not null primary key auto_increment, b varchar(128)) engine=innodb ENCRYPTED=YES ENCRYPTION_KEY_ID=1;
|
||||
|
@@ -14,6 +14,7 @@ call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` (has an unreadable root
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[12]\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t1.ibd looks corrupted; key_version=1");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` is corrupted");
|
||||
call mtr.add_suppression("File '.*mysql-test.std_data.keysbad3\\.txt' not found");
|
||||
|
||||
--echo # Start server with keys2.txt
|
||||
|
@@ -14,6 +14,9 @@ call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]
|
||||
# Suppression for builds where file_key_management plugin is linked statically
|
||||
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
|
||||
call mtr.add_suppression("InnoDB: Tablespace for table \`test\`.\`t1\` is set as discarded\\.");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted");
|
||||
call mtr.add_suppression("InnoDB: Cannot delete tablespace .* because it is not found in the tablespace memory cache");
|
||||
call mtr.add_suppression("InnoDB: ALTER TABLE `test`\\.`t1` DISCARD TABLESPACE failed to find tablespace");
|
||||
|
||||
--let $restart_parameters=--plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
--source include/restart_mysqld.inc
|
||||
@@ -76,6 +79,14 @@ EOF
|
||||
--let $restart_parameters=--plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
ALTER TABLE t1 DISCARD TABLESPACE;
|
||||
|
||||
perl;
|
||||
do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
|
||||
ib_discard_tablespaces("test", "t1");
|
||||
ib_restore_tablespaces("test", "t1");
|
||||
EOF
|
||||
|
||||
ALTER TABLE t1 IMPORT TABLESPACE;
|
||||
SHOW CREATE TABLE t1;
|
||||
|
||||
@@ -87,5 +98,4 @@ RENAME TABLE t1 TO t1new;
|
||||
--error ER_NO_SUCH_TABLE_IN_ENGINE
|
||||
ALTER TABLE t1 RENAME TO t1new;
|
||||
# Drop should pass even with incorrect keys
|
||||
--replace_regex /(tablespace|key_id) [1-9][0-9]*/\1 /
|
||||
DROP TABLE t1;
|
||||
|
@@ -12,6 +12,7 @@ call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page n
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
# Suppression for builds where file_key_management plugin is linked statically
|
||||
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted");
|
||||
|
||||
--let $restart_parameters=--plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
--source include/restart_mysqld.inc
|
||||
|
@@ -7,6 +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\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
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");
|
||||
|
||||
--echo # Restart mysqld --file-key-management-filename=keys2.txt
|
||||
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
@@ -27,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_GET_ERRMSG
|
||||
--error ER_NO_SUCH_TABLE_IN_ENGINE
|
||||
select count(*) from t1 FORCE INDEX (b) where b like 'secret%';
|
||||
--error ER_GET_ERRMSG
|
||||
--error ER_NO_SUCH_TABLE_IN_ENGINE
|
||||
select count(*) from t2 FORCE INDEX (b) where b like 'secret%';
|
||||
select count(*) from t3 FORCE INDEX (b) where b like 'secret%';
|
||||
|
||||
|
@@ -11,6 +11,7 @@ call mtr.add_suppression("InnoDB: Table `test`\\.`t[15]` (has an unreadable root
|
||||
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("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
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");
|
||||
|
@@ -9,6 +9,7 @@
|
||||
|
||||
call mtr.add_suppression("InnoDB: 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=3221342974");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t[13]` is corrupted");
|
||||
|
||||
SET GLOBAL innodb_file_per_table = ON;
|
||||
set global innodb_compression_algorithm = 1;
|
||||
|
@@ -11,6 +11,7 @@ call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root pa
|
||||
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\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file .*test.t[12].ibd looks corrupted; key_version=1");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` is corrupted");
|
||||
|
||||
--echo # Start server with keys2.txt
|
||||
-- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt
|
||||
|
Reference in New Issue
Block a user