summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2010-03-20 15:01:47 +0300
committerSergey Petrunya <psergey@askmonty.org>2010-03-20 15:01:47 +0300
commit7df026676b6d845cc0ed7a7437995c3019a5f42d (patch)
treedc051ac4712ac159b52fc2b48e5dd918cbc39799 /sql/item_func.cc
parentf59d1dcf0acc12c482c28c902a0030f12ba263af (diff)
parentf09ca00e088b316441bb76e97ba097bc9f3da7d3 (diff)
downloadmariadb-git-7df026676b6d845cc0ed7a7437995c3019a5f42d.tar.gz
Merge MariaDB-5.2 -> MariaDB 5.3
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc23
1 files changed, 4 insertions, 19 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index a56944122db..0676ce4f633 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -460,8 +460,7 @@ bool Item_func::eq(const Item *item, bool binary_cmp) const
Field *Item_func::tmp_table_field(TABLE *table)
{
- Field *field;
- LINT_INIT(field);
+ Field *field= NULL;
switch (result_type()) {
case INT_RESULT:
@@ -476,7 +475,7 @@ Field *Item_func::tmp_table_field(TABLE *table)
case STRING_RESULT:
return make_string_field(table);
case DECIMAL_RESULT:
- field= Field_new_decimal::new_decimal_field(this);
+ field= Field_new_decimal::create_from_item(this);
break;
case ROW_RESULT:
default:
@@ -631,7 +630,7 @@ void Item_func::signal_divide_by_null()
Item *Item_func::get_tmp_table_item(THD *thd)
{
- if (!with_sum_func && !const_item() && functype() != SUSERVAR_FUNC)
+ if (!with_sum_func && !const_item())
return new Item_field(result_field);
return copy_or_same(thd);
}
@@ -4284,9 +4283,8 @@ void Item_func_set_user_var::save_item_result(Item *item)
bool
Item_func_set_user_var::update()
{
- bool res;
+ bool res= 0;
DBUG_ENTER("Item_func_set_user_var::update");
- LINT_INIT(res);
switch (cached_result_type) {
case REAL_RESULT:
@@ -4789,19 +4787,6 @@ void Item_func_get_user_var::fix_length_and_dec()
}
-uint Item_func_get_user_var::decimal_precision() const
-{
- uint precision= max_length;
- Item_result restype= result_type();
-
- /* Default to maximum as the precision is unknown a priori. */
- if ((restype == DECIMAL_RESULT) || (restype == INT_RESULT))
- precision= DECIMAL_MAX_PRECISION;
-
- return precision;
-}
-
-
bool Item_func_get_user_var::const_item() const
{
return (!var_entry || current_thd->query_id != var_entry->update_query_id);