diff options
author | unknown <gluh@gluh.mysql.r18.ru> | 2004-08-23 19:16:21 +0400 |
---|---|---|
committer | unknown <gluh@gluh.mysql.r18.ru> | 2004-08-23 19:16:21 +0400 |
commit | 1e86cd1ed1638096065cf3d44c31ae19af5c4086 (patch) | |
tree | ba90c4cb82bee0338a88efd5ba892b3cbe584448 /sql | |
parent | 9ecbafb5126cfedcd4f2f5751ed22df1ecb3560f (diff) | |
parent | 6d9046c6e7cbb691eb3a9e96003b9fcff6be7e28 (diff) | |
download | mariadb-git-1e86cd1ed1638096065cf3d44c31ae19af5c4086.tar.gz |
Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-4.0
into gluh.mysql.r18.ru:/home/gluh/MySQL-BUGS/mysql-4.0
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_select.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 882f345a1ca..cf5e8a75f85 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -3371,7 +3371,10 @@ change_cond_ref_to_const(I_List<COND_CMP> *save_list,Item *and_father, Item *right_item= func->arguments()[1]; Item_func::Functype functype= func->functype(); - if (right_item->eq(field,0) && left_item != value) + if (right_item->eq(field,0) && left_item != value && + (left_item->result_type() != STRING_RESULT || + value->result_type() != STRING_RESULT || + left_item->binary == value->binary)) { Item *tmp=value->new_item(); if (tmp) @@ -3390,7 +3393,10 @@ change_cond_ref_to_const(I_List<COND_CMP> *save_list,Item *and_father, func->arguments()[1]->result_type())); } } - else if (left_item->eq(field,0) && right_item != value) + else if (left_item->eq(field,0) && right_item != value && + (right_item->result_type() != STRING_RESULT || + value->result_type() != STRING_RESULT || + right_item->binary == value->binary)) { Item *tmp=value->new_item(); if (tmp) |