mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 18:41:56 +01:00
9cba6c5aa3
This allows one to run the test suite even if any of the following options are changed: - character-set-server - collation-server - join-cache-level - log-basename - max-allowed-packet - optimizer-switch - query-cache-size and query-cache-type - skip-name-resolve - table-definition-cache - table-open-cache - Some innodb options etc Changes: - Don't print out the value of system variables as one can't depend on them to being constants. - Don't set global variables to 'default' as the default may not be the same as the test was started with if there was an additional option file. Instead save original value and reset it at end of test. - Test that depends on the latin1 character set should include default_charset.inc or set the character set to latin1 - Test that depends on the original optimizer switch, should include default_optimizer_switch.inc - Test that depends on the value of a specific system variable should set it in the test (like optimizer_use_condition_selectivity) - Split subselect3.test into subselect3.test and subselect3.inc to make it easier to set and reset system variables. - Added .opt files for test that required specfic options that could be changed by external configuration files. - Fixed result files in rockdsb & tokudb that had not been updated for a while.
40 lines
1.6 KiB
Text
40 lines
1.6 KiB
Text
call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
|
|
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
|
|
set global innodb_compression_algorithm = 1;
|
|
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(255)) ENGINE=InnoDB PAGE_COMPRESSED=1 ENCRYPTED=YES ENCRYPTION_KEY_ID=4;
|
|
SHOW WARNINGS;
|
|
Level Code Message
|
|
SHOW CREATE TABLE t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`pk` int(11) NOT NULL,
|
|
`f` varchar(255) DEFAULT NULL,
|
|
PRIMARY KEY (`pk`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `PAGE_COMPRESSED`=1 `ENCRYPTED`=YES `ENCRYPTION_KEY_ID`=4
|
|
INSERT INTO t1 VALUES (1,'foobar'),(2,'barfoo');
|
|
FLUSH TABLE t1 FOR EXPORT;
|
|
# List before copying files
|
|
db.opt
|
|
t1.cfg
|
|
t1.frm
|
|
t1.ibd
|
|
backup: t1
|
|
UNLOCK TABLES;
|
|
ALTER TABLE t1 DISCARD TABLESPACE;
|
|
restore: t1 .ibd and .cfg files
|
|
# restart
|
|
ALTER TABLE t1 IMPORT TABLESPACE;
|
|
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
|
|
SHOW CREATE TABLE t1;
|
|
Table Create Table
|
|
t1 CREATE TABLE `t1` (
|
|
`pk` int(11) NOT NULL,
|
|
`f` varchar(255) DEFAULT NULL,
|
|
PRIMARY KEY (`pk`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 `PAGE_COMPRESSED`=1 `ENCRYPTED`=YES `ENCRYPTION_KEY_ID`=4
|
|
SELECT * FROM t1;
|
|
ERROR HY000: Tablespace has been discarded for table `t1`
|
|
# Tablespaces should be still encrypted
|
|
# t1 yes on expecting NOT FOUND
|
|
NOT FOUND /foobar/ in t1.ibd
|
|
DROP TABLE t1;
|