Bug #33213 Wrong CREATE TABLESPACE error when using existing DATAFILE
Submitted: 13 Dec 2007 13:43 Modified: 8 Jan 2009 10:22
Reporter: Philip Stoev Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S3 (Non-critical)
Version:6.0.4-BK OS:Any
Assigned to: Sergey Vojtovich CPU Architecture:Any

[13 Dec 2007 13:43] Philip Stoev
Description:
CREATE TABLESPACE with ENGINE = Falcon where DATAFILE already existed fails with error "tablespace already exists", even if the tablespace did not exist before.

In addition, it is a gray area whether a file can be moved between tablespaces having different names, so extra clarifications in the manual may be a good idea.

Possible leftover after BUG#29511.

How to repeat:
mysql> CREATE TABLESPACE t1 ADD DATAFILE 'f1' ENGINE = Falcon;
Query OK, 0 rows affected (0.02 sec)

mysql> CREATE TABLESPACE t2 ADD DATAFILE 'f1' ENGINE = Falcon;
ERROR 1656 (HY000): Tablespace 't2' already exists

Suggested fix:
Change error message to a more specific one stating the fact that the DATAFILE, rather than the tablespace, already exists.

If neeeded, a clarification should be added to the manual if datafile migration from one tablespace into another is supported.
[13 Dec 2007 16:31] Kevin Lewis
Sergey, This is a 'wrong error message' bug in Falcon Tablespaces
[18 Apr 2008 12:03] 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/45600

ChangeSet@1.2643, 2008-04-18 16:00:35+05:00, svoj@mysql.com +13 -0
  BUG#33213 - Wrong CREATE TABLESPACE error when using existing DATAFILE
  
  Creating a tablespace with data file that already exist returns an
  error which states that the tablespace exist.
  
  With this fix error message states that the data file exist.
[22 Apr 2008 10:22] 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/45809

ChangeSet@1.2643, 2008-04-22 14:19:03+05:00, svoj@mysql.com +13 -0
  BUG#33213 - Wrong CREATE TABLESPACE error when using existing DATAFILE
  
  Creating a tablespace with data file that already exist returns an
  error which states that the tablespace exist.
  
  With this fix error message states that the data file exist.
[5 Aug 2008 16:44] Sergey Vojtovich
Was pushed to 6.0.6.
[8 Jan 2009 10:22] MC Brown
A note has been added to the 6.0.6 changelog: 

When creating a new tablespace and specifying the name of an existing tablespace file, an incorrect error message would be reported specifying that the tablespace already existed. The error message has been updated to reflect the actual error.