Commit 156cb94b authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-22871 fixup: Relax a debug assertion

In commit bf3c862f we introduced
an assertion that may dereference a null pointer.

This regression was caught by running the following:
./mtr --parallel=auto --suite=innodb \
--mysqld=--loose-innodb-adaptive-hash-index

The adaptive hash index is disabled by default since
commit 88cdfc5c (MDEV-20487)
and hence the problem was not caught earlier.
parent 3c8ecb5b
...@@ -303,7 +303,8 @@ struct btr_search_sys_t ...@@ -303,7 +303,8 @@ struct btr_search_sys_t
/** Get an adaptive hash index partition */ /** Get an adaptive hash index partition */
partition *get_part(const dict_index_t &index) const partition *get_part(const dict_index_t &index) const
{ {
ut_ad(index.table->space->id == index.table->space_id); ut_ad(!index.table->space ||
index.table->space->id == index.table->space_id);
return get_part(ulint(index.id), index.table->space_id); return get_part(ulint(index.id), index.table->space_id);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment