Skip to content

Commit 52723ec

Browse files
committed
MDEV-34880 Incorrect result for query with derived table having TEXT field
Fixup: check key flags only in the case of successful index initialization
1 parent 6bd1cb0 commit 52723ec

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sql/handler.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3749,11 +3749,11 @@ int handler::ha_index_init(uint idx, bool sorted)
37493749
inited= INDEX;
37503750
active_index= idx;
37513751
end_range= NULL;
3752+
/*
3753+
Do not allow reads from UNIQUE HASH indexes.
3754+
*/
3755+
DBUG_ASSERT(!(table->key_info[active_index].flags & HA_UNIQUE_HASH));
37523756
}
3753-
/*
3754-
Do not allow reads from UNIQUE HASH indexes.
3755-
*/
3756-
DBUG_ASSERT(!(table->key_info[active_index].flags & HA_UNIQUE_HASH));
37573757

37583758
DBUG_RETURN(result);
37593759
}

0 commit comments

Comments
 (0)