Bug #30393 Test "group_by" fails with a difference in "row count" and strategy (explain)
Submitted: 13 Aug 2007 16:27 Modified: 9 Oct 2007 0:53
Reporter: Joerg Bruehe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S3 (Non-critical)
Version: OS:IBM AIX (5.2, only 32 bit)
Assigned to: Georgi Kodinov CPU Architecture:Any

[13 Aug 2007 16:27] Joerg Bruehe
Description:
This symptom seems to be new in 5.1.21,
I could not find older reports of it:

-------------------------------------------------------
*** /PATH/mysql-test/r/group_by.result
--- /PATH/mysql-test/r/group_by.reject
***************
*** 1129,1135
  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
  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
--- 1129,1135
  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      range   NULL    i2      4       NULL    145     Using index for group-by
  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
-------------------------------------------------------

How to repeat:
Run the test suite on AIX 5.2 (32 bit)
[29 Aug 2007 11:47] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/33298

ChangeSet@1.2579, 2007-08-29 14:46:49+03:00, gkodinov@magare.gmz +2 -0
  Bug #30393: Test "group_by" fails with a difference in "row count" 
      and strategy (explain)
    
  The fix for WL3527 adds tests that test if the index usage hints
  combinations don't cause syntax errors.
  The EXPLAIN for one of these tests can be affected by the size of the
  rowid on the disk (affected by the presence of large file support). 
  Fixed to avoid the platform dependent test result by removing the 
  irrelevant columns from the EXPLAIN result.
[14 Sep 2007 7:44] Bugs System
Pushed into 5.1.23-beta
[9 Oct 2007 0:53] Paul DuBois
Test case change. No changelog entry needed.