Details
-
Bug
-
Status: Done
-
Medium
-
Resolution: Fixed
-
3.0.4, 3.0.6
-
None
-
None
Description
5.7.20-18 Percona Server
create table t (c int) engine=innodb PARTITION BY HASH(c) PARTITIONS 4;
mkdir -p /data/db/data1; chown mysql:mysql -R /data/db ; ./pt-online-schema-change --data-dir="/data/db/data1" --execute --alter "engine=innodb" D=test,t=t No slaves found. See --recursion-method if host fd0b85b08720 has slaves. Not checking slave lag because no slaves were found and --check-slave-lag was not specified. Operation, tries, wait: analyze_table, 10, 1 copy_rows, 10, 0.25 create_triggers, 10, 1 drop_triggers, 10, 1 swap_tables, 10, 1 update_foreign_keys, 10, 1 Altering `test`.`t`... Creating new table... `test`.`t` was not altered. Error creating new table: DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DATA DIRECTORY='/data/db/data1'' at line 5 [for Statement "CREATE TABLE `test`.`_t_new` ( `c` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (c) PARTITIONS 4 */ DATA DIRECTORY='/data/db/data1' "] at ./pt-online-schema-change line 10342.
correct create table statement:
CREATE TABLE `test`.`_t_new` ( `c` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 DATA DIRECTORY='/data/db/data1' /*!50100 PARTITION BY HASH (c) PARTITIONS 4 */;