Hi,

Well, UNIQUE is a reserved word in all versions of MySQL...

As to why mysqldump would "create a dump file with a syntax error in
it," that's because *you* (or the application creator) used a reserved
word for a column/index name (bad idea) and mysqldump, by default, does
not put backticks around column/index names. Use the -Q or --quote-names
option with mysqldump if you want it to.

How was the reserved name allowed in the first place? Because it must
have had backticks around it -- probably from something stupid like
phpMyAdmin that always puts backticks around everything. :-(


Matt


----- Original Message -----
From: "Dathan Vance Pattishall"
Sent: Monday, October 27, 2003 4:02 PM
Subject: RE: DB not restoring from dump file


It dumps the contents of the db table in its original form. If you
upgrade to a new version-mysql will respect the old table format even if
some of the column / table / key names are reserved names in the new
mysql version. BUT if you try to add back to the mysql server a dump
table that has this reserve key / column / table name then it will see
it as an error.

Hope this makes sense.



- Dathan Vance Pattishall
- Sr. Programmer and mySQL DBA for FriendFinder Inc.
- http://friendfinder.com/go/p40688


-->-----Original Message-----
-->From: Chris W. Parker [mailto:[EMAIL PROTECTED]
-->Sent: Monday, October 27, 2003 1:32 PM
-->To: Dathan Vance Pattishall; [EMAIL PROTECTED]
-->Cc: [EMAIL PROTECTED]
-->Subject: RE: DB not restoring from dump file
-->
-->Dathan Vance Pattishall <mailto:[EMAIL PROTECTED]>
-->    on Monday, October 27, 2003 11:28 AM said:
-->
-->> Try changing the keyname unique to email.
-->>
-->>  UNIQUE KEY email (email)
-->
-->Thanks, this worked.
-->
-->I ended up having to change two more instances of the same error in
-->different tables.
-->
-->Why would the mysqldump command create a dump file with a syntax
error
-->in it?
-->
-->
-->
-->Chris.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to