[MDEV-8314] main.range_vs_index_merge_innodb is flaky Created: 2015-06-12  Updated: 2023-01-22  Resolved: 2023-01-22

Status: Closed
Project: MariaDB Server
Component/s: Tests
Affects Version/s: 10.0.19
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: David Gow Assignee: Sergei Petrunia
Resolution: Cannot Reproduce Votes: 0
Labels: None


 Description   

The 'main.range_vs_index_merge_innodb' test relies upon EXPLAIN SELECT statements being deterministic, however with InnoDB this is not the case. Not only do the row counts given change (being estimates), but the query plan can as well.

When, for instance, there are several possible indices, the query plan may select any of them:

@@ -761,7 +761,7 @@
 EXPLAIN
 SELECT * FROM City WHERE Country='BRA';
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	City	ref	Country,CountryPopulation,CountryName	Country	3	const	#	Using index condition
+1	SIMPLE	City	ref	Country,CountryPopulation,CountryName	CountryPopulation	3	const	#	Using index condition

Is the InnoDB version of this test required or would the normal 'main.range_vs_index_merge' test suffice for verifying the behaviour of the optimizer?



 Comments   
Comment by Elena Stepanova [ 2015-06-13 ]

We had somewhat similar problems (although not with this particular index) in buildbot, but it was quite long ago – in 2014. Unfortunately, the cross-reference report cannot display failures for this test, apparently because the output appears to be corrupted sometimes.

Comment by Elena Stepanova [ 2023-01-22 ]

Last time we had similar failures on this test was in July 2021. Possibly this commit may have helped to reduce non-determinism.

commit 9608773f75e2ca21491ef6825c3616cdc96d1ca5
Author: Marko Mäkelä
Date:   Tue Aug 31 13:55:02 2021 +0300
 
    MDEV-4750 follow-up: Reduce disabling innodb_stats_persistent

Or maybe something else made the difference, because the commit went to 10.6+, but the failure hasn't happened anymore on 10.4-10.5 either.

A similar issue was however seen once in 2022 on 10.3, but 10.3 goes EOL soon anyway.

Generated at Thu Feb 08 07:26:13 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.