summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorSergey Glukhov <sergey.glukhov@oracle.com>2011-05-26 14:09:25 +0400
committerSergey Glukhov <sergey.glukhov@oracle.com>2011-05-26 14:09:25 +0400
commit9d42d36e7e54c2a8a62fc11e094a845a5a5c332b (patch)
treeca30427efcd036da385b9a8da3d1754596eb1cc6 /sql/item_func.cc
parentb5009ee6bef7c074ff067ef2aab5f63f00a7ee54 (diff)
parent3efbf30457d76a3e47371f6d4bd4b2ebd7141ffd (diff)
downloadmariadb-git-9d42d36e7e54c2a8a62fc11e094a845a5a5c332b.tar.gz
5.1 -> 5.5 merge
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index d0def6abccb..754eae6d55b 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -2259,6 +2259,9 @@ void Item_func_round::fix_length_and_dec()
}
val1= args[1]->val_int();
+ if ((null_value= args[1]->is_null()))
+ return;
+
val1_unsigned= args[1]->unsigned_flag;
if (val1 < 0)
decimals_to_set= val1_unsigned ? INT_MAX : 0;