diff options
author | Alexander Barkov <bar@mariadb.com> | 2022-11-22 14:03:23 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2022-11-22 14:03:23 +0400 |
commit | 931549ff6685f370f6b2fc356769dcab97f0c6e4 (patch) | |
tree | 810d9618bb1aaac327fcc815c5686322c24aa57d /strings | |
parent | 3e0fd5e8a72ec8c6d48153113fb2987c2b456d17 (diff) | |
download | mariadb-git-931549ff6685f370f6b2fc356769dcab97f0c6e4.tar.gz |
MDEV-27670 Assertion `(cs->state & 0x20000) == 0' failed in my_strnncollsp_nchars_generic_8bit
Also fixes:
MDEV-27768 MDEV-25440: Assertion `(cs->state & 0x20000) == 0' failed in my_strnncollsp_nchars_generic_8bit
The "strnncollsp_nchars" virtual function pointer for tis620_thai_nopad_ci
was incorrectly initialized to a generic function
my_strnncollsp_nchars_generic_8bit(), which crashed on assert.
Implementing a tis620 specific function version.
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-tis620.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c index d5367393c86..b19832cc792 100644 --- a/strings/ctype-tis620.c +++ b/strings/ctype-tis620.c @@ -585,6 +585,18 @@ ret: } +static int +my_strnncollsp_nchars_tis620(CHARSET_INFO * cs, + const uchar *a, size_t a_length, + const uchar *b, size_t b_length, + size_t nchars) +{ + set_if_smaller(a_length, nchars); + set_if_smaller(b_length, nchars); + return my_strnncollsp_tis620(cs, a, a_length, b, b_length); +} + + static int my_strnncollsp_tis620_nopad(CHARSET_INFO * cs __attribute__((unused)), const uchar *a0, size_t a_length, @@ -852,7 +864,7 @@ static MY_COLLATION_HANDLER my_collation_ci_handler = NULL, /* init */ my_strnncoll_tis620, my_strnncollsp_tis620, - my_strnncollsp_nchars_generic_8bit, + my_strnncollsp_nchars_tis620, my_strnxfrm_tis620, my_strnxfrmlen_simple, my_like_range_simple, @@ -868,7 +880,7 @@ static MY_COLLATION_HANDLER my_collation_nopad_ci_handler = NULL, /* init */ my_strnncoll_tis620, my_strnncollsp_tis620_nopad, - my_strnncollsp_nchars_generic_8bit, + my_strnncollsp_nchars_tis620, my_strnxfrm_tis620_nopad, my_strnxfrmlen_simple, my_like_range_simple, |