mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-11 21:51:21 +00:00
PT-193 Fixed regex in TableParser
TableParser's parse function was failing while trying to lowercase column names in the provided 'SHOW CREATE TABLE'. The problem was it was trying to lowercase everything between backticks but lines like these: `field_name` int comment "here is a ` in the comment" `second_field_name` int made the original regex to fail, matching `in the coment"` as an expression to be lowercased while second_file_name was considered as outside backticks.
This commit is contained in:
6
t/lib/samples/issue_pt-193_backtick_in_col_comments.sql
Normal file
6
t/lib/samples/issue_pt-193_backtick_in_col_comments.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
Create Table: CREATE TABLE `t3` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`f22aBcDe` int(10) unsigned DEFAULT NULL COMMENT 'xxx`XXx',
|
||||
`f23aBc` int(10) unsigned NOT NULL DEFAULT '255' COMMENT "`yyy",
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1)
|
Reference in New Issue
Block a user