MXS-1702: Process comments when canonicalizing

The canonicalization process now strips non-executable comments from the
SQL and replaces all constants in executable comments.

Enabled the comment test and updated expected output of the select and
alter tests.
This commit is contained in:
Markus Mäkelä
2018-03-16 15:29:55 +02:00
parent 9fe25c8003
commit e4efc29297
4 changed files with 65 additions and 11 deletions

View File

@ -1,7 +1,7 @@
ALTER DATABASE `` DEFAULT CHARACTER SET latin2;
ALTER DATABASE `#mysql50#../` UPGRADE DATA DIRECTORY NAME;
ALTER DATABASE `#mysql50#../..` UPGRADE DATA DIRECTORY NAME; # a comment
ALTER DATABASE `#mysql51#not-yet` UPGRADE DATA DIRECTORY NAME; # a comment with backticks `this should work`
ALTER DATABASE `#mysql50#../..` UPGRADE DATA DIRECTORY NAME;
ALTER DATABASE `#mysql51#not-yet` UPGRADE DATA DIRECTORY NAME;
ALTER DATABASE `test-database` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
ALTER DEFINER=root@localhost EVENT e1 ON SCHEDULE EVERY ? HOUR;
ALTER EVENT e1 COMMENT ?;