Forums » General Discussion

Thread: Capitalization in TOAD under Windows

This question is not answered. Helpful answers available: 2. Answered answers available: 1.


Permlink Replies: 1 - Pages: 1 - Last Post: Jul 20, 2012 10:27 AM by: njorger Threads: [ Previous | Next ]
Andor

Posts: 3
Registered: 4/26/10
Capitalization in TOAD under Windows
Posted: Jul 19, 2012 6:44 PM
 
  Click to reply to this thread Reply

Hi, I'm not sure if this is a bug or desired behavior, but when running MySQL under Windows, Toad does not allow capital letters in table names.

When creating a table, the name will automatically be changed by Toad to all lowercase. So if you enter "articleLocations", Toad will store this in MySQL as "articlelocations".

As long as the database remains under Windows, this is not a problem of course. But when you move a database to a Linux environment, all sorts of problems arise.

In our code we stick to our naming conventions of lowerCamelCase for pretty much everything. Strangely, in database and in column names Toad does allow the use capital letters; only in table names this seems to be forbidden.

I'm not sure if this is a feature or a bug, and if it is a bug I'm not sure if it is a bug in Toad or in MySQL for Windows. I do know that it is a bit of a hassle to have to rename all tables every time when moving a database from Windows to Linux. It obviously takes an extra round of debugging, too. A lot of work for something that seems to be a trivial matter.

So basically I have two questions: would this be something I should submit a bug Toad report for? And, more importantly perhaps: does anybody know a work around?

Thanks, regs,
Andor



njorger


Posts: 10
Registered: 9/23/11
Re: Capitalization in TOAD under Windows
Posted: Jul 20, 2012 10:27 AM   in response to: Andor
 
  Click to reply to this thread Reply

Hi Andor;

This is not a bug. Windows operating systems are not case sensitive when it comes to file/folder naming. As such MySql creates files (thus table names) without any concern for case.

You can however, force case sensitivity in a Windows environment by setting the following in your my.ini configuration file in the [mysqld] section.

[mysqld]
lower_case_table_names=0

This forces MySql under Windows to maintain the case you provide when naming tables.

For a more detailed explanation see the following link:

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

Hope this helps.


Legend
Guru: 2001 + pts
Expert: 751 - 2000 pts
Enthusiast: 31 - 750 pts
Novice: 0 - 30 pts
Moderators
Helpful answer (5 pts)
Answered (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums