Describe the bug
when using backticks for the table names (in combination with parentheses + joins) - astify fails, and mysql 8 considers this valid.
my actual use case is pulling show create views from the db, which is why they look ugly - mysql 8 does not bother to remove unnecessary parentheses.
Database Engine
mysql 8.0
To Reproduce
-minimal SQL for each case:
let d = `
select *
from (\`t1\` \`eti\` join bagel on bagel.id = eti.id)
;
select *
from ((\`t1\`))
`;
let ast = parser.astify(d);
Expected behavior
listed minimal sql statements should parse.
for the first, join should be valid from that position.
for the second, i should be able to start a from clause with arbitrarily deeply nested parentheses, as long as i close them before going to the next top level clause / semi-colon.
Describe the bug when using backticks for the table names (in combination with parentheses + joins) - astify fails, and mysql 8 considers this valid. my actual use case is pulling
show create views
from the db, which is why they look ugly - mysql 8 does not bother to remove unnecessary parentheses.Database Engine mysql 8.0
To Reproduce -minimal SQL for each case:
-the node-sql-parser version: 5.3.3 -the node version: 20.15.1
Expected behavior listed minimal sql statements should parse.
for the first, join should be valid from that position. for the second, i should be able to start a from clause with arbitrarily deeply nested parentheses, as long as i close them before going to the next top level clause / semi-colon.