1
0
mirror of https://github.com/MariaDB/server.git synced 2025-06-12 01:53:02 +03:00

Make status of NO_BACKSLASH_ESCAPES mode known to the client so

it can use it to switch to only quoting apostrophes by doubling
them when it is in effect. (Bug #10214)
This commit is contained in:
jimw@mysql.com
2005-06-23 18:29:56 -07:00
parent 539d63d09a
commit 3ccb90c085
7 changed files with 117 additions and 1 deletions

View File

@ -1616,7 +1616,14 @@ ulong STDCALL
mysql_real_escape_string(MYSQL *mysql, char *to,const char *from,
ulong length)
{
return escape_string_for_mysql(mysql->charset, to, 0, from, length);
if (mysql->server_status & SERVER_STATUS_NO_BACKSLASH_ESCAPES)
{
return escape_quotes_for_mysql(mysql->charset, to, 0, from, length);
}
else
{
return escape_string_for_mysql(mysql->charset, to, 0, from, length);
}
}