summaryrefslogtreecommitdiff
path: root/sql/lex_string.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/lex_string.h')
-rw-r--r--sql/lex_string.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/lex_string.h b/sql/lex_string.h
index 008e5f75812..4fa92dc3565 100644
--- a/sql/lex_string.h
+++ b/sql/lex_string.h
@@ -81,7 +81,7 @@ static inline bool cmp(const LEX_CSTRING *a, const LEX_CSTRING *b)
}
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));
}
/*