On 5/16/14, 2:32 PM, [email protected] wrote:
I'm having a discussion with my ISP about the MySQL database he's
hosting for me.  Apparently he's got a switch on where the EXACT
SPELLING of the table (and probably field name) is important.

If I've got a table named luCrap then I want to be able to do the
following SQLs and have them all work:

select * from luCrap
select * from lucrap
select * from LUCRAP

He asks me "Why would anyone want to do that?"  lol   I replied: "Well,
that's just how my code is sometimes!"  Honestly, why the hell would I
want two DIFFERENT tables named the same but in different casing?  How
confusing is that?!?!?????

What am I missing from all of this?

Casing can be confusing, especially with open-source software that was mostly developed on *NIX (and most filesystems on which are case-sensitive) but widely adopted and used on Windows (which uses a case-insensitive filesystem).

Wait, you say, you aren't talking about the filesystem here.

Ah, but you are.

MySQL doesn't save the DATABASE name anywhere but as the DIRECTORY NAME that holds the tables. And it also uses the FILE name on disk to determine the TABLE name. So, the case-sensitivity of the underlying operating system determines the case-sensitivity of the MySQL database and table names. Not field names, as far as I'm aware.

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

What's really so hard about finding and replacing all instances of the database and table names. These are probably in a handful of places. And what's so hard about thinking case-sensitively?

What you are really saying is you want your ISP to enable your laziness. :)

You could always host it yourself on a case-insensitive OS.

Paul



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to