mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-6679 Different optimizer plan for "a BETWEEN 'string' AND ?" and "a BETWEEN ? AND 'string'"
Item_string::eq() and Item_param::eq() in string context behaved differently. Introducing a new class Item_basic_value to share the eq() code between literals (Item_int, Item_double, Item_string, Item_null) and Item_param.
This commit is contained in:
@ -540,6 +540,15 @@ public:
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
bool bin_eq(const String *other) const
|
||||
{
|
||||
return length() == other->length() &&
|
||||
!memcmp(ptr(), other->ptr(), length());
|
||||
}
|
||||
bool eq(const String *other, CHARSET_INFO *cs) const
|
||||
{
|
||||
return !sortcmp(this, other, cs);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user