Commit 0a34dc1e authored by Sergei Petrunia's avatar Sergei Petrunia

Code cleanup after merge of 260dd476 into 10.2-window-functions

length is now calculated in Filesort::make_sortorder.
parent 5b85d0a7
......@@ -21207,7 +21207,6 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
int
create_sort_index(THD *thd, JOIN *join, JOIN_TAB *tab, Filesort *fsort)
{
uint length;
TABLE *table;
SQL_SELECT *select;
bool quick_created= FALSE;
......@@ -21225,14 +21224,6 @@ create_sort_index(THD *thd, JOIN *join, JOIN_TAB *tab, Filesort *fsort)
/* Currently ORDER BY ... LIMIT is not supported in subqueries. */
DBUG_ASSERT(join->group_list || !join->is_in_subquery());
/*
Calculate length of join->order as this may be longer than 'order',
which may come from 'group by'. This is needed as join->sortorder is
used both for grouping and ordering.
*/
length= 0;
table->status=0; // May be wrong if quick_select
if (!tab->preread_init_done && tab->preread_init())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment