mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-37252 Do not check is_key_used in get_index_for_order
This allows UPDATE to use ORDER BY indexes in the update columns.
This commit is contained in:
@@ -33411,8 +33411,7 @@ uint get_index_for_order(ORDER *order, TABLE *table, SQL_SELECT *select,
|
||||
double new_cost;
|
||||
if (test_if_cheaper_ordering(FALSE, NULL, order, table,
|
||||
table->keys_in_use_for_order_by, -1, limit,
|
||||
&key, &direction, &limit, &new_cost) &&
|
||||
!is_key_used(table, key, table->write_set))
|
||||
&key, &direction, &limit, &new_cost))
|
||||
{
|
||||
*need_sort= FALSE;
|
||||
*scanned_limit= limit;
|
||||
|
Reference in New Issue
Block a user