Bug #7724 Quote character \222 not quoted in EscapeString
Submitted: 7 Jan 2005 1:22 Modified: 12 Jan 2005 19:22
Reporter: James Moore Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / NET Severity:S3 (Non-critical)
Version:1.0.3 OS:Windows (Windows XP)
Assigned to: Reggie Burnett CPU Architecture:Any

[7 Jan 2005 1:22] James Moore
Description:
There's a single-quote character that doesn't get escaped in MySql.Data.Types.MySqlString.EscapeString.  Octal 222.

How to repeat:
Attempt to use an insert query with a parameter, and set the parameter value to include "’"

Suggested fix:
*** mysqlclient/Types/MySqlString.cs	4 Jan 2005 03:05:15 -0000	1.2
--- mysqlclient/Types/MySqlString.cs	7 Jan 2005 01:11:52 -0000
***************
*** 45,50 ****
--- 45,51 ----
  			s = s.Replace("\"", "\\\"");
  			s = s.Replace("`", "\\`");
  			s = s.Replace("´", "\\´");
+			s = s.Replace("’", "\\’");
  			return s;
  		}
[12 Jan 2005 19:22] Reggie Burnett
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html