summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mnogosearch.org>2014-04-28 15:56:31 +0400
committerAlexander Barkov <bar@mnogosearch.org>2014-04-28 15:56:31 +0400
commit1081e403c6ebc551b5a0242e452ccb995b262432 (patch)
treebc75a8c4a841e644f877dc38b7d07cae09290214 /sql/item_cmpfunc.cc
parent968f4d4e2573fc409d5a17103269cfdcef7c2878 (diff)
downloadmariadb-git-1081e403c6ebc551b5a0242e452ccb995b262432.tar.gz
MDEV-5702 Incorrect results are returned with NULLIF()
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index fa67b3e6afd..fa14f7bdcf1 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -2723,13 +2723,13 @@ Item_func_nullif::fix_length_and_dec()
maybe_null=1;
if (args[0]) // Only false if EOM
{
- max_length=args[0]->max_length;
decimals=args[0]->decimals;
unsigned_flag= args[0]->unsigned_flag;
cached_result_type= args[0]->result_type();
if (cached_result_type == STRING_RESULT &&
agg_arg_charsets_for_comparison(collation, args, arg_count))
return;
+ fix_char_length(args[0]->max_char_length());
}
}