Bug #17393 Partitions: Wrong error message when assigning too many subpartitions
Submitted: 14 Feb 2006 18:49 Modified: 23 Feb 2006 11:26
Reporter: Matthias Leich Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Partitions Severity:S3 (Non-critical)
Version:5.1 OS:
Assigned to: Reggie Burnett CPU Architecture:Any

[14 Feb 2006 18:49] Matthias Leich
Description:
Cosmetic bug:
CREATE TABLE t1 (
f_int1 INTEGER,
f_int2 INTEGER,
f_char1 CHAR(10),
f_char2 CHAR(10),
f_charbig VARCHAR(1000)
)
PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1)
SUBPARTITIONS 1000000
(PARTITION part1 VALUES LESS THAN (10),
PARTITION part2 VALUES LESS THAN (2147483647));
ERROR HY000: Too many partitions were defined
           <----  The problem is the number of subpartitions and not
                     the number of partitions
My environment:
   - Intel PC with Linux(SuSE 9.3)
   - MySQL compiled from source
         Version 5.1 last ChangeSet@1.2096.1.1, 2006-02-14

How to repeat:
Please execute the statements above.

Suggested fix:
I would propose:
A) Specific error message:
     Too many subpartitions were defined
B) Universal error message:
    Too many partitions or subpartitions were defined.
I assume B) is better, because I can imagine the following cases
#partitions   *   #subpartitions  > open file limit of OS or our server
#partitions > limit (not files!) our server can handle
#subpartitions > limit (not files!) our server can handle
....
[22 Feb 2006 18:05] 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/3034
[22 Feb 2006 19:34] 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/3037
[22 Feb 2006 19:37] Reggie Burnett
fixed in 5.1.8
[23 Feb 2006 11:26] 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 feature change in 5.1.8 changelog. Closed.