summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorunknown <gkodinov@dl145s.mysql.com>2006-11-29 11:48:44 +0100
committerunknown <gkodinov@dl145s.mysql.com>2006-11-29 11:48:44 +0100
commit3e0d5bc27aa88da7539d996efc3a15636d5c4bda (patch)
tree705a3f2438bde34c000204acb02832c960c8b9bc /sql/item.cc
parenta73e04bb8e423bba34e4ecafa68b40bb4c28512b (diff)
parent6c0ff6c236ce096061f3db181e1469917781731d (diff)
downloadmariadb-git-3e0d5bc27aa88da7539d996efc3a15636d5c4bda.tar.gz
Merge dl145s.mysql.com:/data0/bk/team_tree_merge/mysql-5.0-opt
into dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE2/mysql-5.1-opt mysql-test/r/func_gconcat.result: Auto merged mysql-test/r/func_group.result: Auto merged mysql-test/r/group_min_max.result: Auto merged mysql-test/r/type_varchar.result: Auto merged mysql-test/t/group_min_max.test: Auto merged mysql-test/t/type_varchar.test: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_func.h: Auto merged sql/item_subselect.h: Auto merged sql/item_sum.cc: Auto merged sql/item_sum.h: Auto merged sql/opt_range.cc: Auto merged sql/sql_string.h: Auto merged sql/field.cc: SCCS merged
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc24
1 files changed, 17 insertions, 7 deletions
diff --git a/sql/item.cc b/sql/item.cc
index e15672e4d45..e96111708eb 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -2208,12 +2208,6 @@ void Item_string::print(String *str)
}
-inline bool check_if_only_end_space(CHARSET_INFO *cs, char *str, char *end)
-{
- return str+ cs->cset->scan(cs, str, end, MY_SEQ_SPACES) == end;
-}
-
-
double Item_string::val_real()
{
DBUG_ASSERT(fixed == 1);
@@ -4850,6 +4844,22 @@ bool Item_field::send(Protocol *protocol, String *buffer)
}
+void Item_field::update_null_value()
+{
+ /*
+ need to set no_errors to prevent warnings about type conversion
+ popping up.
+ */
+ THD *thd= field->table->in_use;
+ int no_errors;
+
+ no_errors= thd->no_errors;
+ thd->no_errors= 1;
+ Item::update_null_value();
+ thd->no_errors= no_errors;
+}
+
+
Item_ref::Item_ref(Name_resolution_context *context_arg,
Item **item, const char *table_name_arg,
const char *field_name_arg)
@@ -6208,7 +6218,7 @@ bool Item_cache_row::null_inside()
}
else
{
- values[i]->val_int();
+ values[i]->update_null_value();
if (values[i]->null_value)
return 1;
}