Menu

#2968 (ok 3.3.1) Database structure not sorted by Table correctly

3.2.5
fixed
Usability (35)
1
2013-06-11
2010-01-27
No

see attached image.

Table sorting works fine on the left hand side, however on the main page tables are not sorted correctly when there is a number in them.
This makes finding the latest table harder.

Web server
* Apache/2.2.11 (Ubuntu) PHP/5.2.9-0.dotdeb.2 with Suhosin-Patch mod_ssl/2.2.11 OpenSSL/0.9.8g
* MySQL client version: 5.0.75
* PHP extension: mysqli

MySQL

* Server: Localhost via UNIX socket
* Server version: 5.0.75-0ubuntu10.2-log
* Protocol version: 10
* User: root@localhost
* MySQL charset: UTF-8 Unicode (utf8)

Hopefully this is enough information.

Discussion

  • Daniel Platt

    Daniel Platt - 2010-01-27

    Tables unsorted by number.

     
  • Marc Delisle

    Marc Delisle - 2010-01-27
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2010-01-27

    In the right panel, it's possible to click on one of the titles to sort on this. Are you sure that the sort is curently set on the "Table" title?

     
  • Marc Delisle

    Marc Delisle - 2010-01-28
    • status: open --> pending
     
  • Daniel Platt

    Daniel Platt - 2010-02-01

    It is being sorted by Table. Reversing the sort order makes no difference.

    I wondering if this is the same problem as: Bug ID: 2938492

     
  • Daniel Platt

    Daniel Platt - 2010-02-01
    • status: pending --> open
     
  • Marc Delisle

    Marc Delisle - 2010-02-01

    Ok. Do you have the NaturalOrder directive in your config.inc.php? If yes, what the value, and try the opposite value.

     
  • Daniel Platt

    Daniel Platt - 2010-02-01

    Just checked, with the latest SVN (Checked out revision 13376.) and setting:
    $cfg['NaturalOrder'] = false;

    It now is in order.

    If I set:
    $cfg['NaturalOrder'] = true;

    The order becomes jumbled again.

     
  • Marc Delisle

    Marc Delisle - 2010-02-01

    I could not replicate your problem with NaturalOrder set to true; I don't have the same set of tables that yours but I created a sample and all was fine. Maybe there is something weird with your PHP installation.

     
  • Daniel Platt

    Daniel Platt - 2010-02-01

    yeah, I can't replicate it on http://demo.phpmyadmin.net/MAINT_3_2_5.
    but I'm still concerned because the left hand menu displays fine.

    I have found in the code where phpmyadmin sorts table names for the left hand menu (PMA_getTableList), however I can't find it for the main list (db_structure.php).

     
  • Daniel Platt

    Daniel Platt - 2010-02-01

    I have discovered that this is something to do with MySql.

     
  • Daniel Platt

    Daniel Platt - 2010-02-01

    Example Database

     
  • Daniel Platt

    Daniel Platt - 2010-02-01

    Query that has problem on different Mysql Platforms

     
  • Daniel Platt

    Daniel Platt - 2010-02-01

    I have attached 2 that show the problem. (depending on mysql version).

    The example query is the generated $sql statement from PMA_DBI_get_tables_full()

    It appears on our dev server, to bring back items in the messed up order, where on your demo server they are sorted correctly.

    I am not sure why the table list on the left hand side is passed though uksort, where as the left hand side isn't.

    If the uksort is removed both list of tables have the same sort order.

     
  • Marc Delisle

    Marc Delisle - 2010-02-10

    I can reproduce your problem by setting in config.inc.php the DisableIS directive to false for this server. With value set to true, no problem. Please confirm that is has the same effect on your server.

     
  • Marc Delisle

    Marc Delisle - 2010-02-12
    • priority: 5 --> 1
    • summary: Database structure not sorted by Table correctly --> (ok 3.3.1) Database structure not sorted by Table correctly
    • status: open --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2010-02-12

    Fixed in subversion, thanks for reporting.

     
  • Marc Delisle

    Marc Delisle - 2010-03-16
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

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