[Phpmyadmin-devel] PMA_SQPdata_reserved_word list is invalid
marc at infomarc.info
Tue May 21 12:38:43 CEST 2013
Le 2013-05-21 03:17, Michal Čihař a écrit :
> Dne Mon, 20 May 2013 13:58:02 -0400
> Marc Delisle <marc at infomarc.info> napsal(a):
>> Michal Čihař a écrit :
>>> Dne Mon, 20 May 2013 11:55:26 -0400
>>> Marc Delisle <marc at infomarc.info> napsal(a):
>>>> We should probably review the list of reserved words to ensure that they
>>>> correspond exactly to the list(s) in the MySQL manual.
>>> Or at least create separate list for the warning if no other fix is
>>> found for 4.0.
>>>> The downside of this would be that the syntax highlighter (not the one
>>>> when editing a query) would no longer highlight these words, but to fix
>>>> this, the analyzer needs serious work.
>>> Are you sure it would break only highlighting? For me the SQL
>>> parser/analyzer was piece of code I never wanted to touch too much :-).
>> git grep reservedWord
>> shows a few other places to check
> Well the question I meant was rather: Will changing this list affect
> other uses of the analyzer? It's used to detect type of queries and
> maybe some other stuff (adding LIMIT clause?).
I think that
git grep reservedWord
should show all places where a word from this list is used.
In sqlparser.lib.php, we look for explicit words like DELETE, UPDATE etc
so the list of reserved words is not used for this. The LIMIT clause is
built by looking for LIMIT and OFFSET, not with the reserved words list.
More information about the Developers