[Phpmyadmin-devel] about keywords

Marc Delisle DelislMa at CollegeSherbrooke.qc.ca
Sun Jan 30 05:12:41 CET 2005


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&group_id=23067&atid=377408
> 
>>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





More information about the Developers mailing list