Bug #80719 mysqlpump creates incorrect CREATE TABLE statement with PARTITION

Submitted: 14 Mar 2016 7:10 Modified: 31 Mar 2016 5:07
Reporter: Tomoyuki Watanabe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.7.11 OS:Windows (7(x64))
Assigned to: CPU Architecture:Any
Tags: mysqlpump

[14 Mar 2016 7:10] Tomoyuki Watanabe
Description:
mysqldump creates,

CREATE TABLE `tbl1` (
  `id` int(11) NOT NULL,
  `hoge` varchar(21) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
/*!50100 PARTITION BY KEY ()
PARTITIONS 5 */;

This is OK.

But mysqlpump creates,

CREATE TABLE `test`.`tbl1` (
`id` int(11) NOT NULL,
`hoge` varchar(21) NOT NULL,
PRIMARY KEY (`id`),
) ENGINE=InnoDB DEFAULT CHARSET=utf8,
/*!50100 PARTITION BY KEY ()
PARTITIONS 5 */

This makes syntax error.

How to repeat:
CREATE DATABASE IF NOT EXISTS `test`;
use `test`;
DROP TABLE IF EXISTS `tbl1`;
CREATE TABLE `tbl1` (
  `id` int(11) NOT NULL,
  `hoge` varchar(21) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
PARTITION BY KEY ()
PARTITIONS 5;
[14 Mar 2016 7:43] MySQL Verification Team
Hello!

Thank you for the report and test case.
Observed that 5.7.11 and 5.7.13 daily builds are affected.

Thanks,
Umesh
[14 Mar 2016 8:11] Tomoyuki Watanabe
Correct Synopsis, [ALTER TABLE statement] to [CREATE TABLE statement].
[31 Mar 2016 5:07] Erlend Dahl
[15 Mar 2016 9:52] Paul Dubois

Noted in 5.7.13, 5.8.0 changelogs.

CREATE TABLE statements in mysqlpump output could be missing KEY
clauses and would not load.

Fixed under the heading of 

Bug#22726732 MYSQLPUMP OUTPUT FAILS TO LOAD BECAUSE IT MISSES A KEY STATEMENT

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.054 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.