diff options
author | Alexander Barkov <bar@mariadb.com> | 2021-09-29 15:13:57 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2022-01-21 12:16:07 +0400 |
commit | b915f79e4e004fde4f6ac8f341afee980e11792b (patch) | |
tree | 2568032d75c7af9a72c6669b306fda4418b5ed20 /strings/ctype-simple.c | |
parent | db574173d19731f1e5dc75d325f72398afac8d59 (diff) | |
download | mariadb-git-b915f79e4e004fde4f6ac8f341afee980e11792b.tar.gz |
MDEV-25904 New collation functions to compare InnoDB style trimmed NO PAD stringsbb-10.4-bar-MDEV-25904
Diffstat (limited to 'strings/ctype-simple.c')
-rw-r--r-- | strings/ctype-simple.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c index 9c6cb34137d..d150e457673 100644 --- a/strings/ctype-simple.c +++ b/strings/ctype-simple.c @@ -208,6 +208,18 @@ int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, size_t a_length, } +static int +my_strnncollsp_nchars_simple(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_simple(cs, a, a_length, b, b_length); +} + + int my_strnncollsp_simple_nopad(CHARSET_INFO * cs, const uchar *a, size_t a_length, const uchar *b, size_t b_length) @@ -2096,6 +2108,7 @@ MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler = my_coll_init_simple, /* init */ my_strnncoll_simple, my_strnncollsp_simple, + my_strnncollsp_nchars_simple, my_strnxfrm_simple, my_strnxfrmlen_simple, my_like_range_simple, @@ -2112,6 +2125,7 @@ MY_COLLATION_HANDLER my_collation_8bit_simple_nopad_ci_handler = my_coll_init_simple, /* init */ my_strnncoll_simple, my_strnncollsp_simple_nopad, + my_strnncollsp_nchars_simple, my_strnxfrm_simple_nopad, my_strnxfrmlen_simple, my_like_range_simple, |