1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-07 06:01:31 +03:00
Files
mariadb/mysql-test/r
unknown c33c92d0f2 Bug #31890 Partitions: ORDER BY DESC in InnoDB not working.
It's not InnoDB specific bug.
Error is in QUEUE code, about the way we handle queue->max_at_top.
It's either '0' or '-2' and we do '^' operation to get the proper
direction. Though queue->compare() function can return '-2' as
a result of comparison sometimes. So we'll get
queue->compare() ^ queue->max_at_top == 0 (when max_at_top is -2)
and _downheap() function code will go wrong way here:
...
    if (next_index < elements &&
        (queue->compare(queue->first_cmp_arg,
                        queue->root[next_index]+offset_to_key,
                        queue->root[next_index+1]+offset_to_key) ^
         queue->max_at_top) > 0)
      next_index++;
...

Fixed by changing max_at_top to be either 1 or -1, doing
'* max_at_top' to get proper direction.


include/queues.h:
  Bug #31890 Partitions: ORDER BY DESC in InnoDB not working
  
  max_at_top policy changed
mysql-test/r/partition.result:
  Bug #31890 Partitions: ORDER BY DESC in InnoDB not working
  
  test result
mysql-test/t/partition.test:
  Bug #31890 Partitions: ORDER BY DESC in InnoDB not working
  
  test case
mysys/queues.c:
  Bug #31890 Partitions: ORDER BY DESC in InnoDB not working.
  
  queue->max_at_top policy changed - now it can either be '1' or '-1'.
  We multiply comparison result on max_at_top to get the proper
  direction.
2007-11-14 22:20:31 +04:00
..
2007-09-20 16:27:58 +05:00
2007-10-27 01:40:48 +05:00
2007-10-18 14:48:04 -07:00
2007-10-04 12:09:22 +05:00
2007-10-04 12:09:22 +05:00
2007-10-04 12:09:22 +05:00
2007-10-04 12:09:22 +05:00
2007-10-04 12:09:22 +05:00
2007-08-02 12:45:56 -07:00
2007-10-27 01:40:48 +05:00
2007-10-27 01:40:48 +05:00
2007-08-31 08:49:49 -06:00
2007-07-23 23:35:43 -07:00
2007-06-28 16:03:01 -07:00
2007-07-06 11:35:10 -07:00
2007-09-26 12:45:08 +02:00
2007-11-05 18:43:13 +04:00
2007-08-02 12:45:56 -07:00
2007-07-23 23:35:43 -07:00
2007-06-07 20:25:22 +02:00
2007-08-31 16:59:07 +05:00
2007-10-24 12:49:58 +05:00
2007-06-13 17:28:59 +02:00
2007-11-13 09:41:59 +04:00
2007-06-13 17:28:59 +02:00
2007-10-23 19:28:47 +05:00
2007-08-02 12:45:56 -07:00
2007-10-24 12:49:58 +05:00
2007-10-27 01:40:48 +05:00
2007-06-28 21:34:54 +04:00
2007-08-31 10:53:51 -06:00
2007-07-14 01:34:46 +05:00
2007-10-23 20:12:50 +05:00
2007-10-29 15:49:56 +04:00
2007-07-07 20:03:00 -07:00
2007-10-04 15:35:45 +05:00
2007-10-10 14:22:21 +05:00
2007-10-27 01:40:48 +05:00