Markus Makela 54ca1ab2de 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.
2016-01-11 17:14:57 +02:00

12 lines
288 B
SQL

select 1;-- comment after statement
select 1;# comment after statement
select /* inline comment */ 1;
select /*! 1 + */ 1;
select /*!300000 1 + */ 1;
select /*!300000 1 + */ 1;
SELECT 2 /* +1 */;
SELECT 1 /*! +1 */;
SELECT 1 /*!50101 +1 */;
SELECT 2 /*M! +1 */;
SELECT 2 /*M!50101 +1 */;