mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix some ORDER BY ... DESC problems with InnoDB
sql/ha_heap.h: Move HA_NOT_READ_PREFIX_LAST to index_flags() sql/ha_isammrg.h: Move HA_NOT_READ_PREFIX_LAST to index_flags() sql/handler.h: Added comment sql/sql_select.cc: Test HA_NOT_READ_PREFIX_LAST from index_flags() instead of table_flags(). Should fix some ORDER BY ... DESC problems with InnoDB
This commit is contained in:
@ -5576,7 +5576,7 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
|
||||
Use a traversal function that starts by reading the last row
|
||||
with key part (A) and then traverse the index backwards.
|
||||
*/
|
||||
if (table->file->table_flags() & HA_NOT_READ_PREFIX_LAST)
|
||||
if (table->file->index_flags(ref_key) & HA_NOT_READ_PREFIX_LAST)
|
||||
DBUG_RETURN(0); // Use filesort
|
||||
tab->read_first_record= join_read_last_key;
|
||||
tab->read_record.read_record= join_read_prev_same;
|
||||
|
Reference in New Issue
Block a user