diff options
author | Sujatha <sujatha.sivakumar@mariadb.com> | 2020-09-29 16:59:36 +0530 |
---|---|---|
committer | Sujatha <sujatha.sivakumar@mariadb.com> | 2020-09-29 16:59:36 +0530 |
commit | 25ede13611b3c1f736be22fc581a0c371d212f61 (patch) | |
tree | 0a930e742c1f80786b573067bfed9014c8c54ce8 /sql/sql_string.cc | |
parent | 080522dcd7177a0008824802cd58a36ee8048d8f (diff) | |
parent | 79e32e47a11150839ac4ab44ac02d4019c0e0019 (diff) | |
download | mariadb-git-25ede13611b3c1f736be22fc581a0c371d212f61.tar.gz |
Merge branch '10.4' into 10.5
Diffstat (limited to 'sql/sql_string.cc')
-rw-r--r-- | sql/sql_string.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_string.cc b/sql/sql_string.cc index e2defba434d..0e62b5b9c2e 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -858,7 +858,7 @@ int sortcmp(const String *s,const String *t, CHARSET_INFO *cs) int stringcmp(const String *s,const String *t) { uint32 s_len=s->length(),t_len=t->length(),len=MY_MIN(s_len,t_len); - int cmp= memcmp(s->ptr(), t->ptr(), len); + int cmp= len ? memcmp(s->ptr(), t->ptr(), len) : 0; return (cmp) ? cmp : (int) (s_len - t_len); } |