Bug #76902 sporadic test failure in subquery_mat_all subquery_mat and subquery_mat_none.
Submitted: 30 Apr 2015 10:19 Modified: 29 Oct 2015 12:33
Reporter: Mithun Chicklore Yogendra Email Updates:
Status: Closed Impact on me:
None 
Category:Tests: Server Severity:S3 (Non-critical)
Version:5.6 OS:Any
Assigned to: CPU Architecture:Any

[30 Apr 2015 10:19] Mithun Chicklore Yogendra
Description:
Explain in subquery_mat_all subquery_mat and subquery_mat_none tests, produces sporadic failures as below.
All include mysql-test/include/subquery_mat.inc and failure is from this .inc file.

--- /export/home2/pb2/test/sb_1-15054265-1429342825.31/usr/share/mysql-test/r/subquery_mat.result	2015-04-18 10:40:56.000000000 +0300
+++ /ramdisk/mtr-28104/var-embedded-big/7/log/subquery_mat.reject	2015-04-18 11:49:56.000000000 +0300
@@ -1905,8 +1905,8 @@
 SELECT t2.a FROM t1 as t2
 );
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	1	Using where
-2	SUBQUERY	t2	ALL	NULL	NULL	NULL	NULL	1	NULL
+1	PRIMARY	t1	ALL	NULL	NULL	NULL	NULL	32	Using where
+2	SUBQUERY	t2	ALL	NULL	NULL	NULL	NULL	32	NULL
 SELECT COUNT(*)
 FROM t1
 WHERE t1.a NOT IN (

How to repeat:
Fails in pb2 sporadically
http://pb2.no.oracle.com/?template=mysql_show_test_failure&search=yes&push_id=7831263&test...
http://pb2.no.oracle.com/?template=mysql_show_test_failure&search=yes&push_id=7863172&test...

Suggested fix:
Reason is after alter table we have not run ANALYZE TABLE t1;
Actually there are 32 rows since stats are not updated and explain
output was wrongly recorded as 1.
Adding Analyze table t1 before explain makes the thing consistent.
[29 Oct 2015 12:33] Paul DuBois
Fixed in 5.6.28, 5.7.10, 5.8.0. Changes for test suite. No changelog entry needed.