Bug #31296 falcon does not remove associated tablespace file.
Submitted: 29 Sep 2007 20:13 Modified: 21 Apr 2008 9:54
Reporter: Matthew Montgomery Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S2 (Serious)
Version:6.0.2-alpha-log OS:Linux
Assigned to: Sergey Vojtovich CPU Architecture:Any
Tags: F_TABLESPACE, falcon

[29 Sep 2007 20:13] Matthew Montgomery
Description:
If I create a tablespace with falcon_ts1 with datafile 'falcon_ts1.fts' I am able to issue DROP TABLESPACE against it using FALCON_TS1 or falcon_ts1 but the associated datafile is not removed.

Once DROP TABLESPACE is called I cannot create tables within that tablespace or create another tablespace with the same name or create a new tablespace which uses the same datafile name

How to repeat:
sh$ cd data/

mysql> use test; 
Database changed

mysql> \! ls 
matt-desktop-bin.000001  matt-desktop-bin.000003  matt-desktop.err  matt-desktop-slow.log  test
matt-desktop-bin.000002  matt-desktop-bin.index   matt-desktop.pid  mysql

mysql> create tablespace falcon_ts1 add datafile 'falcon_ts1.fts' engine=falcon; 
Query OK, 0 rows affected (0.24 sec)

mysql> \! ls
falcon_master.fl1  falcon_temporary.fts  matt-desktop-bin.000001  matt-desktop-bin.index  matt-desktop-slow.log
falcon_master.fl2  falcon_ts1.fts        matt-desktop-bin.000002  matt-desktop.err        mysql
falcon_master.fts  falcon_user.fts       matt-desktop-bin.000003  matt-desktop.pid        test

mysql> drop tablespace FALCON_TS1 engine=falcon; 
Query OK, 0 rows affected (0.02 sec)

mysql> \! ls
falcon_master.fl1  falcon_temporary.fts  matt-desktop-bin.000001  matt-desktop-bin.index  matt-desktop-slow.log
falcon_master.fl2  falcon_ts1.fts        matt-desktop-bin.000002  matt-desktop.err        mysql
falcon_master.fts  falcon_user.fts       matt-desktop-bin.000003  matt-desktop.pid        test

mysql> drop tablespace falcon_ts1 engine=falcon; 
Query OK, 0 rows affected (0.01 sec)

mysql> \! ls 
falcon_master.fl1  falcon_temporary.fts  matt-desktop-bin.000001  matt-desktop-bin.index  matt-desktop-slow.log
falcon_master.fl2  falcon_ts1.fts        matt-desktop-bin.000002  matt-desktop.err        mysql
falcon_master.fts  falcon_user.fts       matt-desktop-bin.000003  matt-desktop.pid        test

mysql> create table t1 (a int primary key, b varchar(20)) tablespace falcon_ts1 engine=falcon; 
ERROR 1005 (HY000): Can't create table 'test.t1' (errno: 156)

mysql> \! perror 156
Illegal error code: 156

mysql> drop tablespace FALCON_gibberish engine=falcon; 
ERROR 65433 (HY000): Unknown error -103

mysql> create tablespace FALCON_gibberish add datafile 'falcon_ts1.fts' engine=falcon; 
ERROR 65433 (HY000): Unknown error -103

mysql> create tablespace falcon_ts1 add datafile 'falcon_ts3.fts' engine=falcon; 
ERROR 65433 (HY000): Unknown error -103

Suggested fix:
...
[30 Sep 2007 12:10] Peter Laursen
this is documented here:
http://dev.mysql.com/doc/falcon/en/se-falcon-createtable.html

so it is not only a bug - it is a documented bug!
[30 Sep 2007 19:18] Valeriy Kravchuk
Thank you for a bug report. Verified just as described.
[30 Sep 2007 19:20] Valeriy Kravchuk
Bug #31301 was marked as a duplicate of this one.
[30 Oct 2007 11:08] 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/36630

ChangeSet@1.2649, 2007-10-30 14:11:16+04:00, svoj@mysql.com +3 -0
  BUG#31296 - falcon does not remove associated tablespace file.
  
  When dropping a tablespace, falcon doesn't clean-up data files and
  in-memory data structures.
[1 Nov 2007 12:25] 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/36856

ChangeSet@1.2653, 2007-11-01 15:27:58+04:00, svoj@mysql.com +3 -0
  BUG#31296 - falcon does not remove associated tablespace file.
  
  When dropping a tablespace, falcon doesn't clean-up data files and
  in-memory data structures.
[13 Nov 2007 9:57] 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/37650

ChangeSet@1.2672, 2007-11-13 13:59:36+04:00, svoj@mysql.com +3 -0
  BUG#31296 - falcon does not remove associated tablespace file.
  
  When dropping a tablespace, falcon doesn't clean-up data files and
  in-memory data structures.
[14 Nov 2007 9:41] Bugs System
Pushed into 6.0.4-alpha
[15 Nov 2007 7:23] MC Brown
A note has been added to the 6.0.4 changelog: 

When dropping Falcon tablespaces the associated tablespace file would not be deleted.
[30 Nov 2007 20:43] Bugs System
Pushed into 6.0.4-alpha
[20 Apr 2008 12:02] Hakan Küçükyılmaz
Still failing on Pushbuild Windows:

falcon.falcon_bug_31296        [ fail ]

mysqltest: At line 25: query 'CREATE TABLESPACE ts1 ADD DATAFILE 'ts1.fts' ENGINE $engine' failed: 1666: Tablespace 'ts1' already exists

Moved test case to falcon_team suite.
[21 Apr 2008 9:54] Sergey Vojtovich
Setting status back to "Closed" as original problem was fixed. Subject of recently reported problem is BUG#32993.