mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Bug#9509 Optimizer: wrong result after AND with latin1_german2_ci
We cannot propagate constants with tricky collations.
This commit is contained in:
@ -6435,10 +6435,13 @@ static bool check_equality(Item *item, COND_EQUAL *cond_equal)
|
||||
{
|
||||
bool copyfl;
|
||||
|
||||
if (field_item->result_type() == STRING_RESULT &&
|
||||
((Field_str *) field_item->field)->charset() !=
|
||||
((Item_cond *) item)->compare_collation())
|
||||
return FALSE;
|
||||
if (field_item->result_type() == STRING_RESULT)
|
||||
{
|
||||
CHARSET_INFO *cs= ((Field_str*) field_item->field)->charset();
|
||||
if ((cs != ((Item_cond *) item)->compare_collation()) ||
|
||||
!cs->coll->propagate(cs, 0, 0))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Item_equal *item_equal = find_item_equal(cond_equal,
|
||||
field_item->field, ©fl);
|
||||
|
Reference in New Issue
Block a user