Dear list,

I don't understand what happens here:

shell> mysql -N -e "SHOW VARIABLES LIKE 'version';" test
+---------+------------+
| version | 4.0.14-log |
+---------+------------+

shell> mysql -e "CREATE TABLE foo (sometext VARCHAR(255));" test
shell> mysql -e "INSERT INTO foo VALUES('Pitt\\'s Place');" test
shell> mysql -N -e "SELECT QUOTE(sometext) FROM foo;" test
+-----------------+
| 'Pitt\'s Place' |
+-----------------+

So far so good; exactly what I would expect. The string is nicely escaped
with ONE backslash. But now, look at this:

shell> mysql -N -B -e "SELECT QUOTE(sometext) FROM foo;" test
'Pitt\\'s Place'

Double backslash in batch mode. Same result if I pipe the query into
mysql. Why? This can't be fed into any INSERT query. Bug or feature?

Any comments from the list are very welcome.

Thomas Spahni


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

Reply via email to