pt-online-schema-change won't work with backtick in default column value
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
New
|
Undecided
|
Unassigned |
Bug Description
Hello. Thanks for a great toolkit!
Experiencing following problem:
Trying to add an index online to MySQL Aurora table `users`.
Flags for command are `--alter-
I've simplified the copy of the target table for bugreport:
CREATE TABLE `test_users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`tag` varchar(32) CHARACTER SET utf8mb4 DEFAULT NULL,
`salt` varchar(50) NOT NULL DEFAULT '123`456',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT
I'm adding an index for a field (tag), but getting this error:
The new table `foobar`
Obviously it does have a primary key on the table. What causing the problem is the backtick (grave accent) in the default value of `salt` (unrelated) column. Surprisingly, when removing it from the default value, error disappears.
Looks like table definition isn't parsed properly due to the backtick or something like that :)..
Percona now uses JIRA for bug reports so this bug report is migrated to: https:/ /jira.percona. com/browse/ PT-1447