Bug #6142 SELECT DISTINCT on key field crashes server
Submitted: 18 Oct 2004 16:01 Modified: 17 Jun 2010 23:56
Reporter: Hakan Küçükyılmaz Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.2bk OS:Linux (Linux)
Assigned to: Ramil Kalimullin CPU Architecture:Any

[18 Oct 2004 16:01] Hakan Küçükyılmaz
Description:
Following constellation crashes the server:

How to repeat:
CREATE TABLE "DD40L" (
  "TYPENAME" varchar(30),
  "AS4LOCAL" char(1),
  "ROWTYPE" varchar(30),
  PRIMARY KEY  ("TYPENAME","AS4LOCAL"),
  KEY "DD40L~1" ("ROWTYPE")
) Engine=InnoDB;

SELECT DISTINCT TYPENAME FROM DD40L;

[18:05] root@test> SELECT DISTINCT TYPENAME FROM DD40L;
ERROR 2013 (HY000): Lost connection to MySQL server during query
5.0.2-alpha-debug-log
[18 Oct 2004 17:43] Hartmut Holzgraefe
With the shorter (and *working*) example below i was able to verify this on latest 5.0 bk source.  On 5.0.1 it works just fine

DROP TABLE IF EXISTS t;

CREATE TABLE t (
  a varchar(30),
  b varchar(30),
  PRIMARY KEY  (a)
  , KEY (b)
) Engine=InnoDB;

SELECT DISTINCT a FROM t;
[20 Oct 2004 16:25] Ramil Kalimullin
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html
[5 May 2010 15:09] Bugs System
Pushed into 5.1.47 (revid:joro@sun.com-20100505145753-ivlt4hclbrjy8eye) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[6 May 2010 1:25] Paul DuBois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug. Re-closing.
[28 May 2010 5:54] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100524190136-egaq7e8zgkwb9aqi) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (pib:16)
[28 May 2010 6:23] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100524190941-nuudpx60if25wsvx) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[28 May 2010 6:51] Bugs System
Pushed into 5.5.5-m3 (revid:alik@sun.com-20100524185725-c8k5q7v60i5nix3t) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[28 May 2010 19:21] Paul DuBois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug.
Re-closing.
[17 Jun 2010 11:55] Bugs System
Pushed into 5.1.47-ndb-7.0.16 (revid:martin.skold@mysql.com-20100617114014-bva0dy24yyd67697) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 12:34] Bugs System
Pushed into 5.1.47-ndb-6.2.19 (revid:martin.skold@mysql.com-20100617115448-idrbic6gbki37h1c) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 13:21] Bugs System
Pushed into 5.1.47-ndb-6.3.35 (revid:martin.skold@mysql.com-20100617114611-61aqbb52j752y116) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)