Bug #17899 Partitions: crash, NDB, Select .. ORDER BY
Submitted: 3 Mar 2006 16:16 Modified: 23 Mar 2006 18:39
Reporter: Matthias Leich Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S1 (Critical)
Version:5.1 OS:
Assigned to: Martin Skold CPU Architecture:Any

[3 Mar 2006 16:16] Matthias Leich
Description:
SET SESSION storage_engine='NDB';
CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, f_char1 CHAR(10),
f_char2 CHAR(10), f_charbig VARCHAR(1000))
PARTITION BY LIST(f_int1)
(PARTITION part_1 VALUES IN (-1),
PARTITION part0 VALUES IN (0),
PARTITION part1 VALUES IN (1));
INSERT INTO t1 SET f_int1 = 0, f_int2 = 20, 
f_char1 = '20', f_char2 = '20', f_charbig = '===20===';
INSERT INTO t1 SET f_int1 = 1, f_int2 = 1, 
f_char1 = '1', f_char2 = '1', f_charbig = '===1===';
# This SELECT is harmless
SELECT * FROM t1;
f_int1  f_int2  f_char1 f_char2 f_charbig
0       20      20      20      ===20===
1       1       1       1       ===1===
# Crash if ORDER BY
SELECT * FROM t1 ORDER BY f_int1;
ERROR HY000: Lost connection to MySQL server during query

The crash disappears if I replace NDB by MyISAM.
That's the reason why I choosed Category: Cluster

My environment:
   - Intel PC with Linux(SuSE 9.3)
   - MySQL compiled from source
         Version 5.1 last ChangeSet@1.2213, 2006-03-02

How to repeat:
Please use my attached testscript ndb_ml1106.test
  copy it to mysql-test/t
  echo "Dummy" > r/ndb_ml1106.result   # Produce a dummy file with 
                                                   # expected results
  ./mysql-test-run ndb_1106
[3 Mar 2006 16:17] Matthias Leich
master.err + stacktrace

Attachment: stacktrace (application/octet-stream, text), 4.81 KiB.

[3 Mar 2006 16:17] Matthias Leich
testscript

Attachment: ndb_ml1106.test (application/test, text), 1.34 KiB.

[14 Mar 2006 14:38] Martin Skold
Patch in:
https://intranet.mysql.com/secure/mailarchive/mail.php?folder=104&mail=84941
[23 Mar 2006 18:39] Jon Stephens
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

Additional info:

Documented fix in 5.1.8 changelog. Closed.