Bug #11225 'distinct' test case fails
Submitted: 10 Jun 2005 4:25 Modified: 10 Jun 2005 16:00
Reporter: Jim Winstead Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0-bk OS:
Assigned to: Sergei Golubchik CPU Architecture:Any

[10 Jun 2005 4:25] Jim Winstead
Description:
The 'distinct' test case fails, with the following output:

Below are the diffs between actual and expected results:
-------------------------------------------------------
--- r/distinct.result   2005-06-08 20:45:58.000000000 +0300
+++ r/distinct.reject   2005-06-10 07:21:26.391953016 +0300
@@ -299,13 +299,13 @@
 ((t1.id=j_lj_t2.id AND t2_lj.id IS NULL) OR (t1.id=t2.id AND t2.idx=2))
 AND ((t1.id=j_lj_t3.id AND t3_lj.id IS NULL) OR (t1.id=t3.id AND t3.idx=2));
 id     select_type     table   type    possible_keys   key     key_len ref    rows     Extra
-1      SIMPLE  t1      index   id      id      4       NULL    2       Using index; Using temporary
-1      SIMPLE  t2      index   id      id      8       NULL    1       Using index; Distinct
-1      SIMPLE  t3      index   id      id      8       NULL    1       Using index; Distinct
-1      SIMPLE  j_lj_t2 index   id      id      4       NULL    2       Using where; Using index; Distinct
-1      SIMPLE  t2_lj   ref     id      id      4       test.j_lj_t2.id 1      Using where; Using index; Distinct
-1      SIMPLE  j_lj_t3 index   id      id      4       NULL    2       Using where; Using index; Distinct
-1      SIMPLE  t3_lj   ref     id      id      4       test.j_lj_t3.id 1      Using where; Using index; Distinct
+1      SIMPLE  t2      system  id      NULL    NULL    NULL    1       Using temporary
+1      SIMPLE  t3      system  id      NULL    NULL    NULL    1
+1      SIMPLE  j_lj_t2 index   id      id      4       NULL    2       Using index
+1      SIMPLE  t2_lj   ref     id      id      4       test.j_lj_t2.id 1      Using where; Using index
+1      SIMPLE  j_lj_t3 index   id      id      4       NULL    2       Using index
+1      SIMPLE  t3_lj   ref     id      id      4       test.j_lj_t3.id 1      Using where; Using index
+1      SIMPLE  t1      index   id      id      4       NULL    2       Using where; Using index
 SELECT DISTINCT
 t1.id
 from
-------------------------------------------------------

How to repeat:
Build, run the test suite.

(Sorry about the unified diff. Used a hacked mysql-test-run.)
[10 Jun 2005 11:27] Sergei Golubchik
See http://bugs.mysql.com/10084
[10 Jun 2005 16:02] 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/internals/25876