Daniel Kasak wrote:

Hi all.

I'm testing out mysql-5.0.7. I dumped a database from 5.0.4 with the
command:
mysqldump --opt DB_NAME > DB_NAME.sql -p

Now I'm importing with:
mysql DB_NAME < DB_NAME.sql -p

The data has a field which has some quotes in it. The field looks like
this ( all quotes included ):
'' ''

ie 2x single quotes, a space, and 2x single quotes.
Don't ask me why. I didn't put it there. Anyway, mysqldump has packaged
this field as follows:
'\'\' \'\''

I'll put it into context inside an SQL statement:
insert into some_table ( some_field ) values ( '\'\' \'\'' );

When I mysql hits this line, I get:
ERROR at line 895: Unknown command '\''.

The line looks properly escaped to me. Should I file a bug report?

Mysql reports the first thing it didn't understand, which isn't necessarily the first thing wrong. I note that it thought \' was a command, which implies it didn't see the preceding ' as the *start* of a string, which implies something went wrong earlier in the line. Of course, it's impossible to guess what. Could you post the entire line, and perhaps a line or two before?

Michael

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

Reply via email to