Bug #36925 Falcon: crash with tablespace after error
Submitted: 23 May 2008 17:31 Modified: 26 Jun 2008 14:47
Reporter: Peter Gulutzan Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S3 (Non-critical)
Version:6.0.6-alpha-debug OS:Linux (SUSE 10 | 32-bit)
Assigned to: Assigned Account CPU Architecture:Any
Tags: F_TABLESPACE

[23 May 2008 17:31] Peter Gulutzan
Description:
I create a tablespace.
I try to create a table in a nonexistent tablespace.
I create a tablespace.
I create a table.
Crash.

How to repeat:
use test
create tablespace w add datafile 'w' engine=falcon;
create table q (s1 int) tablespace q engine=falcon;
create tablespace q add datafile 'q' engine=falcon;
create table q (s1 int) tablespace q engine=falcon;

Example run:

mysql> use test
Database changed
mysql> create tablespace w add datafile 'w' engine=falcon;
Query OK, 0 rows affected (0.29 sec)

mysql> create table q (s1 int) tablespace q engine=falcon;
ERROR 1005 (HY000): Can't create table 'test.q' (errno: 156)
mysql> create tablespace q add datafile 'q' engine=falcon;
Query OK, 0 rows affected (0.21 sec)

mysql> create table q (s1 int) tablespace q engine=falcon;
ERROR 2013 (HY000): Lost connection to MySQL server during query
[23 May 2008 18:15] Sveta Smirnova
Thank you for the report.

Verified as described.
[4 Jun 2008 16:26] Kevin Lewis
We cannot reproduce this.  Does it still happen on the 6.0.5 release? mysql-6.0-falcon-team tree?
[4 Jun 2008 17:43] Peter Gulutzan
Repeatable as described with mysql-6.0 pulled today.
[11 Jun 2008 18:32] Kevin Lewis
Hakan, Can you verify whether this issue still exists in the falcon-team tree in bazaar?
[24 Jun 2008 18:25] Peter Gulutzan
Another test case:

mysql> use test
Database changed
mysql> create table tx (s1 int) engine=falcon tablespace falcon_master;
ERROR 1005 (HY000): Can't create table 'test.tx' (errno: 156)
mysql> create table tx (s1 int) engine=falcon tablespace falcon_master;
ERROR 2013 (HY000): Lost connection to MySQL server during query
[25 Jun 2008 13:32] John Embretsen
I reproduced this on mysql-6.0.5-alpha-linux-x86_64-glibc23, but I was unable to reproduce in the current mysql-6.0-falcon branch (6.0.6, revno. 2716):

mysql> use test
Database changed
mysql> create table tx (s1 int) engine=falcon tablespace falcon_master;
ERROR 1668 (HY000): Tablespace 'falcon_master' doesn't exist
mysql> create table tx (s1 int) engine=falcon tablespace falcon_master;
ERROR 1668 (HY000): Tablespace 'falcon_master' doesn't exist

It seems that this was fixed by the fixes for Bug#33397 and Bug#33723.
I recently added a number of related test cases for those bugs and the related duplicates Bug#34048 and Bug#34617, see http://lists.mysql.com/commits/48170

I suggest marking this issue as duplicate, unless someone is still able to reproduce on the falcon bzr branch.

Also, although there seems to be a Falcon tablespace falcon_master as indicated by the presence of var/falcon_master.fts. It seems that a user cannot add tables to this. I'm sure Falcon experts can explain this in detail...

mysql> create tablespace falcon_master add datafile 'falcon_master.fts' engine='Falcon';
ERROR 1674 (HY000): Tablespace data file 'falcon_master.fts' already exists
mysql> create tablespace falcon_master add datafile 'falcon_master_test.fts' engine='Falcon';
Query OK, 0 rows affected (0.12 sec)

mysql> create table tx (s1 int) engine=falcon tablespace falcon_master;
Query OK, 0 rows affected (0.07 sec)

mysql> create table tx2 (s1 int) engine=falcon;
Query OK, 0 rows affected (0.06 sec)

mysql> create table tx3 (s1 int) engine=falcon tablespace FALCON_MASTER;
ERROR 1668 (HY000): Tablespace 'FALCON_MASTER' doesn't exist

mysql> select * from information_schema.falcon_tables;
+-------------+------------+-----------+---------------+---------------+
| SCHEMA_NAME | TABLE_NAME | PARTITION | TABLESPACE    | INTERNAL_NAME |
+-------------+------------+-----------+---------------+---------------+
| TEST        | TX         |           | falcon_master | TX            |
| TEST        | TX2        |           | FALCON_USER   | TX2           |
+-------------+------------+-----------+---------------+---------------+
2 rows in set (0.00 sec)
[25 Jun 2008 15:32] Ann Harrison
Falcon_master is the tablespace Falcon uses for its own metadata.
If possible, we should probably have a specific error that 
explain that you can not create permanent user tables in 
falcon_master, falcon_temporary, and falcon_backlog.
[25 Jun 2008 22:53] Peter Gulutzan
I believe that John H. Embretsen is right, this should be marked "Duplicate".
Sorry, I hadn't carefully read the comments on all the earlier bug reports.
[26 Jun 2008 14:47] John Embretsen
This is a duplicate. See previous comments for details. Bug#37668 ('No error message if tables are created in Falcon tablespaces with special names') was created as a related issue.