
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.
12 lines
288 B
SQL
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 */;
|