#619 (2.3.3-rc1) ORDER BY SUM(var) / COUNT(*)

2.3.3-rc1
fixed
Marc Delisle
1
2013-07-20
2002-10-06
Alexander Schuch
No

When displaying a table, pma gives the option to sort after a certain
column. If a column is 'COUNT(*)' or 'SUM(var)' and you click on it, it
will be sorted ASC but if you click it again it still will be sorted ASC i.e.
it's not possible to let it sort DESC.

Related

Bugs: #4030

Discussion

1 2 3 > >> (Page 1 of 3)
  • Loïc Chapeaux
    Loïc Chapeaux
    2002-10-07

    Logged In: YES
    user_id=144058

    Hi!

    Can you give a try to the live demo. I remember I've fixed such
    kind of bug but I'm not sure when...

    Loc

     
  • Marc Delisle
    Marc Delisle
    2002-10-07

    Logged In: YES
    user_id=210714

    Bug still there in cvs.

     
  • Robin Johnson
    Robin Johnson
    2002-10-13

    • assigned_to: robbat2 --> nobody
    • labels: 438488 -->
     
  • Logged In: YES
    user_id=418833

    I could also reproduce this bug and ran into another one.
    But I'll open a new report for this.

     
  • Marc Delisle
    Marc Delisle
    2002-10-20

    Logged In: YES
    user_id=210714

    The problem is that the brackets of the expression COUNT(*)
    are not escaped before entering the regexp, so in
    display_tbl.lib.php3, section 2.1.2, replace the $is_in_sort
    line with:

    $pattern = str_replace('\\', '\\\\', $fields_meta[$i]->name);
    $pattern = str_replace('(','\(', $pattern);
    $pattern = str_replace(')','\)', $pattern);
    $is_in_sort = eregi('[[:space:]](`?)' . $pattern . '(`?)[
    ,$]',$sql_order);

    Feedback?

     
  • Marc Delisle
    Marc Delisle
    2002-10-20

    • assigned_to: nobody --> lem9
     
  • Marc Delisle
    Marc Delisle
    2002-10-21

    Logged In: YES
    user_id=210714

    Merged.

     
  • Marc Delisle
    Marc Delisle
    2002-10-21

    • priority: 5 --> 1
    • status: open --> open-fixed
     
  • Loïc Chapeaux
    Loïc Chapeaux
    2002-10-22

    Logged In: YES
    user_id=144058

    Hi!

    Well this problem is the same than the one reported in bug
    #605030 (Problems with [] in Tablename) : as soon as a there
    is a special regexp character in the pattern we will face such
    kind of error.

    Maybe we will have to think a bit more about these problems?

    Loc

     
    • status: open-fixed --> closed-fixed
     
1 2 3 > >> (Page 1 of 3)