Subject: | SQL::Abstract::Tree unrollable_ops_re stripping parenthesis from GROUP_CONCAT |
Date: | Mon, 29 Jun 2015 15:57:15 -0400 |
To: | bug-SQL-Abstract [...] rt.cpan.org |
From: | Webstrand <webstrand [...] gmail.com> |
Hello,
In SQL::Abstract::Tree, it appears that unrollable_ops_re matches
"ON", "HAVING", "WHERE" etc. anywhere in the function name rather than
the complete function name. This causes _parenthesis_unroll to
incorrectly strip the parenthesis from function calls such as
GROUP_CONCAT, CONNECTION_ID, or where_string.
This test case currently results in invalid SQL:
$sqlat->unparse($sqlat->parse('select GROUP_CONCAT(a)'));