#2937 (ok 3.2.4) "No index used in query..." exception

3.2.3
fixed
1
2013-06-11
2009-11-01
No

When mysqli driver is used, and some databases exist this exception is displayed randomly making PMA useless. AFAIR it's bogus exception, a bug in PHP 5.x. There is a very quick fix for this bug - all you have to do is add one line to /libraries/dbi/mysqli.dbi.lib.php, it works fine when added as close to beginnig as possible. The line is:

mysqli_report(MYSQLI_REPORT_ERROR);

This bug is present in all PMA versions above 3.0. I would appreciate if it would be fixed in further versions. Now I have to fix it myself every time I install new PMA.

Discussion

  • Marc Delisle

    Marc Delisle - 2009-11-02

    Please tell me how to replicate this problem, and which PHP version you are using.
    I use the mysqli extension and have never seen this (and have never seen a bug report about this either).

     
  • Marc Delisle

    Marc Delisle - 2009-11-02
    • assigned_to: nobody --> lem9
    • status: open --> pending
     
  • Adam Łyskawa

    Adam Łyskawa - 2009-11-02

    PHP 5.2.6-1+lenny3, MySQL: 5.0.51a. Tested as root user.

    The problem occured to me everytime I configured my DB driver to be mysqli instead of mysql. I think it may be related to one of my databases. I don't know exactly which database causes it, and it would be hard to experiment on them - they are production.

    If it could be helpful, check this out: http://bugs.php.net/bug.php?id=35450&edit=1

    The exception occurs in main view, trying to show databases on server. It sometimes disappears after reloading a page a few times. I think there is a bug in PHP mysqli driver. In my applications and own mysqli extension I use mysqli_report(MYSQLI_REPORT_ERROR) because of the same bug.

    Try to create any table with a field named id, primary key. Then maybe a table with primary key named other than id, like ID_TEST. All primary keys I use in my DBs are BIGINT type (some of them unsigned).

     
  • Marc Delisle

    Marc Delisle - 2009-11-02
    • status: pending --> open
     
  • Marc Delisle

    Marc Delisle - 2009-11-02

    Ok, I'll add this. However, setting this makes other warnings appear so I have to test all other parts of phpMyAdmin.

     
  • Marc Delisle

    Marc Delisle - 2009-11-02

    Hmmm. In the PMA_isSuperuser() function we try an explicit SELECT on mysql.user to see if this is a superuser. Adding mysqli reporting shows a warning about this.

    We could remove all reporting with this:
    mysqli_report(MYSQLI_REPORT_OFF);

     
  • Adam Łyskawa

    Adam Łyskawa - 2009-11-02

    It seems like it's a major bug in PHP mysqli error reporting.

     
  • Marc Delisle

    Marc Delisle - 2009-11-02

    What do you think about my suggestion of using MYSQL_REPORT_OFF, like this:

    mysqli_report(MYSQLI_REPORT_OFF);

    P.S. you are using an older PHP version, did you think about upgrading?

     
  • Adam Łyskawa

    Adam Łyskawa - 2009-11-02

    If it still would be able to detect and handle errors in user provided queries, it's fine. If I get it right - the only purpose of mysqli error reporting is debugging - so it could be turned off for users.

    Well, I'll surely think about upgrading PHP. I'm not sure if upgrade is available for my debian. I'd have it installed manually by now if it wasn't a production server.

     
  • Marc Delisle

    Marc Delisle - 2009-11-02

    Yes, "normal" user errors are still reported. Fixed for 3.2.4

     
  • Marc Delisle

    Marc Delisle - 2009-11-02
    • priority: 5 --> 1
    • summary: "No index used in query..." exception --> (ok 3.2.4) "No index used in query..." exception
    • status: open --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2009-12-02
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks