Hi
On Sun 30. 1. 2005 14:07, Marc Delisle wrote:
I remember about this. The original sqlparser.data.php used MySQL sources. But I don't think the problem is there.
Yes, the problem is here. We can use same reserved words as MySQL does and we would not have this problem.
We want to treat "events" as a keyword and capitalize it for pretty
printing,
but this causes problems when not backquoted by the user.
And WHY do we treat events as reserved word? We mix pretty printing and syntax analysing and it can't work without hacks. "EVENTS" has special meaning only in SHOW BINLOG EVENTS (maybe others, I'm not sure), so it should be highlighted as keyword only here.
I think the analyser should be modified to avoid caps when the keyword is
used
in this context (as a field name or table name) but it would become complex
to do.
MySQL reserved words are AFAIK not allowed in this context.