summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authormonty@mysql.com <>2004-12-07 15:47:00 +0200
committermonty@mysql.com <>2004-12-07 15:47:00 +0200
commit563500994a31c2239a7d87ba9c5ea889493e3596 (patch)
treeb1c918186908fb490aa860c35dc9e2154aa633c8 /sql/item_func.cc
parent77207d19f20f21c54b8d5279c6924f4c4bdaaa51 (diff)
downloadmariadb-git-563500994a31c2239a7d87ba9c5ea889493e3596.tar.gz
Update results for new varchar handling
Fixed compiler warnings String results in CREATE ... SELECT are now created as CHAR(0), VARCHAR(X) or TEXT() depending on item->max_length
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 8fefb355efe..aba53b9b397 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -481,6 +481,7 @@ bool Item_func::eq(const Item *item, bool binary_cmp) const
return 1;
}
+
Field *Item_func::tmp_table_field(TABLE *t_arg)
{
Field *res;
@@ -499,10 +500,7 @@ Field *Item_func::tmp_table_field(TABLE *t_arg)
res= new Field_double(max_length, maybe_null, name, t_arg, decimals);
break;
case STRING_RESULT:
- if (max_length > 255)
- res= new Field_blob(max_length, maybe_null, name, t_arg, collation.collation);
- else
- res= new Field_string(max_length, maybe_null, name, t_arg, collation.collation);
+ res= make_string_field(t_arg);
break;
case ROW_RESULT:
default:
@@ -3565,6 +3563,7 @@ Item_func_sp::execute(Item **itp)
DBUG_RETURN(res);
}
+
enum enum_field_types
Item_func_sp::field_type() const
{
@@ -3578,9 +3577,10 @@ Item_func_sp::field_type() const
DBUG_RETURN(m_sp->m_returns);
}
my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "FUNCTION", m_name->m_qname.str);
- DBUG_RETURN(MYSQL_TYPE_STRING);
+ DBUG_RETURN(MYSQL_TYPE_VARCHAR);
}
+
Item_result
Item_func_sp::result_type() const
{