Commit ef026261 authored by Sergei Golubchik's avatar Sergei Golubchik

fixup MDEV-27277 Add a warning when max_sort_length is reached Step#1

fulltest2:

/home/buildbot/buildbot/build/mariadb-11.7.0/strings/ctype-mb.c: In function ‘my_strnxfrm_mb_internal’:
/home/buildbot/buildbot/build/mariadb-11.7.0/strings/ctype-mb.c:504:47: error: signed and unsigned type in conditional expression [-Werror=sign-compare]
       size_t len= (dst + chlen <= de) ? chlen : de - dst;

/home/buildbot/buildbot/build/mariadb-11.7.0/strings/ctype-utf8.c: In function ‘my_strnxfrm_unicode_full_bin’:
/home/buildbot/buildbot/build/mariadb-11.7.0/strings/ctype-utf8.c:318:20: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
     if ((de - dst) < nweights * 3)
parent 5d62dbc1
......@@ -491,7 +491,7 @@ my_strnxfrm_ret_t my_strnxfrm_mb_internal(CHARSET_INFO *cs,
*/
for (; src < se && *nweights && dst < de; (*nweights)--)
{
uint chlen;
int chlen;
if (*src < 128 || !(chlen= my_ismbchar(cs, (const char *) src,
(const char *) se)))
{
......
......@@ -315,7 +315,7 @@ my_strnxfrm_unicode_full_bin(CHARSET_INFO *cs,
if (flags & MY_STRXFRM_PAD_WITH_SPACE)
{
if ((de - dst) < nweights * 3)
if ((uint)(de - dst) < nweights * 3)
rc.m_warnings|= MY_STRNXFRM_TRUNCATED_WEIGHT_TRAILING_SPACE;
for ( ; dst < de && nweights; nweights--)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment