summaryrefslogtreecommitdiff
path: root/sql/sql_udf.cc
diff options
context:
space:
mode:
authorunknown <gluh@eagle.(none)>2007-11-14 17:30:16 +0400
committerunknown <gluh@eagle.(none)>2007-11-14 17:30:16 +0400
commit711cf7503dcb4bf5290a0d71c83dc6ff9fd3b4fe (patch)
tree4676d6947f9f56056b0b29957c90cba5cdad5eba /sql/sql_udf.cc
parentb3a71e34487b69846553111448fa2b32c86176a9 (diff)
parentc670190e8606f84a71f347184b2cf3df2fa9b925 (diff)
downloadmariadb-git-711cf7503dcb4bf5290a0d71c83dc6ff9fd3b4fe.tar.gz
Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into mysql.com:/home/gluh/MySQL/Merge/5.1-opt BitKeeper/etc/ignore: auto-union mysql-test/r/events_bugs.result: Auto merged mysql-test/r/partition.result: Auto merged mysql-test/r/ps_2myisam.result: Auto merged mysql-test/r/ps_3innodb.result: Auto merged mysql-test/r/ps_4heap.result: Auto merged mysql-test/r/ps_5merge.result: Auto merged mysql-test/r/sp.result: Auto merged mysql-test/t/partition.test: Auto merged mysql-test/t/subselect.test: Auto merged mysql-test/t/variables.test: Auto merged sql/field.cc: Auto merged sql/ha_partition.cc: Auto merged sql/item.cc: Auto merged sql/item_func.cc: Auto merged sql/item_subselect.cc: Auto merged sql/item_timefunc.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/opt_range.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_partition.cc: Auto merged sql/sql_plugin.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_udf.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/share/errmsg.txt: Auto merged tests/mysql_client_test.c: Auto merged mysql-test/r/select.result: manual merge mysql-test/t/select.test: manual merge
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);
}