1
0
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:
bar@noter.(none)
2005-05-05 21:13:57 +05:00
parent 6b053194db
commit 153b928c10
22 changed files with 115 additions and 17 deletions

View File

@ -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, &copyfl);