summaryrefslogtreecommitdiff
path: root/sql/sql_udf.cc
diff options
context:
space:
mode:
authorgluh@eagle.(none) <>2007-11-14 17:30:16 +0400
committergluh@eagle.(none) <>2007-11-14 17:30:16 +0400
commit58336411c9d624f0e99cf95aa5db22ec70dd0c6c (patch)
tree4676d6947f9f56056b0b29957c90cba5cdad5eba /sql/sql_udf.cc
parent6223deb694946e5a2c3e46eaf4f2ce5624b5e78a (diff)
parent95e7cccfee7f1b1df3e455fb5e6bc10ef49c2a3a (diff)
downloadmariadb-git-58336411c9d624f0e99cf95aa5db22ec70dd0c6c.tar.gz
Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into mysql.com:/home/gluh/MySQL/Merge/5.1-opt
Diffstat (limited to 'sql/sql_udf.cc')
-rw-r--r--sql/sql_udf.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc
index 18511063117..30e8829d764 100644
--- a/sql/sql_udf.cc
+++ b/sql/sql_udf.cc
@@ -394,7 +394,12 @@ int mysql_create_function(THD *thd,udf_func *udf)
if (!initialized)
{
- my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0));
+ if (opt_noacl)
+ my_error(ER_CANT_INITIALIZE_UDF, MYF(0),
+ udf->name.str,
+ "UDFs are unavailable with the --skip-grant-tables option");
+ else
+ my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0));
DBUG_RETURN(1);
}
@@ -517,7 +522,10 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name)
if (!initialized)
{
- my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0));
+ if (opt_noacl)
+ my_error(ER_FUNCTION_NOT_DEFINED, MYF(0), udf_name->str);
+ else
+ my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0));
DBUG_RETURN(1);
}