diff --git a/sql/handler.cc b/sql/handler.cc index cf639884637..38e0ea4fbf7 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -3749,11 +3749,11 @@ int handler::ha_index_init(uint idx, bool sorted) inited= INDEX; active_index= idx; end_range= NULL; + /* + Do not allow reads from UNIQUE HASH indexes. + */ + DBUG_ASSERT(!(table->key_info[active_index].flags & HA_UNIQUE_HASH)); } - /* - Do not allow reads from UNIQUE HASH indexes. - */ - DBUG_ASSERT(!(table->key_info[active_index].flags & HA_UNIQUE_HASH)); DBUG_RETURN(result); }