summaryrefslogtreecommitdiff
path: root/mysql-test/suite/encryption/r/compressed_import_tablespace.result
blob: 63e7cf8b0c359bfcdd249db124ac2fd7e5c71480 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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
db.opt
t1.frm
t1.ibd
FLUSH TABLES t1 FOR EXPORT;
backup: t1
db.opt
t1.cfg
t1.frm
t1.ibd
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;
restore: t1 .ibd and .cfg files
ALTER TABLE t1 IMPORT TABLESPACE;
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
DROP TABLE t1;