1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

BUG#978479: Wrong result (extra rows) with derived_with_keys+loosescan+semijoin=ON, materialization=OFF

- Part#2: Don't try to construct a LooseScan access on indexes that do not guarantee 
  index-ordered reads.
This commit is contained in:
Sergey Petrunya
2012-04-19 05:37:16 +04:00
parent 994c6db2d1
commit b9bbe4a18b
4 changed files with 38 additions and 7 deletions

View File

@ -130,7 +130,9 @@ public:
void add_keyuse(table_map remaining_tables, KEYUSE *keyuse)
{
if (try_loosescan && keyuse->sj_pred_no != UINT_MAX)
if (try_loosescan && keyuse->sj_pred_no != UINT_MAX &&
(keyuse->table->file->index_flags(keyuse->key, 0, 1 ) & HA_READ_ORDER))
{
if (!(remaining_tables & keyuse->used_tables))
{