1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Merge branch '10.1' into 10.2

This commit is contained in:
Sergei Golubchik
2018-09-23 20:26:35 +02:00
73 changed files with 1662 additions and 574 deletions

View File

@ -21561,11 +21561,30 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
tmp_map.clear_all(); // Force the creation of quick select
tmp_map.set_bit(best_key); // only best_key.
select->quick= 0;
bool cond_saved= false;
Item *saved_cond;
/*
Index Condition Pushdown may have removed parts of the condition for
this table. Temporarily put them back because we want the whole
condition for the range analysis.
*/
if (select->pre_idx_push_select_cond)
{
saved_cond= select->cond;
select->cond= select->pre_idx_push_select_cond;
cond_saved= true;
}
select->test_quick_select(join->thd, tmp_map, 0,
join->select_options & OPTION_FOUND_ROWS ?
HA_POS_ERROR :
join->unit->select_limit_cnt,
TRUE, FALSE, FALSE);
if (cond_saved)
select->cond= saved_cond;
}
order_direction= best_key_direction;
/*