-
unknown authored
The problem was that the grammar allows to create a function with an optional definer clause, and define it as a UDF with the SONAME keyword. Such combination should be reported as an error. The solution is to not change the grammar itself, and to introduce a specific check in the yacc actions in 'create_function_tail' for UDF, that now reports ER_WRONG_USAGE when using both DEFINER and SONAME. mysql-test/r/udf.result: Added tests for Bug#21269 (DEFINER-clause is allowed for UDF-functions) mysql-test/t/udf.test: Added tests for Bug#21269 (DEFINER-clause is allowed for UDF-functions) sql/sql_yacc.yy: Creating a UDF function with a DEFINER clause is now a syntax error.
d251e9be