Bug #72986 Add debug check for tablespace match in the adaptive hash index
Submitted: 12 Jun 2014 10:09 Modified: 12 Jun 2014 12:15
Reporter: Marko Mäkelä Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.7.5 OS:Any
Assigned to: CPU Architecture:Any

[12 Jun 2014 10:09] Marko Mäkelä
The InnoDB adaptive hash index is lacking debug assertions for checking that the tablespace ID in the buffer blocks matches index->space.

How to repeat:
Read the code.

Suggested fix:
Add assertions like this:

	ut_ad(block->page.id.space() == index->space);

Move the bpage->id.reset() call from buf_LRU_block_remove_hashed() to buf_LRU_block_free_hashed_page(), so that the space_id will be valid when dropping the adaptive hash index when a page is being evicted.
[12 Jun 2014 12:15] Daniel Price
Fixed as of the upcoming 5.7.5 release, and here's the changelog entry:

Added debug assertions to the adaptive hash index code to check that the
tablespace ID in buffer blocks match the index space. 

Thank you for the bug report.