Bug #33719 CREATE TABLE only accepts falcon_user tablespace in uppercase
Submitted: 7 Jan 2008 11:29 Modified: 15 May 2009 15:54
Reporter: Philip Stoev Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S3 (Non-critical)
Version:6.0.4-p2 OS:Linux
Assigned to: Lars-Erik Bjørk CPU Architecture:Any
Tags: F_TABLESPACE
Triage: Triaged: D4 (Minor)

[7 Jan 2008 11:29] Philip Stoev
Description:
CREATE TABLE only accepts a falcon_user tablespace argument if falcon_user is in uppercase. This limitation does not apply to user-created tablespaces, and as such may confuse users or tools.

How to repeat:
mysql> create table foo (f1 integer) engine=falcon tablespace falcon_user;
ERROR 1005 (HY000): Can't create table 'test.foo' (errno: 156)

mysql> create table bar (f1 integer) engine=falcon tablespace FALCON_USER;
Query OK, 0 rows affected (0.02 sec)

Please note that once you have the "Can't create table" error, this table name is corrupted and subsequent valid CREATE TABLE commands will return the same error.
[8 Jan 2008 11:43] Philip Stoev
Sorry about this bug, falcon tablespaces are case-sensitive, and FALCON_USER is the correct case for that tablespace.
[8 Jan 2008 15:31] Ann Harrison
Falcon tables spaces should not be case sensitive.
[13 Mar 2008 5:39] Jon Stephens
Database object names in MySQL follow rules that may not be SQL-standard, but are well-established and consistent nevertheless. No storage engine should make an exception in this regard to the rules applying to the MySQL Server as a whole.

Until such time as MySQL's rules regarding case sensitivity change, Falcon DB object names should not be case-sensitive on Unix platforms.

And why was this bug flagged as Private?
[13 Mar 2008 15:26] Ann Harrison
The rules for case sensitivity are documented here:

http://dev.mysql.com/doc/refman/6.0/en/identifier-case-sensitivity.html

which rules should apply to table spaces?
[29 Aug 2008 20:18] Kevin Lewis
Lars-Erik,  This sounds like similar code to what you are looking at with Bug#38304.  That is, how does the SymbolManager convert names to uppercase.
[1 Sep 2008 12:48] Lars-Erik Bjørk
It seems the problem is the way falcon handles 'create table/tablespace' statements. These are converted back into an (sql) string and parsed all over again by Falcon.

In the conversion, the tablespace name is quoted with "s, which makes it case sensitive.

A possible solution may be not to surround the tablespace name with quotes, when converting back to an (sql) string, but I am not sure if this will have other (undesired) effects as well ...
[2 Sep 2008 8:33] Lars-Erik Bjørk
The suggested solution introduces a problem in the case where the tablespace is 
`word1 word2` ...
[12 Sep 2008 12:52] Lars-Erik Bjørk
Not sure how to proceed when we don't know if the tablespace name given by the server was quoted (``) or not
[16 Feb 2009 19:48] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/66543

3026 lars-erik.bjork@sun.com	2009-02-16
      Added a test for bug#33719 CREATE TABLE only accepts falcon_user tablespace in uppercase
      
      === added file 'mysql-test/suite/falcon/r/falcon_bug_33719.result'
      Expected result
      
      
      === added file 'mysql-test/suite/falcon/t/falcon_bug_33719.test'
      Test file
[17 Feb 2009 8:22] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/66584

3025 lars-erik.bjork@sun.com	2009-02-17
      Added a test for bug#33719 CREATE TABLE only accepts falcon_user
      tablespace in uppercase
      
      === added file 'mysql-test/suite/falcon/r/falcon_bug_33719.result'
      Expected result
      
      
      === added file 'mysql-test/suite/falcon/t/falcon_bug_33719.test'
      Test file
[2 Mar 2009 14:12] Bugs System
Pushed into 6.0.11-alpha (revid:alik@sun.com-20090302140208-lfdejjbcyezlhhjt) (version source revid:lars-erik.bjork@sun.com-20090217082356-dn63k9hqosvf551z) (merge vers: 6.0.10-alpha) (pib:6)
[15 May 2009 15:54] MC Brown
A note has been added to the 6.0.11 changelog: 

Incompatible Change: Falcon supported case-sensitive tablespace names. The code has been changed so that all tablespace names are converted to uppercase names during creation. Because of this change:

It is not possible to drop existing tablespace created by previous versions, if it's name wasn't in upper case.

It is not possible to create tables using tablespace created by previous versions, if tablespace name wasn't in upper case.