| Bug #9893 | Function QUOTE doesn't quote NewLine | ||
|---|---|---|---|
| Submitted: | 14 Apr 2005 9:34 | Modified: | 14 Apr 2005 15:39 |
| Reporter: | MySQL-Front Team | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server | Severity: | S3 (Non-critical) |
| Version: | 5.0.3-beta | OS: | Windows (Windows XP) |
| Assigned to: | Sergei Golubchik | CPU Architecture: | Any |
[14 Apr 2005 14:04]
Jorge del Conde
Verified w/5.0.4 from bk
[14 Apr 2005 15:39]
Sergei Golubchik
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.mysql.com/documentation/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php Additional info: According to http://dev.mysql.com/doc/mysql/en/string-functions.html Quotes a string to produce a result that can be used as a properly escaped data value in an SQL statement. The string is returned surrounded by single quotes and with each instance of single quote ('''), backslash ('\'), ASCII NUL, and Control-Z preceded by a backslash.

Description: The function QUOTE does NOT escape the NewLine (\n) sign. This problem occurs also with version 4.0.22. How to repeat: SELECT QUOTE('Hello\nWorld'); fails. SELECT QUOTE('Hello\rWorld'); fails. SELECT QUOTE('Don\'t!'); works fine.