Table Names Not Case Matched
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Fix Released
|
Medium
|
Andrew Hutchings | ||
7.0 |
Fix Released
|
Medium
|
Andrew Hutchings |
Bug Description
While Database names in Drizzle are case-aware, Table-Names are being displayed only in lowercase:
drizzle> create database Test;
Query OK, 1 row affected (0.04 sec)
drizzle> use test;
Database changed
drizzle> show databases;
+------
| Database |
+------
| DATA_DICTIONARY |
| INFORMATION_SCHEMA |
| mcptest |
| Test |
+------
4 rows in set (0 sec)
drizzle> SELECT TABLE_NAME FROM INFORMATION_
+--------------+
| TABLE_NAME |
+--------------+
| art |
| blogcomments |
| blogmoods |
| blogposts |
| blogtags |
+--------------+
5 rows in set (0 sec)
drizzle> SELECT TABLE_NAME FROM DATA_DICTIONARY
+--------------+
| TABLE_NAME |
+--------------+
| art |
| blogcomments |
| blogmoods |
| blogposts |
| blogtags |
+--------------+
5 rows in set (0.15 sec)
drizzle> use mcptest;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
drizzle> SHOW CREATE TABLE ShoutBox\G
*******
Table: shoutbox
Create Table: CREATE TABLE `shoutbox` (
`shoutid` INT NOT NULL AUTO_INCREMENT,
`date` DATETIME DEFAULT NULL,
`shoutname` TEXT COLLATE utf8_general_ci NOT NULL,
`shout` TEXT COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (`shoutid`),
KEY `date_idx` (`date`)
) ENGINE=InnoDB COLLATE = utf8_general_ci AUTO_INCREMENT=267
1 row in set (0 sec)
drizzle> SHOW CREATE TABLE SHOUTBOX\G
*******
Table: shoutbox
Create Table: CREATE TABLE `shoutbox` (
`shoutid` INT NOT NULL AUTO_INCREMENT,
`date` DATETIME DEFAULT NULL,
`shoutname` TEXT COLLATE utf8_general_ci NOT NULL,
`shout` TEXT COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (`shoutid`),
KEY `date_idx` (`date`)
) ENGINE=InnoDB COLLATE = utf8_general_ci AUTO_INCREMENT=267
1 row in set (0 sec)
What things look like in MySQL:
mysql> SELECT TABLE_NAME FROM information_
+---------------+
| TABLE_NAME |
+---------------+
| Art |
| BlogComments |
| BlogMoods |
| BlogPosts |
| BlogPostsView |
+---------------+
5 rows in set (0.01 sec)
mysql> SHOW CREATE TABLE ShoutBox\G
*******
Table: ShoutBox
Create Table: CREATE TABLE `ShoutBox` (
`shoutid` int(11) NOT NULL AUTO_INCREMENT,
`date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`shoutname` tinytext NOT NULL,
`shout` tinytext NOT NULL,
PRIMARY KEY (`shoutid`),
KEY `date_idx` (`date`)
) ENGINE=InnoDB AUTO_INCREMENT=267 DEFAULT CHARSET=utf8
1 row in set (0.00 sec)
Drizzle should be preserving the original case (whether or not Drizzle is case sensitive).
Related branches
- Drizzle Developers: Pending requested
-
Diff: 203 lines (+66/-18)8 files modifieddrizzled/definition/table.cc (+5/-1)
drizzled/identifier/table.cc (+4/-1)
drizzled/sql_parse.cc (+0/-2)
plugin/innobase/handler/ha_innodb.cc (+15/-8)
plugin/schema_dictionary/tests/r/data_dictionary.result (+3/-3)
tests/r/bug673380_create_table_null_col_type.result (+1/-1)
tests/suite/jp/r/enum_utf8.result (+36/-0)
tests/suite/regression/r/654219.result (+2/-2)
The current branch turns on case sensitivity which causes FS based issues, going to take a different approach.