1
0
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:
Georgi Kodinov
2008-08-27 18:19:22 +03:00
parent 12846f416e
commit 3468f4b4b3
3 changed files with 93 additions and 0 deletions

View File

@ -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)
{