[MDEV-11216] Error 1300 outputs only valid part of string in the message Created: 2016-11-02 Updated: 2023-01-22 Resolved: 2023-01-22 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Character Sets |
| Affects Version/s: | 10.0.28, 10.0.29 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Valerii Kravchuk | Assignee: | Alexander Barkov |
| Resolution: | Cannot Reproduce | Votes: | 1 |
| Labels: | None | ||
| Description |
|
Whenever we try to insert invalid utf8 character (in INSERT or, after the fix to https://jira.mariadb.org/browse/MDEV-9823, in LOAD DATA as well) we get ERROR 1300 with the text that pretends to show the problematic string, but shows only the valid part of it, like this:
I think Warning 1366 does a better job in showing the problematic string in hex, like this:
Current approach leads to meaningless empty strings mentioned in error messages on slaves when the very first character is a problem, see https://bugs.mysql.com/bug.php?id=82641 for example:
To summarize, when there is a string that is not valid for a charset, it makes sense to output it in hex instead of/along with character representation of the valid part. |
| Comments |
| Comment by Elena Stepanova [ 2023-01-22 ] |
|
Can you provide a test case? I'm only getting 1366. |