Bug #5753 On string literals, escape sequence \z doesn't always work.
Submitted: 26 Sep 2004 18:14 Modified: 3 Oct 2004 1:29
Reporter: Miguel Ramos Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0.20 OS:UNIX
Assigned to: Documentation Team CPU Architecture:Any

[26 Sep 2004 18:14] Miguel Ramos
Description:
The escape sequence \z seems not to work, at least not when inserting binary data into a BLOB column, at least on MySQL version 4.0.20. Perhaps it's better to avoid it and use only the absolutely necessary escaping for ', " and \.

How to repeat:
Assuming you have a table called A with a BLOB column called B, use the 
following statement: 
 
INSERT INTO A SET B='a\\b\"c\'d\0e\rf\ng\zh\ti\bj'; 
 
Examining the data inserted it will be visible that z was inserted for the 
escape sequence \z. 

Suggested fix:
Avoid \z (unfortunate on Windows...)
[1 Oct 2004 22:06] Hartmut Holzgraefe
It is \Z not \z   (see get_text() in sql/sql_lex.cc)
whereas the table in Language Structure -> Strings shows a lowercase 'z'
[3 Oct 2004 1:29] Paul DuBois
Thank you for your bug report. This issue has been addressed in the
documentation. The updated documentation will appear on our website
shortly, and will be included in the next release of the relevant
product(s).
[3 Oct 2004 1:30] Paul DuBois
Manual has been updated to indicate that the escape
sequence is \Z and not \z.