Bug #16907 Partitions: crash, SELECT goes into last partition, UNIQUE INDEX
Submitted: 30 Jan 2006 17:24 Modified: 16 Feb 2006 14:42
Reporter: Matthias Leich Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Partitions Severity:S2 (Serious)
Version:5.1.6-alpha-debug-log OS:
Assigned to: Sergei Glukhov CPU Architecture:Any

[30 Jan 2006 17:24] Matthias Leich
Description:
CREATE TABLE t1 (f_int1 INTEGER,f_int2 INTEGER
, UNIQUE INDEX(f_int1))
PARTITION BY RANGE(f_int1 DIV 2) 
SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2
(PARTITION partb VALUES LESS THAN (2),
PARTITION parte VALUES LESS THAN (4),
PARTITION partf VALUES LESS THAN (10000));
SELECT * FROM t1 WHERE f_int1 = 10;
     ERROR HY000: Lost connection to MySQL server during query

This bug seems to have a different reason than #16901,
because a single column UNIQUE INDEX is sufficient for the crash.

Experiments show, that the crash disappears when
- the final SELECT "goes" not into the last partition
- BY RANGE(f_int1 DIV 2) is repleced with BY RANGE(f_int1)
- the subpartitioning is not used

My environment:
   - Intel PC with Linux(SuSE 9.3)
   - MySQL compiled from source
         Version 5.1 last ChangeSet@1.2087.1.1, 2006-01-30

How to repeat:
Please execute the statements above or use my attached 
testscript ml018.test
  copy it to mysql-test/t
  echo "Dummy" > r/ml018.result   # Produce a dummy file with 
                                                   # expected results
  ./mysql-test-run ml018
[30 Jan 2006 17:25] Matthias Leich
master.err

Attachment: master.err (application/octet-stream, text), 2.80 KiB.

[30 Jan 2006 17:26] Matthias Leich
test script with comments, variants ...

Attachment: ml018.test (application/test, text), 1.21 KiB.

[9 Feb 2006 13:37] 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/2365
[10 Feb 2006 8:36] 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/2419
[15 Feb 2006 10:30] 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/2636
[15 Feb 2006 10:34] Sergei Glukhov
Fixed in 5.1.7
[16 Feb 2006 14:42] 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 bug fix in 5.1.7 changelog; closed.