Bug #30210 Falcon: bad data with case insensitive table names
Submitted: 2 Aug 2007 20:09 Modified: 29 Aug 2007 11:30
Reporter: Trudy Pelzer Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S1 (Critical)
Version:6.0.2-alpha-debug OS:Linux (SuSE)
Assigned to: CPU Architecture:Any

[2 Aug 2007 20:09] Trudy Pelzer
Description:
Using Falcon, I can create tables T and t and get no error.
But Falcon treats them as the same table, which I do not expect.
Meanwhile, the server thinks there are two tables: the datadir 
has two files, T.frm and t.frm and there are two entries in 
information_schema.tables. This causes problems when I insert
data and it goes to a table other than the one I wanted to
insert into.

That is, Falcon lets me create what I think are two different
tables -- and then treats them as a single table. Data then
does not "go" where I expect.

How to repeat:
mysql> show variables like '%lower%';
+------------------------+-------+
| Variable_name          | Value |
+------------------------+-------+
| lower_case_file_system | OFF   |
| lower_case_table_names | 0     |
+------------------------+-------+
2 rows in set (0.01 sec)

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

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

mysql> insert into T values (1);
Query OK, 1 row affected (0.00 sec)

mysql> insert into t values (2);
Query OK, 1 row affected (0.00 sec)

mysql> select * from t;
+------+
| s1   |
+------+
|    1 |
|    2 |
+------+
2 rows in set (0.00 sec)
-- This result is not what I expected, since the value
"1" was inserted into table T and not into table t. If
the engine accepts both CREATE TABLE statements, it must
also distinguish between them for all futher operations.
[14 Aug 2007 17:01] MySQL Verification Team
Thank you for the bug report.
[24 Aug 2007 20:19] Jim Starkey
Redefinition check for tables got lost during the change over to the
new tablespace scheme.  It is now fixed.
[27 Aug 2007 10:34] Hakan Küçükyılmaz
falcon_bug_30210 shows correct error message now.
[29 Aug 2007 11:30] MC Brown
A note has been added to the 6.0.1. changelog. 

Falcon would incorrectly allow creation of two tables with the
  same name but different case sensitivity, without raising an error, but treat
  the two tables as the same during further queries.