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

MDEV-6814: Server crashes in calculate_key_len on query with ORDER BY

- if test_if_skip_sort_order() decides to switch to using an index, or
  switch from using ref to using quick select, it should set all
  members accordingly.
This commit is contained in:
Sergei Petrunia
2014-09-30 19:22:27 +04:00
parent 0b15557c8f
commit 605b48d3e3
3 changed files with 17 additions and 0 deletions

View File

@ -20177,6 +20177,7 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
tab->ref.key= -1;
tab->ref.key_parts= 0;
tab->use_quick= 1;
best_key= new_ref_key;
/*
We don't restore select->cond as we want to use the
original condition as index condition pushdown is not