Menu

#4868 (ok 4.5) Parser: ANSI mode breaks insert feature

4.4.3
resolved
None
Normal
2015-07-13
2015-04-23
albert song
No

If mysql server is running under ANSI mode, when visiting the insert page, phpMyAdmin will output following message:

Notice in ./libraries/Util.class.php#3730
 Undefined index: a

Backtrace

./libraries/Util.class.php#3773: PMA_Util::getDefaultFunctionForField(
array,
boolean true,
)
./libraries/insert_edit.lib.php#406: PMA_Util::getFunctionsForField(
array,
boolean true,
)
...

This is probabily due to PMA_SQP_analyze() doesn't accepts ANSI style quote in CREATE TABLE statement, causing the key of create_table_fields to be empty.

[create_table_fields] => Array
    (
        [] => Array
            (
                [type] => INT
            )

    )

Here's a example SHOW CREATE TABLE output by MySQL under ANSI mode.

CREATE TABLE "test" (
  "a" int(11) NOT NULL
)

Thank you!

Discussion

  • Marc Delisle

    Marc Delisle - 2015-04-26
    • summary: ANSI mode breaks insert feature --> Parser: ANSI mode breaks insert feature
    • assigned_to: Marc Delisle
     
  • Marc Delisle

    Marc Delisle - 2015-04-26

    Thanks. I confirm that the parser is the culprit. In GSoC 2015 there will be a parser rewrite which I expect will take care of this case.

     
  • Dan Ungureanu

    Dan Ungureanu - 2015-07-13

    I could not reproduce this using the latest version of phpMyAdmin (the one that integrates the new parser). It seems to be fixed.

     
  • Marc Delisle

    Marc Delisle - 2015-07-13
    • summary: Parser: ANSI mode breaks insert feature --> (ok 4.5) Parser: ANSI mode breaks insert feature
    • status: open --> resolved
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.