diff options
author | Sergei Petrunia <psergey@askmonty.org> | 2014-09-30 19:22:27 +0400 |
---|---|---|
committer | Sergei Petrunia <psergey@askmonty.org> | 2014-09-30 19:22:27 +0400 |
commit | 605b48d3e311e783ff60644dd468bbabb9a4a15c (patch) | |
tree | 5a2e1009c6334934ff339131e9225f3cf187dd4a /sql/sql_select.cc | |
parent | 0b15557c8fec3de5c3ef3cce2b5ff9340159751f (diff) | |
download | mariadb-git-bb-10.1-orderby-fixes.tar.gz |
MDEV-6814: Server crashes in calculate_key_len on query with ORDER BYbb-10.1-orderby-fixes
- 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.
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index cf29abcf101..1cf7b851671 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -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 |