taozhi8833998 / node-sql-parser

Parse simple SQL statements into an abstract syntax tree (AST) with the visited tableList and convert it back to SQL
https://taozhi8833998.github.io/node-sql-parser/
Apache License 2.0
818 stars 181 forks source link

`create view` for mysql - backticks in definer clause #2193

Closed croconut closed 3 weeks ago

croconut commented 3 weeks ago

Describe the bug a view starting with

create algorithm=merge definer=`root`@`localhost` sql security definer view `viewname`

fails to astify, while

create algorithm=merge view `viewname`

does not

Database Engine msyql

To Reproduce -the SQL that be parsed: see above -the node-sql-parser version: 5.3.3 -the node version: 20.15.1

Expected behavior would expect definer clause to accept users & ip/hosts in backticks