Hi,
I wonder what we should do about this:
https://sourceforge.net/tracker/index.php?func=detail&aid=1110137&gr...
The problem is, "events" is not in the reserved words list:
http://dev.mysql.com/doc/mysql/en/reserved-words.html
But of course, is used in this syntax:
http://dev.mysql.com/doc/mysql/en/show-binlog-events.html
I checked in command-line and select * from events
works correctly (no need to quote), however select * from revoke
is rejected, due to the presence of "revoke" in the reserved words list.
Pretty printing is one thing, doing more that MySQL is another thing.
Marc
Hi
On Fri 28. 1. 2005 22:00, Marc Delisle wrote:
I wonder what we should do about this:
https://sourceforge.net/tracker/index.php?func=detail&aid=1110137&gr...
The problem is, "events" is not in the reserved words list:
http://dev.mysql.com/doc/mysql/en/reserved-words.html
But of course, is used in this syntax:
http://dev.mysql.com/doc/mysql/en/show-binlog-events.html
I checked in command-line and select * from events
works correctly (no need to quote), however select * from revoke
is rejected, due to the presence of "revoke" in the reserved words list.
Pretty printing is one thing, doing more that MySQL is another thing.
If you'd search this list archives I suggested to sync our reserved words list with the one taken from MySQL sources, however it didn't came to any decision.
Michal Čihař a écrit :
Hi
On Fri 28. 1. 2005 22:00, Marc Delisle wrote:
I wonder what we should do about this:
https://sourceforge.net/tracker/index.php?func=detail&aid=1110137&gr...
The problem is, "events" is not in the reserved words list:
http://dev.mysql.com/doc/mysql/en/reserved-words.html
But of course, is used in this syntax:
http://dev.mysql.com/doc/mysql/en/show-binlog-events.html
I checked in command-line and select * from events
works correctly (no need to quote), however select * from revoke
is rejected, due to the presence of "revoke" in the reserved words list.
Pretty printing is one thing, doing more that MySQL is another thing.
If you'd search this list archives I suggested to sync our reserved words list with the one taken from MySQL sources, however it didn't came to any decision.
Hi Michal, I remember about this. The original sqlparser.data.php used MySQL sources. But I don't think the problem is there.
We want to treat "events" as a keyword and capitalize it for pretty printing, but this causes problems when not backquoted by the user.
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.
Marc
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.