#3536 (ok 4.0) reverting sort on joined column does not work

3.4.10
fixed
1
2013-06-11
2012-03-21
No

When browsing the results of a SELECT statement with JOINed tables, it is possible to sort on a column (of the joined table) by clicking it, but when clicking it again, the order is not reversed.
This happens both in the 3.4 branch as in current master

Discussion

  • Have you got a specific example?
    I just ran the below 2 queries on the `Sakila` db on our demo site (master branch) and reversing a sort works just fine for me:

    SELECT first_name, last_name
    FROM `film_actor` as FA, `film` as F, `actor` as A
    WHERE A.actor_id=FA.actor_id
    AND F.film_id = FA.film_id
    AND F.film_id = 1

    SELECT first_name, last_name
    FROM `actor` as A
    INNER JOIN `film_actor` as FA ON A.actor_id=FA.actor_id
    INNER JOIN `film` as F ON F.film_id = FA.film_id
    WHERE F.film_id = 1

     
  • Try with this query :

    SELECT first_name, last_name, title
    FROM `actor` as A
    INNER JOIN `film_actor` as FA ON A.actor_id=FA.actor_id
    INNER JOIN `film` as F ON F.film_id = FA.film_id

    and try to sort on title. Ascending works, clicking again for descending doesn't.

     
    • assigned_to: nobody --> roccivic
     
    • priority: 5 --> 1
    • summary: reverting sort on joined column does not work --> (ok 4.0) reverting sort on joined column does not work
    • status: open --> open-fixed
     
  • This bug was fixed in repository and will be part of a future release; thanks for reporting.

     
  • Marc Delisle
    Marc Delisle
    2013-05-03

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

    • Status: closed-fixed --> fixed