CREATE TABLE t1 (id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB row_format=compressed encrypted=yes;
|
insert into t1 values(1, repeat('Nesamani', 10));
|
select count(*) from t1;
|
count(*)
|
1
|
show create table t1;
|
Table Create Table
|
t1 CREATE TABLE `t1` (
|
`id` int(11) NOT NULL,
|
`a` varchar(255) DEFAULT NULL,
|
PRIMARY KEY (`id`)
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED `encrypted`=yes
|
# Wait max 10 min for key encryption threads to encrypt all spaces
|
--let $wait_timeout= 600
|
--let $wait_condition=SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION WHERE MIN_KEY_VERSION = 0 AND ROTATING_OR_FLUSHING <> 0
|
--source include/wait_condition.inc
|
|
--source include/shutdown_mysqld.inc
|
|
--source include/start_mysqld.inc
|
let MYSQLD_DATADIR =`SELECT @@datadir`;
|
|
--list_files $MYSQLD_DATADIR/test
|
FLUSH TABLES t1 FOR EXPORT;
|
perl;
|
do "$ENV{MTR_SUITE_DIR}/include/innodb-util.pl";
|
ib_backup_tablespaces("test", "t1");
|
EOF
|
--list_files $MYSQLD_DATADIR/test
|
UNLOCK TABLES;
|
|
DROP TABLE t1;
|
create table t1(id INT NOT NULL PRIMARY KEY, a VARCHAR(255)) ENGINE=InnoDB row_format=compressed encrypted=yes;
|
|
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;
|