Skip to content

Commit

Permalink
MDEV-22871 fixup: Relax a debug assertion
Browse files Browse the repository at this point in the history
In commit bf3c862 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 88cdfc5 (MDEV-20487)
and hence the problem was not caught earlier.
  • Loading branch information
dr-m committed Nov 20, 2020
1 parent 3c8ecb5 commit 156cb94
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion storage/innobase/include/btr0sea.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,8 @@ struct btr_search_sys_t
/** Get an adaptive hash index partition */
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);
}

Expand Down

0 comments on commit 156cb94

Please sign in to comment.