summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.cc
diff options
context:
space:
mode:
authorunknown <timour/tkatchaounov@lamia.home>2006-07-21 13:04:40 +0300
committerunknown <timour/tkatchaounov@lamia.home>2006-07-21 13:04:40 +0300
commitf57bb34775c7482e15a6d067873730f9434726e8 (patch)
treeb9393caee4a9e94830f70cbcd75f0e00253508c0 /sql/item_strfunc.cc
parentf8dda7bfb928c0eaee550db57f5288e0575ea378 (diff)
parent4e59d30dc9ef76c79c8e8c92bfad9b394d4d5c9b (diff)
downloadmariadb-git-f57bb34775c7482e15a6d067873730f9434726e8.tar.gz
Merge tkatchaounov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into lamia.home:/home/tkatchaounov/autopush/5.0-bug-21007 client/mysql.cc: Auto merged mysql-test/r/date_formats.result: Auto merged mysql-test/r/func_str.result: Auto merged mysql-test/t/date_formats.test: Auto merged mysql-test/t/func_str.test: Auto merged sql/item_strfunc.cc: Auto merged sql/sql_class.cc: Auto merged sql/time.cc: Auto merged
Diffstat (limited to 'sql/item_strfunc.cc')
-rw-r--r--sql/item_strfunc.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index 58ddb331b2e..4fc7340a3b0 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -1041,7 +1041,7 @@ String *Item_func_left::val_str(String *str)
long length =(long) args[1]->val_int();
uint char_pos;
- if ((null_value=args[0]->null_value))
+ if ((null_value=(args[0]->null_value || args[1]->null_value)))
return 0;
if (length <= 0)
return &my_empty_string;
@@ -1081,7 +1081,7 @@ String *Item_func_right::val_str(String *str)
String *res =args[0]->val_str(str);
long length =(long) args[1]->val_int();
- if ((null_value=args[0]->null_value))
+ if ((null_value=(args[0]->null_value || args[1]->null_value)))
return 0; /* purecov: inspected */
if (length <= 0)
return &my_empty_string; /* purecov: inspected */