summaryrefslogtreecommitdiff
path: root/sql/lex_string.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-11-02 15:48:47 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-11-02 15:48:47 +0200
commitc7f322c91faf97a9f758c288b38e1385fd89b32d (patch)
treecf2a4cf562acffdf5b4b96d84e34f29c7f428458 /sql/lex_string.h
parentd5ce7824444b7491f420061076ae5087d4829428 (diff)
parent8036d0a3590dddf4d51ba02bc74ba3a5a96674f7 (diff)
downloadmariadb-git-c7f322c91faf97a9f758c288b38e1385fd89b32d.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'sql/lex_string.h')
-rw-r--r--sql/lex_string.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/lex_string.h b/sql/lex_string.h
index a5209165be0..ddda73b2200 100644
--- a/sql/lex_string.h
+++ b/sql/lex_string.h
@@ -34,8 +34,8 @@ static inline bool lex_string_cmp(CHARSET_INFO *charset, const LEX_CSTRING *a,
static inline bool cmp(const LEX_CSTRING *a, const LEX_CSTRING *b)
{
- return (a->length != b->length ||
- memcmp(a->str, b->str, a->length));
+ return a->length != b->length ||
+ (a->length && memcmp(a->str, b->str, a->length));
}
/*