diff options
author | unknown <kaa@polly.(none)> | 2007-11-09 13:41:50 +0300 |
---|---|---|
committer | unknown <kaa@polly.(none)> | 2007-11-09 13:41:50 +0300 |
commit | e68540a6b8222c4843f0caca94f7bc5de03e95ac (patch) | |
tree | 15aa89f126ff6b743cfa0cada76744b7fbd7f292 /sql/sql_udf.cc | |
parent | a5d7fa746fd6db971d465f5072b6cfec8f28e2fb (diff) | |
parent | 737cdfeaeb4efc8f0ddd366d77860334bec40df3 (diff) | |
download | mariadb-git-e68540a6b8222c4843f0caca94f7bc5de03e95ac.tar.gz |
Merge polly.(none):/home/kaa/src/opt/bug32020/my50-bug31445
into polly.(none):/home/kaa/src/opt/mysql-5.0-opt
sql/sql_udf.cc:
Auto merged
Diffstat (limited to 'sql/sql_udf.cc')
-rw-r--r-- | sql/sql_udf.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc index ce6cd43eace..34ca18d5c39 100644 --- a/sql/sql_udf.cc +++ b/sql/sql_udf.cc @@ -410,7 +410,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); } @@ -514,7 +519,10 @@ int mysql_drop_function(THD *thd,const LEX_STRING *udf_name) DBUG_ENTER("mysql_drop_function"); 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); } rw_wrlock(&THR_LOCK_udf); |