diff options
author | Alexander Barkov <bar@mariadb.com> | 2020-05-07 19:20:17 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2020-05-09 16:01:30 +0400 |
commit | cfe5ee90c8e4b9dfa98a41fcd299197a59261be7 (patch) | |
tree | 35fdaabac55d4b36d228bc9600112e986850b162 /mysql-test/main/ctype_swe7.test | |
parent | c675886dcdecd29571bd08605a409325ee81004c (diff) | |
download | mariadb-git-cfe5ee90c8e4b9dfa98a41fcd299197a59261be7.tar.gz |
MDEV-22043 Special character leads to assertion in my_wc_to_printable_generic on 10.5.2 (debug)
The code did not take into account that:
- U+005C (backslash) can occupy more than mbminlen characters (e.g. in sjis)
- Some character sets do not have a code for U+005C (e.g. swe7)
Adding a new function my_wc_to_printable into MY_CHARSET_HANDLER to
cover all special cases easier.
Diffstat (limited to 'mysql-test/main/ctype_swe7.test')
-rw-r--r-- | mysql-test/main/ctype_swe7.test | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/main/ctype_swe7.test b/mysql-test/main/ctype_swe7.test index 2e648a89406..a8d79935aa6 100644 --- a/mysql-test/main/ctype_swe7.test +++ b/mysql-test/main/ctype_swe7.test @@ -38,3 +38,29 @@ let $coll_pad='swe7_bin'; --echo # --echo # End of 10.2 tests --echo # + + +--echo # +--echo # Start of 10.5 tests +--echo # + +--echo # +--echo # MDEV-22043 Special character leads to assertion in my_wc_to_printable_generic on 10.5.2 (debug) +--echo # + +SET NAMES swe7; +--error ER_INVALID_CHARACTER_STRING +SELECT `T`; + +SET NAMES swe7; +--error ER_INVALID_CHARACTER_STRING +SELECT `龔`; + +SET NAMES swe7; +--error ER_PARSE_ERROR +EXECUTE IMMEDIATE _swe7 0x01; + + +--echo # +--echo # End of 10.5 tests +--echo # |