Canonicalized queries remove non-executable comments

The comments which do not alter the functionality of a query are now removed
from canonicalized queries.

Also fixed missing semicolon in the comment removal regex and added tests
for comment removal.
This commit is contained in:
Markus Makela
2016-01-11 12:25:33 +02:00
parent 8ee110efa8
commit 54ca1ab2de
4 changed files with 32 additions and 3 deletions

View File

@ -0,0 +1,11 @@
select ?;
select ?;
select ?;
select /*! ? + */ ?;
select /*!? ? + */ ?;
select /*!? ? + */ ?;
SELECT ? ;
SELECT ? /*! +? */;
SELECT ? /*!? +? */;
SELECT ? /*M! +? */;
SELECT ? /*M!? +? */;