Closed GoogleCodeExporter closed 8 years ago
The parser tries to recognize keywords in the first step. It splits the main
parts of a query on this keywords. So, if you use a keyword within your query,
on this early step the parser has no chance to see, that it is not a real
keyword (in your case a table name). The only solution is to implement more
logic in this step, so the parser will not use USER if it knows already UPDATE.
I'll se, what I can do.
Original comment by pho...@gmx.de
on 2 Mar 2012 at 7:46
I have fixed this specific problem. The keyword USER will recognize, if the
previous keyword is one of RENAME, CREATE or DROP. In all other cases it is
used as normal token (like tablename or alias). Other keywords can break the
parser, this is a base problem of the parser. It can only be solved with a
validating parser and a complete grammar of the MySQL dialect.
Try bleeding edge on https://www.phosco.info/publicsvn/php-sql-parser/trunk
Original comment by pho...@gmx.de
on 4 Mar 2012 at 9:04
Check out the current version on Google.Code, there is a test case for the
issue.
Thanks for reporting.
Original comment by pho...@gmx.de
on 13 Mar 2012 at 12:10
Original issue reported on code.google.com by
boa...@gmail.com
on 1 Mar 2012 at 10:29