|
Investigation log from Slack:
https://lists.mysql.com/commits/19658
the original patch had
+EXPLAIN SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range name name 44 NULL 2 Using where; Using index for group-by
+SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
+name dept
+rs5 cs10
+rs5 cs9
+DELETE FROM t1;
+EXPLAIN SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range name name 44 NULL 2 Using where; Using index for group-by
+SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
current .result file
EXPLAIN SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref name name 22 const 2 Using where; Using index
SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
name dept
rs5 cs10
rs5 cs9
DELETE FROM t1;
# Masking (#) number in "rows" column of the following EXPLAIN output, as it may vary (bug#47746).
EXPLAIN SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range name name 44 NULL # Using where; Using index for group-by
SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
failures are like so (edited)
CURRENT_TEST: innodb.innodb_mysql
— /mnt/buildbot/build/mariadb-10.5.0/mysql-test/suite/innodb/r/innodb_mysql.result 2019-08-12 10:44:01.000000000 -0400
+++ /mnt/buildbot/build/mariadb-10.5.0/mysql-test/suite/innodb/r/innodb_mysql.reject 2019-08-12 15:00:09.173704512 -0400
@@ -394,7 +394,7 @@
\ # Masking (#) number in "rows" column of the following EXPLAIN output, as it may vary (bug#47746).
EXPLAIN SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range name name 44 NULL # Using where; Using index for group-by
+1 SIMPLE t1 ref name name 22 const # Using where; Using index
SELECT DISTINCT t1.name, t1.dept FROM t1 WHERE t1.name='rs5';
name dept
DROP TABLE t1;
hmm it fails only in 10.4/10.5 (edited)
Suggestions:
* Doing ANALYZE TABLE ... PERSISTENT FOR ALL might help (as it fixes some of the statistics)
* There is now DBUG_EXECUTE_IF("force_group_by",...) in opt_range.cc which forces LooseScan
. It was added for a different purpose but could be reused for this testcase
... yeah, innodb_mysql fails in 10.4 and 10.5 only
well, it is important that the testcase uses LooseScan
14:29
if it doesn't, the original test coverage is lost
14:30
(so #rows is not imporat, but "Using index for group by" is important)
14:30
when ref access is used, it's no good.

|