ALTER TABLE ... ENCRYPTION='y' is possible on TokuDB tables && it is possible to alter an encrypted InnoDB table to TokuDB
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
||||
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.6 |
Invalid
|
Undecided
|
Unassigned | |||
5.7 |
Triaged
|
High
|
Unassigned |
Bug Description
Here is the simple case:
mysql> show create table sbtest1\G
*******
Table: sbtest1
Create Table: CREATE TABLE `sbtest1` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`k` int(10) unsigned NOT NULL DEFAULT '0',
`c` char(120) NOT NULL DEFAULT '',
`pad` char(60) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `k_1` (`k`)
) ENGINE=InnoDB AUTO_INCREMENT=
1 row in set (0.00 sec)
mysql> alter table sbtest1 engine=tokudb;
Query OK, 1000000 rows affected (30.25 sec)
Records: 1000000 Duplicates: 0 Warnings: 0
mysql> alter table sbtest1 encryption='y';
Query OK, 1000000 rows affected (51.22 sec)
Records: 1000000 Duplicates: 0 Warnings: 0
mysql> alter table sbtest1 compression='zlib';
Query OK, 1000000 rows affected (51.76 sec)
Records: 1000000 Duplicates: 0 Warnings: 0
mysql> show create table sbtest1\G
*******
Table: sbtest1
Create Table: CREATE TABLE `sbtest1` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`k` int(10) unsigned NOT NULL DEFAULT '0',
`c` char(120) NOT NULL DEFAULT '',
`pad` char(60) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `k_1` (`k`)
) ENGINE=TokuDB AUTO_INCREMENT=
1 row in set (0.01 sec)
I can even update tablespace to general tablespace with tokudb enabled table:
mysql> create tablespace s1 add datafile 's1.ibd' engine=innodb;
Query OK, 0 rows affected (0.01 sec)
mysql> alter table sbtest1 tablespace=s1;
Query OK, 685440 rows affected (46.83 sec)
Records: 685440 Duplicates: 0 Warnings: 0
Please triage. Is the table corrupted, ... etc.