1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-8989 ORDER BY optimizer ignores equality propagation

Restore the fix from the commit 99cd5a9 that was lost in a merge.
This commit is contained in:
Sergei Golubchik
2016-07-01 16:44:17 +02:00
parent 76f492e26d
commit ffac85482b
3 changed files with 36 additions and 9 deletions

View File

@ -21427,7 +21427,7 @@ create_sort_index(THD *thd, JOIN *join, JOIN_TAB *tab, Filesort *fsort)
if (table->s->tmp_table)
table->file->info(HA_STATUS_VARIABLE); // Get record count
file_sort= filesort(thd, table, fsort, fsort->tracker);
file_sort= filesort(thd, table, fsort, fsort->tracker, join, tab->table->map);
DBUG_ASSERT(tab->filesort_result == 0);
tab->filesort_result= file_sort;
tab->records= 0;