DB & table name case display...

DB & table name case display...

am 21.12.2004 07:04:32 von jsWalter

I have this SQL statement (see below).

It creates a table. notice the case in the name of the table.

On my Linux box, the case is unchanged.

On my PC, it is changed to lower case.

Why?

This "feature" of PC has caused me 2 days time trying to figure out why my
DB dump from home was not working on my Linux box at work.

Please explain. Please tell me how I can "fix" this.

thanks

Walter

CREATE TABLE `ControlledObject` (
`ControlledObject_id` int(10) unsigned NOT NULL auto_increment,
`ControlledObject_name` varchar(128) NOT NULL default '',
`on_what_table` varchar(128) default NULL,
`on_what_field` varchar(128) default NULL,
`user_field` varchar(32) default NULL,
`data_source_id` int(10) unsigned default NULL,
PRIMARY KEY (`ControlledObject_id`),
KEY `data_source_id` (`data_source_id`)
) TYPE=InnoDB AUTO_INCREMENT=1;


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: DB & table name case display...

am 21.12.2004 07:40:48 von Chris

In MySQL the Database and Table names retain the case sensitivity of the
OS, since they are stored as directories/files. There have always been
problems going between the two OSes.

The only way I've worked around this problem is to ALWAYS use lowercase
database and table names. I don't know of any other way.

Chris

jsWalter wrote:

>I have this SQL statement (see below).
>
>It creates a table. notice the case in the name of the table.
>
>On my Linux box, the case is unchanged.
>
>On my PC, it is changed to lower case.
>
>Why?
>
>This "feature" of PC has caused me 2 days time trying to figure out why my
>DB dump from home was not working on my Linux box at work.
>
>Please explain. Please tell me how I can "fix" this.
>
>thanks
>
>Walter
>
>CREATE TABLE `ControlledObject` (
> `ControlledObject_id` int(10) unsigned NOT NULL auto_increment,
> `ControlledObject_name` varchar(128) NOT NULL default '',
> `on_what_table` varchar(128) default NULL,
> `on_what_field` varchar(128) default NULL,
> `user_field` varchar(32) default NULL,
> `data_source_id` int(10) unsigned default NULL,
> PRIMARY KEY (`ControlledObject_id`),
> KEY `data_source_id` (`data_source_id`)
>) TYPE=InnoDB AUTO_INCREMENT=1;
>
>
>
>


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

Re: DB & table name case display...

am 21.12.2004 15:08:45 von SGreen

--=_alternative 004DED0685256F71_=
Content-Type: text/plain; charset="US-ASCII"

Hi Walter,

The case sensitivity of the database objects (databases and tables) is
dependent on the OS. Unfortunately, MS OS's are not case-sensitive. It all
explained in some detail here:

http://dev.mysql.com/doc/mysql/en/Name_case_sensitivity.html

That article goes into some settings you can use and some of the of the
problems you can encounter with cross-platform case-sensitivity. Yet
another reason to wonder what M$ was $moking when they designed their
OS's.

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

"jsWalter" wrote on 12/21/2004 01:04:32 AM:

> I have this SQL statement (see below).
>
> It creates a table. notice the case in the name of the table.
>
> On my Linux box, the case is unchanged.
>
> On my PC, it is changed to lower case.
>
> Why?
>
> This "feature" of PC has caused me 2 days time trying to figure out why
my
> DB dump from home was not working on my Linux box at work.
>
> Please explain. Please tell me how I can "fix" this.
>
> thanks
>
> Walter
>
> CREATE TABLE `ControlledObject` (
> `ControlledObject_id` int(10) unsigned NOT NULL auto_increment,
> `ControlledObject_name` varchar(128) NOT NULL default '',
> `on_what_table` varchar(128) default NULL,
> `on_what_field` varchar(128) default NULL,
> `user_field` varchar(32) default NULL,
> `data_source_id` int(10) unsigned default NULL,
> PRIMARY KEY (`ControlledObject_id`),
> KEY `data_source_id` (`data_source_id`)
> ) TYPE=InnoDB AUTO_INCREMENT=1;
>
>
> --
> MySQL Windows Mailing List
> For list archives: http://lists.mysql.com/win32
> To unsubscribe: http://lists.mysql.com/win32?unsub=sgreen@unimin.com
>

--=_alternative 004DED0685256F71_=--