[MDEV-6520] Unexpected syntax error with VIEW + gbk + 0x5C Created: 2014-08-01 Updated: 2015-07-07 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.3.12, 5.5.38, 10.0.12 |
| Fix Version/s: | 10.1 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Fedora |
||
| Issue Links: |
|
||||||||
| Description |
|
1. Run a new gnome-terminal window. 3. Run this query to make sure it worked fine:
The expected output is:
If you get some different hex code, then something went wrong with the character set settings. Make sure to check previous steps. 4. Run this command:
It works fine and prints:
5. Now run a similar command but using a different string:
It fails with this error:
The same problem happens with any GBK character that has 0x5C as the second byte in a multi-byte character. It seems that this happens because String::append_for_single_quote() in sql_string.cc does not |