[MDEV-21371] Assertion failure in page_rec_get_next_low() during innodb_gis.rtree_compress Created: 2019-12-20  Updated: 2019-12-20  Resolved: 2019-12-20

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.2.28, 10.3.19, 10.4.9, 10.5.0
Fix Version/s: 10.2.31, 10.3.22, 10.4.12, 10.5.1

Type: Bug Priority: Minor
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: affects-tests

Issue Links:
Relates
relates to MDEV-19783 Random crashes and corrupt data in IN... Closed

 Description   

A debug assertion that was added in order to catch corruption that was reported in MDEV-17983 turns out to be bogus. In the test innodb_gis.rtree_compress,4k, the function is sometimes being invoked by purge for a spatial index root page that is not a leaf page (PAGE_LEVEL is 1). The assertion should be relaxed as follows:

diff --git a/storage/innobase/include/page0page.ic b/storage/innobase/include/page0page.ic
index 6369932db1b..98b518187b5 100644
--- a/storage/innobase/include/page0page.ic
+++ b/storage/innobase/include/page0page.ic
@@ -660,6 +660,7 @@ page_rec_get_next_low(
 	}
 
 	ut_ad(page_rec_is_infimum(rec)
+	      || (!page_is_leaf(page) && !page_has_prev(page))
 	      || !(rec_get_info_bits(page + offs, comp)
 		   & REC_INFO_MIN_REC_FLAG));
 

That is, if the page is a leftmost non-leaf page, it may carry a record where the flag is set.

I observed the failure on 10.5, but the assertion was introduced in 10.2.


Generated at Thu Feb 08 09:06:38 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.