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:
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user