--innodb-optimize-keys does not work correctly with table without PRIMARY KEY
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
Undecided
|
Alexey Kopytov | ||
5.1 |
Fix Released
|
Undecided
|
Alexey Kopytov | ||
5.5 |
Fix Released
|
Undecided
|
Alexey Kopytov | ||
Rnt-5.1 |
Fix Released
|
Undecided
|
Alexey Kopytov |
Bug Description
The mysqldump option --innodb-
Example:
mysql> CREATE TABLE t1 (a INT NOT NULL, UNIQUE KEY (a)) ENGINE=InnoDB;
Query OK, 0 rows affected (0.02 sec)
mysql> SHOW COLUMNS FROM t1;
+------
| Field | Type | Null | Key | Default | Extra |
+------
| a | int(11) | NO | PRI | NULL | |
+------
1 row in set (0.00 sec)
Output of mysqldump --innodb-
CREATE TABLE `t1` (
`a` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
...
ALTER TABLE `t1` ADD UNIQUE KEY `a` (`a`);
The optimization should detect such tables and keep the unique key in CREATE TABLE.
Related branches
- Laurynas Biveinis (community): Approve
-
Diff: 372 lines (+269/-8)1 file modifiedpatches/innodb_expand_fast_index_creation.patch (+269/-8)
- Laurynas Biveinis (community): Approve
-
Diff: 372 lines (+269/-8)1 file modifiedpatches/innodb_expand_fast_index_creation.patch (+269/-8)
Percona now uses JIRA for bug reports so this bug report is migrated to: https:/ /jira.percona. com/browse/ PS-2681