summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2002-04-18 18:24:15 +0300
committerunknown <monty@hundin.mysql.fi>2002-04-18 18:24:15 +0300
commitc104b350b2c4ca91ec5720f5e93c1c031b0de1a9 (patch)
treed14c726590a2973bc4f0ed881dd625a643617e47 /sql/item_func.cc
parent435d4f9762543cdede078b36df5ab0f0086c4af2 (diff)
parenta0ca35c1e59799324e95e001b77487f018d2028a (diff)
downloadmariadb-git-c104b350b2c4ca91ec5720f5e93c1c031b0de1a9.tar.gz
Merge work:/home/bk/mysql into hundin.mysql.fi:/my/bk/mysql
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 2e54aa56b4b..6579825690f 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -59,7 +59,7 @@ bool
Item_func::fix_fields(THD *thd,TABLE_LIST *tables)
{
Item **arg,**arg_end;
- char buff[sizeof(double)]; // Max argument in function
+ char buff[STACK_BUFF_ALLOC]; // Max argument in function
binary=0;
used_tables_cache=0;
const_item_cache=1;
@@ -1058,7 +1058,7 @@ bool
udf_handler::fix_fields(THD *thd,TABLE_LIST *tables,Item_result_field *func,
uint arg_count, Item **arguments)
{
- char buff[sizeof(double)]; // Max argument in function
+ char buff[STACK_BUFF_ALLOC]; // Max argument in function
DBUG_ENTER("Item_udf_func::fix_fields");
if (thd)
@@ -2161,9 +2161,12 @@ bool Item_func_match::eq(const Item *item, bool binary_cmp) const
Item *get_system_var(LEX_STRING name)
{
- if (!strcmp(name.str,"IDENTITY"))
+ if (!my_strcasecmp(name.str,"IDENTITY"))
return new Item_int((char*) "@@IDENTITY",
current_thd->insert_id(),21);
- my_error(ER_UNKNOWN_SYSTEM_VARIABLE,MYF(0),name);
+ if (!my_strcasecmp(name.str,"VERSION"))
+ return new Item_string("@@VERSION",server_version,
+ (uint) strlen(server_version));
+ net_printf(&current_thd->net, ER_UNKNOWN_SYSTEM_VARIABLE, name);
return 0;
}