mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge 10.6 into 10.7
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
call mtr.add_suppression("InnoDB: .*: Page 0 at offset 0 looks corrupted");
|
||||
call mtr.add_suppression("Index for table 'dst' is corrupt; try to repair it");
|
||||
call mtr.add_suppression("Page for tablespace .* is index page with id .* but that index is not found from configuration file");
|
||||
CREATE TABLE src (pk INT PRIMARY KEY, value INT) ENGINE=INNODB;
|
||||
INSERT INTO src VALUES (1, 1), (2, 2), (3, 3);
|
||||
FLUSH TABLES src FOR EXPORT;
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE src;
|
||||
CREATE TABLE dst (pk INT PRIMARY KEY, value INT) ENGINE=INNODB;
|
||||
ALTER TABLE dst DISCARD TABLESPACE;
|
||||
ALTER TABLE dst IMPORT TABLESPACE;
|
||||
ERROR HY000: Index for table 'dst' is corrupt; try to repair it
|
||||
DROP TABLE dst;
|
@@ -67,13 +67,13 @@ test/t2
|
||||
test/t3
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0;
|
||||
NAME
|
||||
innodb_system
|
||||
mysql/innodb_table_stats
|
||||
mysql/innodb_index_stats
|
||||
mysql/transaction_registry
|
||||
test/t4
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0;
|
||||
NAME
|
||||
innodb_system
|
||||
mysql/innodb_index_stats
|
||||
mysql/innodb_table_stats
|
||||
mysql/transaction_registry
|
||||
test/t1
|
||||
test/t2
|
||||
test/t3
|
||||
|
@@ -66,7 +66,7 @@ innodb_encryption_threads 0
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0
|
||||
AND NAME NOT LIKE 'innodb_undo%' AND NAME NOT LIKE 'mysql/innodb_%_stats' AND NAME NOT LIKE 'mysql/transaction_registry';
|
||||
NAME
|
||||
innodb_system
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0
|
||||
AND NAME NOT LIKE 'innodb_undo%' AND NAME NOT LIKE 'mysql/innodb_%_stats' AND NAME NOT LIKE 'mysql/transaction_registry';
|
||||
NAME
|
||||
innodb_system
|
||||
|
@@ -0,0 +1,4 @@
|
||||
[crc32]
|
||||
innodb-checksum-algorithm=crc32
|
||||
[full_crc32]
|
||||
innodb-checksum-algorithm=full_crc32
|
@@ -0,0 +1 @@
|
||||
--innodb-encrypt-tables=1
|
44
mysql-test/suite/encryption/t/encryption_key_corruption.test
Normal file
44
mysql-test/suite/encryption/t/encryption_key_corruption.test
Normal file
@@ -0,0 +1,44 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_example_key_management_plugin.inc
|
||||
|
||||
call mtr.add_suppression("InnoDB: .*: Page 0 at offset 0 looks corrupted");
|
||||
call mtr.add_suppression("Index for table 'dst' is corrupt; try to repair it");
|
||||
call mtr.add_suppression("Page for tablespace .* is index page with id .* but that index is not found from configuration file");
|
||||
|
||||
let MYSQLD_DATADIR = `SELECT @@datadir`;
|
||||
|
||||
|
||||
CREATE TABLE src (pk INT PRIMARY KEY, value INT) ENGINE=INNODB;
|
||||
INSERT INTO src VALUES (1, 1), (2, 2), (3, 3);
|
||||
|
||||
FLUSH TABLES src FOR EXPORT;
|
||||
|
||||
--copy_file $MYSQLD_DATADIR/test/src.ibd $MYSQLD_DATADIR/test/tmp.ibd
|
||||
--copy_file $MYSQLD_DATADIR/test/src.cfg $MYSQLD_DATADIR/test/tmp.cfg
|
||||
|
||||
perl;
|
||||
use strict;
|
||||
die unless open(FILE, "+<$ENV{MYSQLD_DATADIR}/test/tmp.ibd");
|
||||
binmode FILE;
|
||||
die unless seek(FILE, 3 * 16384 + 26, 0);
|
||||
print FILE pack("N", 0x00000000);
|
||||
close(FILE);
|
||||
EOF
|
||||
|
||||
UNLOCK TABLES;
|
||||
|
||||
DROP TABLE src;
|
||||
|
||||
CREATE TABLE dst (pk INT PRIMARY KEY, value INT) ENGINE=INNODB;
|
||||
ALTER TABLE dst DISCARD TABLESPACE;
|
||||
|
||||
--copy_file $MYSQLD_DATADIR/test/tmp.ibd $MYSQLD_DATADIR/test/dst.ibd
|
||||
--copy_file $MYSQLD_DATADIR/test/tmp.cfg $MYSQLD_DATADIR/test/dst.cfg
|
||||
|
||||
--error ER_NOT_KEYFILE
|
||||
ALTER TABLE dst IMPORT TABLESPACE;
|
||||
|
||||
DROP TABLE dst;
|
||||
|
||||
--remove_file $MYSQLD_DATADIR/test/tmp.ibd
|
||||
--remove_file $MYSQLD_DATADIR/test/tmp.cfg
|
@@ -90,6 +90,9 @@ AND NAME NOT LIKE 'innodb_undo%' AND NAME NOT LIKE 'mysql/innodb_%_stats' AND NA
|
||||
|
||||
SHOW VARIABLES LIKE 'innodb_encrypt%';
|
||||
|
||||
--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
|
||||
SELECT NAME FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION <> 0
|
||||
AND NAME NOT LIKE 'innodb_undo%' AND NAME NOT LIKE 'mysql/innodb_%_stats' AND NAME NOT LIKE 'mysql/transaction_registry';
|
||||
|
Reference in New Issue
Block a user