473,699 Members | 2,905 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

case sensative issues?

I notice that on unix the default for case sensative is off which means
tables created with upper case need to be referenced in sql as upper
case. It seems that if the case sensative variable is set to 1, then
select emp works as well as select EMP. Is there any reason not to set
it to 1? Also, is there an ansi standard for this? I could not find a
reference to one.

Thanks,

-Peter

(reference I found to case sensitivity)
http://dev.mysql.com/doc/mysql/en/na...nsitivity.html

--
Peter Kellner
http://peterkellner.net
Aug 15 '05 #1
3 1552
Peter Kellner (pe***@peterkel lner.net) wrote:
: I notice that on unix the default for case sensative is off which means
: tables created with upper case need to be referenced in sql as upper
: case. It seems that if the case sensative variable is set to 1, then
: select emp works as well as select EMP. Is there any reason not to set
: it to 1? Also, is there an ansi standard for this? I could not find a
: reference to one.

Are you talking about "lower_case_tab le_names"?

I'm not quite sure what you mean when you say "on unix the default for
case sensative is off".

On unix the lower_case_tabl e_names has the value 0, which is one of three
settings (i.e. not just "on" or "off"). The word "off", if you did use
it, would refer to whether your queries will be modified to force them to
have lower case characters. In that interpretation, 0 means "do not
modify my queries", which is not really the same thing as being case
sensitive.

Indeed the table name on unix is always case sensative, since they are
stored in a file of that name. The lower_case_tabl e_names variable
doesn't change that. It just controls the modification of your queries to
force them to use lower case characters.

So, if the table was originally defined using upper case characters then
the modified query would not be able to access the table.

On the other hand, if you set the variable to 1 before defining anything,
or carefully defined everything in lowercase initialy, then everything
will be created with lower case names, so a modified query will work.

I do not know the ansi standards about case sensitivity for table names,
but I would be surprised if a feature such as that controlled by
lower_case_tabl e_names is covered by the standard.

The bottom of the page you mention has at least one user's feedback with
warnings about using this feature. However another lesson from that
feedback might be that you should turn the setting to 1 to force
everything to be lowercase right from the start.

--

This space not for rent.
Aug 15 '05 #2
This followup was posted to mailing.databas e.mysql

In article <42******@news. victoria.tc.ca> , yf***@vtn1.vict oria.tc.ca
says...
Peter Kellner (pe***@peterkel lner.net) wrote:
: I notice that on unix the default for case sensative is off which means
: tables created with upper case need to be referenced in sql as upper
: case. It seems that if the case sensative variable is set to 1, then
: select emp works as well as select EMP. Is there any reason not to set
: it to 1? Also, is there an ansi standard for this? I could not find a
: reference to one.

Are you talking about "lower_case_tab le_names"?

Sorry for not being more clear. You assumed correctly what I was
looking for. I'm inclined to change the setting to force lowercase,
however since this is not the default behavior it makes me nervous to
change it.

--
Peter Kellner
http://peterkellner.net
Aug 15 '05 #3
Peter Kellner (pe***@peterkel lner.net) wrote:
: This followup was posted to mailing.databas e.mysql

: In article <42******@news. victoria.tc.ca> , yf***@vtn1.vict oria.tc.ca
: says...
: > Peter Kellner (pe***@peterkel lner.net) wrote:
: > : I notice that on unix the default for case sensative is off which means
: > : tables created with upper case need to be referenced in sql as upper
: > : case. It seems that if the case sensative variable is set to 1, then
: > : select emp works as well as select EMP. Is there any reason not to set
: > : it to 1? Also, is there an ansi standard for this? I could not find a
: > : reference to one.
: >
: > Are you talking about "lower_case_tab le_names"?
: >
: Sorry for not being more clear. You assumed correctly what I was
: looking for. I'm inclined to change the setting to force lowercase,
: however since this is not the default behavior it makes me nervous to
: change it.
I have no experience to share on this.

My guess is that if you use this setting from day 0 of your database then
you won't have a problem. Every item for which this would make a
difference will be forced to use lowercase.

If you then turned off the setting then you could still access everything
by writing your queries in lowercase.

That's my reading of it, but it's not based on experience.
--

This space not for rent.
Aug 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
6438
by: DJ | last post by:
Can someone tell me the library call that converts strings to lower case or retrns a new string that is lower case of the original, thanks im using <string> David
2
1233
by: Tom | last post by:
I have data entered in Uppercase. I need to view it in lower case in a continuous form. Any ideas???
4
33938
by: J.Marsch | last post by:
I notice that when I generate various guids, they appear to have a mix of upper and lowercase letters. Is the uniqueness of a guid case-sensitive? In other words, if I generate a guid, and then store it in a database that is case insensitive (or if I convert the letters to upper), is it still statistically unique?
110
10584
by: alf | last post by:
Hi, is it possible that due to OS crash or mysql itself crash or some e.g. SCSI failure to lose all the data stored in the table (let's say million of 1KB rows). In other words what is the worst case scenario for MyISAM backend? Also is it possible to not to lose data but get them corrupted?
8
11988
by: Chris Noble | last post by:
I need to check whether a particular user is already a member of an Active Directory Security Group. The following code extract works but only if the user distinguished name is exactly the same as that returned from Active Directory. For example using 'cn=' in the userdn string instead of 'CN=' does not work. As far as I am aware Active Directory is not case sensitive and it is therefore difficult to predict the case of a string.
7
3334
by: Adrian | last post by:
Hi, I want a const static std::set of strings which is case insensitive for the values. So I have the following which seems to work but something doesnt seem right about it. Is there a better way or any gotcha's from my code below.
2
1993
by: arunmenon | last post by:
Dear Folks, I have an query which something looks like this select ILTRDJ AS YEAR, DATEPART(MONTH,ILTRDJ) AS MONTH, FMSTR.IMITM AS CODE,FMSTR.IMSRP6_UDC AS DESCRIPTION, FTRANS.ILDCT = CASE WHEN (select FTRANS.ILDCT FROM .. FTRANS WHERE FMSTR.IMITM = FTRANS.ILITM and FTRANS.ILDCT = 'OV') THEN 'OV'
1
916
by: =?Utf-8?B?dGltdHJhcHA=?= | last post by:
I am using Windows XP SP2. I have noticed that a file saved with lower case letters will be changed to upper case at some point. I first noticed this when using bluebeam PDF software to make PDF's of CAD drawings. They have a batch lits utility that allows you to save a list of the files and reuse this list when you want to print another set of PDF's of the same CAD drawings. The utility, I have found is case sensative and will skip any...
32
8186
by: Bill H | last post by:
I wouldn't consider myself a newbie to PHP since I have never written one line of code in it (am a perl guy myself), but part of a team I am working with is writing some php interfaces into a database and I noticed that they are relaying on HTML form value names to always be lowercase in their code (ie $_POST (fyi that may be typed wrong)) and from my experience it is always better, when reading in the post information to convert the the...
0
8623
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9192
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9054
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8940
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5879
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4390
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.