Bug #24818 CREATE UNIQUE INDEX (...) USING HASH on a NDB table crashes mysqld
Submitted: 5 Dec 2006 13:12 Modified: 26 Mar 2007 15:40
Reporter: Roland Bouman Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S1 (Critical)
Version:5.1.14 bk OS:ubunty edgy
Assigned to: Assigned Account CPU Architecture:Any
Tags: crash mysqld, create index, ndb, USING HASH

[5 Dec 2006 13:12] Roland Bouman
Description:
Creating a UNIQUE INDEX with the USING HASH clause on a NDB table crashes my mysqld server with a segfault. 

How to repeat:
First, get the world database at http://downloads.mysql.com/docs/world.sql.gz

use world;

CREATE TABLE nationaldish (
  DishID int(10) unsigned NOT NULL AUTO_INCREMENT,
  CountryCode char(3) NOT NULL,
  DishTitle varchar(64) NOT NULL,
  Recipe text,
  calories smallint(5) unsigned DEFAULT NULL,
  PRIMARY KEY (DishID)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 

insert into nationaldish (countrycode,dishtitle,calories) select code,md5(rand()),rand()*1000  from country; commit;

insert into nationaldish (countrycode,dishtitle,calories) select code,md5(rand()),rand()*1000  from country; commit;

insert into nationaldish (countrycode,dishtitle,calories) select code,md5(rand()),rand()*1000  from country; commit;

mysql> CREATE UNIQUE INDEX CountryCodeDishMembers ON nationaldish (CountryCode,calories) using hash;                       
ERROR 2013 (HY000): Lost connection to MySQL server during query

Suggested fix:
Please don't crash mysqld
[5 Dec 2006 13:16] Roland Bouman
error log

Attachment: mysql_error.log (text/x-log), 17.66 KiB.

[5 Dec 2006 13:18] Roland Bouman
my.cnf

Attachment: my.cnf (application/octet-stream, text), 23.58 KiB.

[5 Dec 2006 13:19] Roland Bouman
config for cluster

Attachment: config.ini (application/octet-stream, text), 2.60 KiB.

[7 Dec 2006 14:50] 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/16596

ChangeSet@1.2570, 2006-12-07 15:49:59+01:00, mskold@mysql.com +2 -0
  Bug#24818 CREATE UNIQUE INDEX (...) USING HASH on a NDB table crashes mysqld: Added test case
[7 Dec 2006 15:27] 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/16601

ChangeSet@1.2349, 2006-12-07 16:27:38+01:00, mskold@mysql.com +1 -0
  Bug#24818 CREATE UNIQUE INDEX (...) USING HASH on a NDB table crashes mysqld: Re-generated test result
[26 Mar 2007 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".