1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fixed LP bug #906322.

If the sorted table belongs to a dependent subquery then the function
create_sort_index() should not clear TABLE:: select and TABLE::select
for this table after the sort of the table has been performed, because
these members are needed for the second execution of the subquery.
This commit is contained in:
Igor Babaev
2011-12-19 14:55:30 -08:00
parent 1a985a17c0
commit bad3e4179c
4 changed files with 6 additions and 10 deletions

View File

@ -14466,11 +14466,9 @@ create_sort_index(THD *thd, JOIN *join, ORDER *order,
table->sort.io_cache= NULL;
select->cleanup(); // filesort did select
tab->select= 0;
table->quick_keys.clear_all(); // as far as we cleanup select->quick
table->sort.io_cache= tablesort_result_cache;
}
tab->select_cond=0;
tab->last_inner= 0;
tab->first_unmatched= 0;
tab->type=JT_ALL; // Read with normal read_record