Bug #33215 CREATE TABLE fails after CREATE with non-existing tablespace
Submitted: 13 Dec 2007 14:28 Modified: 13 Dec 2007 14:31
Reporter: Philip Stoev Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S3 (Non-critical)
Version:6.0.5-alpha-debug-log OS:Any
Assigned to: CPU Architecture:Any

[13 Dec 2007 14:28] Philip Stoev
Description:
CREATE TABLE fails if a previous CREATE failed on the same table due to bad TABLESPACE.

It feels like a table can never be created if the user supplied a bad TABLESPACE argument on the first CREATE attempt.

How to repeat:
mysql>  create table t5 (f1 integer) Engine=FALCON TABLESPACE nosuchspace;
ERROR 1005 (HY000): Can't create table 'test.t5' (errno: 156)
mysql>  create table t5 (f1 integer) Engine=FALCON;
ERROR 1005 (HY000): Can't create table 'test.t5' (errno: 156)

a table that was not "touched" before works ok:

mysql>  create table t6 (f1 integer) Engine=FALCON;
Query OK, 0 rows affected (0.02 sec)

Suggested fix:
It appears to me that the table name somehow remains in Falcon's internal structures even if table creation fails. It may help to check for validity of TABLESPACE argument as soon as possible before extra internal work is being done to create the table.
[13 Dec 2007 14:31] Philip Stoev
Duplicate to bug #32617.