Bug #24818 CREATE UNIQUE INDEX (...) USING HASH on a NDB table crashes mysqld
Submitted: 5 Dec 2006 14:12 Modified: 26 Mar 2007 17:40
Reporter: Roland Bouman
Status: No Feedback
Category:Server: Cluster Severity:S1 (Critical)
Version:5.1.14 bk OS:ubunty edgy
Assigned to: Martin Skold Target Version:
Tags: create index, USING HASH, ndb, crash mysqld

[5 Dec 2006 14: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 14:16] Roland Bouman
error log

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

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

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

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

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

[7 Dec 2006 15: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 16: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
[27 Mar 2007 1: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".