diff options
author | Michael Widenius <monty@askmonty.org> | 2011-12-11 19:28:05 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-12-11 19:28:05 +0200 |
commit | 24e452a208adebedce6a8a418265fced66bfb027 (patch) | |
tree | 83bc0c6e237fbd9f9dcbd2ac79f03a3b86756239 /sql/item_func.cc | |
parent | 8a09adb3eaf036b652b11afea7d9d86a978fa566 (diff) | |
parent | 148587461954b544355bc808a89bfed1a70694e1 (diff) | |
download | mariadb-git-24e452a208adebedce6a8a418265fced66bfb027.tar.gz |
Merge with 5.1 & fixes to IGNORE handling
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r-- | sql/item_func.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc index ce43f90be8d..e5225de62f9 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -1,4 +1,5 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. +/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. + Copyright (c) 2008-2011 Monty Program Ab This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -11,8 +12,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** @file @@ -1161,7 +1161,7 @@ err: push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR, ER_WARN_DATA_OUT_OF_RANGE, ER(ER_WARN_DATA_OUT_OF_RANGE), - name, 1); + name, 1L); return dec; } @@ -2118,6 +2118,9 @@ void Item_func_round::fix_length_and_dec() } val1= args[1]->val_int(); + if ((null_value= args[1]->null_value)) + return; + val1_unsigned= args[1]->unsigned_flag; if (val1 < 0) decimals_to_set= val1_unsigned ? INT_MAX : 0; @@ -2974,7 +2977,7 @@ udf_handler::fix_fields(THD *thd, Item_result_field *func, if (!tmp_udf) { - my_error(ER_CANT_FIND_UDF, MYF(0), u_d->name.str, errno); + my_error(ER_CANT_FIND_UDF, MYF(0), u_d->name.str); DBUG_RETURN(TRUE); } u_d=tmp_udf; |