Bug #31325 Falcon fails to create table if in specific db
Submitted: 1 Oct 2007 18:50 Modified: 12 Oct 2007 21:15
Reporter: Nicklas Westerlund (OCA) Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S3 (Non-critical)
Version:6.0.2-alpha-debug OS:Mac OS X
Assigned to: CPU Architecture:Any

[1 Oct 2007 18:50] Nicklas Westerlund
Description:
Falcon cannot create a specific table, t1 in a database named 'falcon' 
However, t2 works.  Also, if the database is named something else, t1 works perfectly.

Desc: 

mysql> \u falcon
Database changed
mysql> SHOW TABLES;
Empty set (0.00 sec)

mysql> CREATE TABLE t1 ( id INT, text VARCHAR(255) ) TABLESPACE testspace ENGINE=Falcon;
ERROR 1005 (HY000): Can't create table 'falcon.t1' (errno: 156)

mysql> CREATE TABLE t2 ( id INT, text VARCHAR(255) ) TABLESPACE testspace ENGINE=Falcon;
Query OK, 0 rows affected (0.01 sec)

mysql> SHOW TABLES;
+------------------+
| Tables_in_falcon |
+------------------+
| t2               | 
+------------------+
1 row in set (0.00 sec)

mysql> CREATE DATABASE falcontest;
Query OK, 1 row affected (0.00 sec)

mysql> \u falcontest
Database changed
mysql> CREATE TABLE t1 ( id INT, text VARCHAR(255) ) TABLESPACE testspace ENGINE=Falcon;
Query OK, 0 rows affected (0.00 sec)

mysql> CREATE TABLE t2 ( id INT, text VARCHAR(255) ) TABLESPACE testspace ENGINE=Falcon;
Query OK, 0 rows affected (0.00 sec)

mysql> SHOW TABLES;
+----------------------+
| Tables_in_falcontest |
+----------------------+
| t1                   | 
| t2                   | 
+----------------------+
2 rows in set (0.00 sec)

How to repeat:
CREATE TABLESPACE testspace ADD DATAFILE 'testspace.fts' ENGINE=Falcon;
CREATE DATABASE falcon;

\u falcon
CREATE TABLE t1 ( id INT, text VARCHAR(255) ) TABLESPACE testspace ENGINE=Falcon;
CREATE TABLE t2 ( id INT, text VARCHAR(255) ) TABLESPACE testspace ENGINE=Falcon;
SHOW TABLES;
CREATE DATABASE falcontest;

\u falcontest
CREATE TABLE t1 ( id INT, text VARCHAR(255) ) TABLESPACE testspace ENGINE=Falcon;
CREATE TABLE t2 ( id INT, text VARCHAR(255) ) TABLESPACE testspace ENGINE=Falcon;
SHOW TABLES;
[1 Oct 2007 20:06] Nicklas Westerlund
falcon-t3.txt

Attachment: falcon-t3.txt (text/plain), 28.25 KiB.

[1 Oct 2007 20:07] Nicklas Westerlund
falcon-t1.txt

Attachment: falcon-t1.txt (text/plain), 9.03 KiB.

[1 Oct 2007 20:08] Nicklas Westerlund
Added some trace output of the two difference create table syntaxes...
This does give me a second question though.. Why does falcon write to the file and then deletes it before it returns 'error, couldn't create the table' ?
[12 Oct 2007 17:28] Kevin Lewis
Miguel, Can this be verified?
[12 Oct 2007 21:15] Giuseppe Maxia
Can't repeat the described behavior using MySQL 6.0.2 on Mac OS X or MySQL 6.0.3 on Linux.