mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#37548: result value erronously reported being NULL in certain subqueries
When switching to indexed ORDER BY we must be sure to reset the index read flag if we are switching from a covering index to non-covering.
This commit is contained in:
@ -13155,6 +13155,16 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
|
||||
table->key_read=1;
|
||||
table->file->extra(HA_EXTRA_KEYREAD);
|
||||
}
|
||||
else if (table->key_read)
|
||||
{
|
||||
/*
|
||||
Clear the covering key read flags that might have been
|
||||
previously set for some key other than the current best_key.
|
||||
*/
|
||||
table->key_read= 0;
|
||||
table->file->extra(HA_EXTRA_NO_KEYREAD);
|
||||
}
|
||||
|
||||
table->file->ha_index_or_rnd_end();
|
||||
if (join->select_options & SELECT_DESCRIBE)
|
||||
{
|
||||
|
Reference in New Issue
Block a user