[Phpmyadmin-devel] PMA_SQP_analyze() with create table query
chirayu.chiripal at gmail.com
Sun Jun 8 14:35:55 CEST 2014
On Sun, Jun 8, 2014 at 6:00 PM, Marc Delisle <marc at infomarc.info> wrote:
> Le 2014-06-05 07:34, Chirayu Chiripal a écrit :
> > Hi,
> > Please see the line 28 of  which is the var_dump of
> > PMA_SQP_analyze(PMA_SQP_parse($create_query)). The 'table_ref' index is
> > an empty array.
> > I think it should have name of the table to be created or current one is
> > correct?
> Hi Chirayu,
> the parser sets 'table_ref' only for SELECT statements.
> > Because in the result there is no index which mention table name
> > Also, at #L34: 'create_table_fields' index should contain only column
> > details if I am not wrong. But at #L44, 'latin_general_ci' which is
> > actually the collation of the table, is appearing in the middle. Is this
> > a desired behaviour or it is a bug?
> A bug.
Hi, I found the reason for the collation coming back as the column name, I
did the var_dump() with ‘TESTSUITE’ defined as 1 and I noticed that when
TESTSUITE is defined then mysql_charsets are not fetched and hence it is
not able to detect that it is charset not a normal identifier (See
otherwise when TESTSUITE is not defined then column names are detected
> > Note: The query passed is present in 'unsorted_query' index at #L16.
> > : http://pastebin.com/YcbuivPB
> Marc Delisle | phpMyAdmin
phpMyAdmin Intern - Google Summer of Code 2014
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Developers