Skip to content

Commit f96c56c

Browse files
committed
Added test case.
1 parent 5860c36 commit f96c56c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

sql/vers_string.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ struct Lex_cstring_with_compare : public Lex_cstring
6363
{ }
6464
bool streq(const Lex_cstring_with_compare& b) const
6565
{
66+
if (length != b.length)
67+
return false;
6668
if (str == NULL || b.str == NULL)
67-
return str == b.str && length == b.length;
68-
69-
return length == b.length &&
70-
0 == Compare()(*this, b);
69+
return str == b.str;
70+
return length == 0 || 0 == Compare()(*this, b);
7171
}
7272
operator const char* () const
7373
{

0 commit comments

Comments
 (0)