1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

BUG#36391: "mysqlbinlog creates invalid charset statements"

The fix for BUG#20103 "Escaping with backslash does not work as expected"
was implemented too greedy though in that it not only changes the behavior
of backslashes within strings but in general, so disabling command shortcuts
like \G or \C (which in turn leads to Bug #36391: "mysqlbinlog creates invalid charset
statements").
      
The fix allows the escaping with backslash to take place only inside a string, 
thus enabling the execution of command shortcuts and presevering the fix for
BUG#20103.
This commit is contained in:
Alfranio Correia
2009-01-27 20:49:37 +00:00
parent 7b92f9cf95
commit 7b6ff85e43
4 changed files with 48 additions and 1 deletions

View File

@ -2044,7 +2044,8 @@ static bool add_line(String &buffer,char *line,char *in_string,
}
#endif
if (!*ml_comment && inchar == '\\' &&
!(mysql.server_status & SERVER_STATUS_NO_BACKSLASH_ESCAPES))
!(*in_string &&
(mysql.server_status & SERVER_STATUS_NO_BACKSLASH_ESCAPES)))
{
// Found possbile one character command like \c