summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authormalff/marcsql@weblab.(none) <>2006-07-31 12:11:08 -0700
committermalff/marcsql@weblab.(none) <>2006-07-31 12:11:08 -0700
commit2336834e08c98fcc3132b831054883fe01bb13cb (patch)
tree9cb7bf50baf1156807804a1bd1cca8d46063bacb /sql
parentc867301b0d1ae4062cebfd1ef5c27b1afb1ba6a1 (diff)
parentab86e0b3cba9366bd2df3f35ef3cfc1651cd9217 (diff)
downloadmariadb-git-2336834e08c98fcc3132b831054883fe01bb13cb.tar.gz
Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into weblab.(none):/home/marcsql/TREE/mysql-5.0-21269
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_yacc.yy11
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index a92d19ee58d..d497678cec3 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -1256,6 +1256,17 @@ create_function_tail:
RETURNS_SYM udf_type UDF_SONAME_SYM TEXT_STRING_sys
{
LEX *lex=Lex;
+ if (lex->definer != NULL)
+ {
+ /*
+ DEFINER is a concept meaningful when interpreting SQL code.
+ UDF functions are compiled.
+ Using DEFINER with UDF has therefore no semantic,
+ and is considered a parsing error.
+ */
+ my_error(ER_WRONG_USAGE, MYF(0), "SONAME", "DEFINER");
+ YYABORT;
+ }
lex->sql_command = SQLCOM_CREATE_FUNCTION;
lex->udf.name = lex->spname->m_name;
lex->udf.returns=(Item_result) $2;