Bug #32830 Can create a table T and table t in Falcon using some repeated alter tables.
Submitted: 28 Nov 2007 22:56 Modified: 3 Dec 2007 14:27
Reporter: Jeffrey Pugh Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S3 (Non-critical)
Version:6.0.3 OS:Linux
Assigned to: Kevin Lewis CPU Architecture:Any

[28 Nov 2007 22:56] Jeffrey Pugh
Description:
[Reported by PeterG and verified again with 6.0-bk]
Can create a table T and table t in Falcon using some repeated alter tables.

How to repeat:
Another test case:

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

mysql> create table T (s1 int) engine=innodb;
Query OK, 0 rows affected (0.01 sec)

mysql> alter table T engine=falcon;
ERROR 1025 (HY000): Error on rename of './d7/#sql-4f7c_1' to './d7/T' (errno: -2)
mysql> alter table T engine=falcon;
Query OK, 0 rows affected (0.04 sec)
Records: 0  Duplicates: 0  Warnings: 0

So now I have a Falcon table named "t" and
another Falcon table named "T".

Suggested fix:
Second alter table should error out just like the first
[29 Nov 2007 0:50] Miguel Solorzano
Thank you for the bug report.

create table t (s1 int) engine=falcon;
create table T (s1 int) engine=innodb;
alter table T engine=falcon;
alter table T engine=falcon;

[miguel@skybr 6.0]$ bin/mysql -uroot test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 6.0.4-alpha-debug Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

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

mysql> create table T (s1 int) engine=innodb;
Query OK, 0 rows affected (0.03 sec)

mysql> alter table T engine=falcon;
ERROR 1025 (HY000): Error on rename of './test/#sql-9f2_1' to './test/T' (errno: -2)
mysql> alter table T engine=falcon;
Query OK, 0 rows affected (0.02 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql>
[29 Nov 2007 15:03] Jim Starkey
It works correctly on current falcon-team code base.  Each "alter table"
fails with a rename failure.
[29 Nov 2007 19:21] Jeffrey Pugh
Reverified with latest 6.0-bk, and no longer fails. Instead get:
ERROR 1025 (HY000): Error on rename of './test/#sql-4d25_2' to './test/t' (errno: 121)

for whichever alter you try to do that would clash with Falcon name. Closing.
[30 Nov 2007 4:50] Kevin Lewis
This bug really did exist in the mysql-6.0 tree.  It has been fixed in mysql-6.0-falcon.  So let's mark this patch pending and let it go through the normal bug life cycle.
[3 Dec 2007 14:27] MC Brown
A note has been added to the 6.0.4 changelog: 

Using ALTER TABLE on a Falcon table it would be possible to create two tables with the same name but different case.