Closed svenoe closed 3 months ago
According to https://forums.mysql.com/read.php?21,239471,239688#msg-239688, I would strongly suggest to add an order clause in the above sql.
Do not depend on order when ORDER BY is missing.
Also, the ORDER BY a.id ASC
in
and the ORDER BY at.create_time ASC
in
are contradictory as the first will give something like
* ---------- * ----------- *
| article_id | create_time |
* ---------- * ----------- *
| 1 | 2024-01-01 |
| 2 | 2024-01-02 |
| 3 | 2024-01-03 |
* ---------- * ----------- *
while the second will produce something like
* ---------- * ----------- *
| article_id | create_time |
* ---------- * ----------- *
| 3 | 2024-01-03 |
| 2 | 2024-01-02 |
| 1 | 2024-01-01 |
* ---------- * ----------- *
if I understand the following source correctly:
Same rules apply for the letters of the alphabet. When arranging them in ascending order they are arranged from A to Z – or beginning to end.
When it comes to dates, ascending order would mean that the oldest ones come first and the most recent ones last.
https://www.freecodecamp.org/news/descending-order-vs-ascending-order-what-does-it-mean/
Should be done with merged #3457
I'm wondering whether in that SQL an ORDER BY clause is missing: https://github.com/RotherOSS/otobo/blob/5de8569a76ab70a3ba842738eec67a766710e370/Kernel/System/Ticket/Article.pm#L1225-L1233 This could be related to some failures in the test suite.
Originally posted by @bschmalhofer in https://github.com/RotherOSS/otobo/issues/3157#issuecomment-2036377073