-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
223 additions
and
77 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
13 changes: 13 additions & 0 deletions
13
mysql-test/suite/encryption/r/encryption_key_corruption.result
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,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: Internal error: Cannot reset LSNs in table `test`.`dst` : Data structure corruption | ||
DROP TABLE dst; |
6 changes: 6 additions & 0 deletions
6
mysql-test/suite/encryption/t/encryption_key_corruption.combinations
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,6 @@ | ||
[crc32] | ||
innodb-checksum-algorithm=crc32 | ||
[none] | ||
innodb-checksum-algorithm=none | ||
[innodb] | ||
innodb-checksum-algorithm=innodb |
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 @@ | ||
--innodb-encrypt-tables=1 |
44 changes: 44 additions & 0 deletions
44
mysql-test/suite/encryption/t/encryption_key_corruption.test
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,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_INTERNAL_ERROR | ||
ALTER TABLE dst IMPORT TABLESPACE; | ||
|
||
DROP TABLE dst; | ||
|
||
--remove_file $MYSQLD_DATADIR/test/tmp.ibd | ||
--remove_file $MYSQLD_DATADIR/test/tmp.cfg |
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
Oops, something went wrong.