diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 1839cb709a2..2faf7832aca 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -1129,7 +1129,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp EXPLAIN SELECT a FROM t1 USE INDEX FOR JOIN (i2) USE INDEX FOR GROUP BY (i2) GROUP BY a; id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 index NULL i2 9 NULL 144 Using index +1 SIMPLE t1 # NULL i2 # NULL # # EXPLAIN SELECT a FROM t1 FORCE INDEX FOR JOIN (i2) FORCE INDEX FOR GROUP BY (i2) GROUP BY a; id select_type table type possible_keys key key_len ref rows Extra diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test index f6296c17f9c..ae616df0dfd 100644 --- a/mysql-test/t/group_by.test +++ b/mysql-test/t/group_by.test @@ -828,6 +828,11 @@ EXPLAIN SELECT a FROM t1 USE INDEX (i2) USE INDEX (); EXPLAIN SELECT a FROM t1 FORCE INDEX (); --error ER_PARSE_ERROR EXPLAIN SELECT a FROM t1 IGNORE INDEX (); +# disable the columns irrelevant to this test here. On some systems +# without support for large files the rowid is shorter and its size affects +# the cost calculations. This causes the optimizer to choose loose index +# scan over normal index access. +--replace_column 4 # 7 # 9 # 10 # EXPLAIN SELECT a FROM t1 USE INDEX FOR JOIN (i2) USE INDEX FOR GROUP BY (i2) GROUP BY a; EXPLAIN SELECT a FROM t1 FORCE INDEX FOR JOIN (i2)