Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8
-
None
-
None
Description
sql/log_event_client.cc (in older versions it is sql/log_event.cc)
The first test in the if/else block in the for loop looks for chars > 0x1f, but ' and \ are both > 0x1f, so the specialized output for them never gets used.
if (*s > 0x1F) |
my_b_write_byte(file, *s);
|
else if (*s == '\'') |
my_b_write(file, (uchar*)"\\'", 2); |
else if (*s == '\\') |
my_b_write(file, (uchar*)"\\\\", 2); |
Please consider changing to:
if (*s == '\'') |
my_b_write(file, (uchar*)"\\'", 2); |
else if (*s == '\\') |
my_b_write(file, (uchar*)"\\\\", 2); |
else if (isprint(*s)) |
my_b_write_byte(file, *s);
|
Using of isprint() function would also cover some special cases.