mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug #55472: Assertion failed in heap_rfirst function of hp_rfirst.c on
DELETE statement Single-table delete ordered by a field that has a hash-type index may cause an assertion failure or a crash. An optimization added by the fix for the bug 36569 forced the optimizer to use ORDER BY-compatible indices when applicable. However, the existence of unsorted indices (HASH index algorithm for some engines such as MEMORY/HEAP, NDB) was ignored. The test_if_order_by_key function has been modified to skip unsorted indices.
This commit is contained in:
@ -13244,7 +13244,7 @@ static int test_if_order_by_key(ORDER *order, TABLE *table, uint idx,
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
if (key_part->field != field)
|
||||
if (key_part->field != field || !field->part_of_sortkey.is_set(idx))
|
||||
DBUG_RETURN(0);
|
||||
|
||||
/* set flag to 1 if we can use read-next on key, else to -1 */
|
||||
|
Reference in New Issue
Block a user