Bug #30210 Falcon: bad data with case insensitive table names
Submitted: 2 Aug 2007 22:09 Modified: 29 Aug 2007 13:30
Reporter: Trudy Pelzer
Status: Closed
Category:Server: Falcon Severity:S1 (Critical)
Version:6.0.2-alpha-debug OS:Linux (SuSE)
Assigned to: Target Version:

[2 Aug 2007 22: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 19:01] Miguel Solorzano
Thank you for the bug report.
[24 Aug 2007 22: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 12:34] Hakan Kuecuekyilmaz
falcon_bug_30210 shows correct error message now.
[29 Aug 2007 13: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.