mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Bug#16192219 CRASH IN TEST_IF_SKIP_SORT_ORDER ON SELECT DISTINCT WITH ORDER BY
This is a backport of the fix for: Bug#13633549 HANDLE_FATAL_SIGNAL IN TEST_IF_SKIP_SORT_ORDER/CREATE_SORT_INDEX Don't invoke the range optimizer for a NULL select.
This commit is contained in:
@ -13753,7 +13753,8 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
|
||||
|
||||
if (best_key >= 0)
|
||||
{
|
||||
if (table->quick_keys.is_set(best_key) && best_key != ref_key)
|
||||
if (select &&
|
||||
table->quick_keys.is_set(best_key) && best_key != ref_key)
|
||||
{
|
||||
key_map map;
|
||||
map.clear_all(); // Force the creation of quick select
|
||||
|
Reference in New Issue
Block a user