summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authormonty@tik.mysql.fi <>2002-04-22 10:34:46 +0300
committermonty@tik.mysql.fi <>2002-04-22 10:34:46 +0300
commit1016a08dc9b1ad075aaa2718707e14e3c5d9c0e2 (patch)
treeae6589609a463d0d9d61c642283bc90fe0ef99b4 /sql
parentf98bf0a06514fbdefa4f4fe9a8cd98aefb83f266 (diff)
downloadmariadb-git-1016a08dc9b1ad075aaa2718707e14e3c5d9c0e2.tar.gz
Fixed that IF is case insensitive if 2 and 3 arguments are case insensitive.
Added copyright messages to some files that was missing it.
Diffstat (limited to 'sql')
-rw-r--r--sql/item_cmpfunc.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 373aede7b6b..2b7f4cb6c40 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -490,8 +490,12 @@ Item_func_if::fix_length_and_dec()
decimals=max(args[1]->decimals,args[2]->decimals);
enum Item_result arg1_type=args[1]->result_type();
enum Item_result arg2_type=args[2]->result_type();
+ binary=1;
if (arg1_type == STRING_RESULT || arg2_type == STRING_RESULT)
+ {
cached_result_type = STRING_RESULT;
+ binary=args[1]->binary | args[2]->binary;
+ }
else if (arg1_type == REAL_RESULT || arg2_type == REAL_RESULT)
cached_result_type = REAL_RESULT;
else