Bug #39702 Unspecific error msg when using non-existent tablespace in partition definition
Submitted: 27 Sep 2008 19:54 Modified: 13 Dec 2008 11:01
Reporter: John H. Embretsen
Status: Closed
Category:Server: Falcon Severity:S3 (Non-critical)
Version:6.0.6, 6.0-falcon-team (6.0.8a) OS:Any
Assigned to: Sergey Vojtovich Target Version:
Tags: F_ERROR HANDLING
Triage: Triaged: D4 (Minor)

[27 Sep 2008 19:54] John H. Embretsen
Description:
With Falcon, it is possible to specify a tablespace for a specific partition in a CREATE
TABLE statement, for example:

CREATE TABLE falconpart (pk integer) Engine=Falcon 
  PARTITION BY RANGE (`pk`) ( 
    PARTITION pa VALUES LESS THAN ( 9 ) TABLESPACE myspace1, 
    PARTITION pb VALUES LESS THAN MAXVALUE TABLESPACE myspace2
  );

If a specified tablespace (in this case myspace1 or myspace2) does not already exist,
MySQL/Falcon returns the following error:

ERROR 1005 (HY000): Can't create table 'test.falconpart' (errno: 1)

It would be more useful for a user to get a more specific error message, such as the one
returned from an ALTER TABLE statement specifying a non-existent tablespace:

mysql> ALTER TABLE t1 TABLESPACE nospace;
ERROR 1669 (HY000): Tablespace 'nospace' doesn't exist

How to repeat:
CREATE TABLE falconpart (pk integer) Engine=Falcon 
  PARTITION BY RANGE (`pk`) ( 
    PARTITION pa VALUES LESS THAN ( 9 ) TABLESPACE myspace1, 
    PARTITION pb VALUES LESS THAN MAXVALUE TABLESPACE myspace2
  );
[28 Sep 2008 9:47] Valeriy Kravchuk
Thank you for a problem report.
[24 Nov 2008 16:28] 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/59685

2916 Sergey Vojtovich	2008-11-24
      BUG#39702 - Unspecific error msg when using non-existent
                  tablespace in partition definition
      
      Partitioning handler create function didn't pass through
      error code from a storage engine, resulting in generic
      error message being returned.
[24 Nov 2008 16:45] John H. Embretsen
QA review of committed patch:

Please change the test so that it follows the format outlined by
suite/falcon/t/falcon_bug.template. Other than that the patch looks good from my
perspective. Thanks for fixing!
[24 Nov 2008 21:17] Kevin Lewis
The code change looks good. Plese make the change requested by John to the test script
format.  Then OK to push.
[25 Nov 2008 11:43] Mattias Jonsson
OK to push
[25 Nov 2008 11:58] 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/59770

2917 Sergey Vojtovich	2008-11-25
      BUG#39702 - Unspecific error msg when using non-existent
                  tablespace in partition definition
      
      Partitioning handler create function didn't pass through
      error code from a storage engine, resulting in generic
      error message being returned.
[11 Dec 2008 15:19] Bugs System
Pushed into 6.0.9-alpha  (revid:svoj@mysql.com-20081125095621-7eim1de8kccrq89l) (version
source revid:hky@sun.com-20081127084516-nbu7693932vcz2st) (pib:5)
[13 Dec 2008 11:01] MC Brown
A note has been added to the 6.0.9 changelog: 

Creating a FALCON table while specifying a specific tablespace and partition to be used
for the table will fail if the specified tablespace does not already exist, returning a
error indicating general table creation failure. The message has been updated to indicate
that the failure is due to nonexistent tablespace.