Hi Steve, ----- Original Message ----- From: "Steve Fink" <[EMAIL PROTECTED]>
> > I couldn't find an explanation of this behavior in the docs. When I > > use the following CREATE command: > > CREATE TABLE D6 (id int(10) not null unique); > > it appears to automatically create an index for me: > > Argh! Never mind. Learn something new every day -- the 'unique' > keyword *is* a definition of an index. Weird. > > So maybe I should change this to a feature request: when MySQL hits > one of the kajillion wacky parts of SQL that implicitly name indexes, > could it check whether its default name is a keyword before creating > it? That's what breaks the reasonable expectation of mysql being able > to read its own dump files: you create a table with an indexed column > named 'version', and mysqldump renders that as 'KEY version(version)', > which bombs, instead of (eg) 'KEY (version)', which would be fine. I just tried it with mysqldump 3.23.41, and there is no problem there because mysqldump puts a space between version and (. If you do SHOW CREATE TABLE from a client, the output uses backticks like `version` which also prevents any probs. So, sneaky though it may be, it will actually work! ;-) You said you were using 3.23.32.... if you get different out there from described above, it has been fixed since. Okidoki? Regards, Arjen. -- MySQL Training Worldwide, http://www.mysql.com/training/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Mr. Arjen G. Lentz <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Technical Writer /_/ /_/\_, /___/\___\_\___/ Brisbane, QLD Australia <___/ www.mysql.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