summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2010-08-27 17:12:44 +0300
committerMichael Widenius <monty@askmonty.org>2010-08-27 17:12:44 +0300
commitad6d95d3cb420557cfc7efa658181a8d20b4c154 (patch)
tree984bb45ca187a6cc38c7132a9600d91515df564e /sql/item.cc
parent9bc9855c16f815e71223398ef17cd6052becc44e (diff)
parent7909541953de43c7b7d16513c8d612cfe405af67 (diff)
downloadmariadb-git-ad6d95d3cb420557cfc7efa658181a8d20b4c154.tar.gz
Merge with MySQL 5.1.50
- Changed to still use bcmp() in certain cases becasue - Faster for short unaligneed strings than memcmp() - Bettern when using valgrind - Changed to use my_sprintf() instead of sprintf() to get higher portability for old systems - Changed code to use MariaDB version of select->skip_record() - Removed -%::SCCS/s.% from Makefile.am:s to remove automake warnings
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/item.cc b/sql/item.cc
index c2ab2a9046f..ecd208b838d 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -255,8 +255,9 @@ my_decimal *Item::val_decimal_from_int(my_decimal *decimal_value)
my_decimal *Item::val_decimal_from_string(my_decimal *decimal_value)
{
String *res;
+
if (!(res= val_str(&str_value)))
- return 0; // NULL or EOM
+ return 0;
if (str2my_decimal(E_DEC_FATAL_ERROR & ~E_DEC_BAD_NUM,
res->ptr(), res->length(), res->charset(),
@@ -4139,8 +4140,7 @@ Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference)
context->first_name_resolution_table,
context->last_name_resolution_table,
reference, REPORT_ALL_ERRORS,
- !any_privileges &&
- TRUE, TRUE);
+ !any_privileges, TRUE);
}
return -1;
}