[MDEV-27620] my_b_write_quoted() doesn't escape single quote and slash which breaks formatting Created: 2022-01-25 Updated: 2023-04-27 |
|
| Status: | Confirmed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8 |
| Fix Version/s: | 10.4, 10.5, 10.6 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Yury Chaikou | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | 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.
Please consider changing to:
Using of isprint() function would also cover some special cases. |
| Comments |
| Comment by Sergei Golubchik [ 2022-01-25 ] | ||||||||||||||
|
it's only used when printing comments with column values of row events. It's clearly against the original intention, but it's safe, doesn't break anything. One can even argue that it's better this way, more readable:
|