>My feeling is that MySQL shouldn't allow reserved words / characters
>like this, whether they are in quotes or not.
...
>Does anyone know the logic behind allowing reserved words when inside
>quotes like this? It clearly causes problems - especially for people
>using GUIs - and these people will be the least able to diagnose the
>problem.

Is that a problem with the GUI application, a problem with a user not
knowing enough, or a problem with MySQL?  I'd say it is not a problem with
MySQL, but with either the user or the GUI.  A few years ago when I was
first starting out using MySQL I had a table with a bad column name, when we
upgraded the name no longer worked in queries because MySQL became a little
bit stricter in regards to reserved words and I didn't know to back-tick
escape them.  That was my fault for picking a bad column name, it came from
lack of knowledge.  I should have never used the column name and had I known
more I wouldn't have.  It is not the software's job to teach me, it is my
job to learn, and from that experience I learned what reserved words are and
that it is not a great idea to use them.

I'm sure MySQL allows use of reserved words in order to be more compliant
with other RDBMS.  MS SQL will allow a column to be named 'field' and be
indexed without even emitting an angry beep.  Let's say I have an
application written using MS SQL and I decide I want to convert to MySQL.
If I have to change all of my column and key names I am going to be pretty
angry and will be on this list complaining about what a shoddy product MySQL
is when compared to MS SQL.  That would hardly encourage more people to
start using this great application.

I don't think I should be limited in what I can do because of the lack of
knowledge of other people.  MySQL should not be written considering the
lowest common denominator. Features, reliability, stability, performance and
compatibility are far more important factors in designing a top-notch
product if you ask me.   There are plenty of places for beginners to gain
knowledge about the product: this list; the site; web tutorials; and books,
to name a few.  There's also experience, which is probably one of the best
teachers.  I don't think it is wise to pander to an audience that doesn't
want to think on their own, then you not only limit progress but also
alienate the majority of target users.  This of course is just my personal
(not-very-well-thought-out) opinion and I'm sure a lot of people disagree.


-----Original Message-----
From: Daniel Kasak [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 15, 2003 3:11 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: mysqldump file fails to recreate database


>Lynn David Newton wrote:

>>It's the first KEY definition it doesn't like. If I
>>comment out "KEY field(field)," it works, except of
>>course then the field called 'field' is not set as an
>>index. The same exact problem occurs in two places in
>>the mysqldump file. With them commented out the DB
>>reloads.
>>
>>
>I had one like this yesterday.
>I'm pretty sure 'field' is a reserved word.
>The problem arises because some GUIs back-quote (`) all field / index
>names, which MySQL then can recognize as names.
>You can continue to use KEY field(field) if you must by using the -Q
>option with mysqldump, to quote fieldnames.
>But I wouldn't.
>
>Does anyone know the logic behind allowing reserved words when inside
>quotes like this? It clearly causes problems - especially for people
>using GUIs - and these people will be the least able to diagnose the
>problem.
>
>--
>Daniel Kasak
>IT Developer
>* NUS Consulting Group*
>Level 18, 168 Walker Street
>North Sydney, NSW, Australia 2060
>T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
>email: [EMAIL PROTECTED]
>website: www.nusconsulting.com


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to