Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d57c41b7
Commit
d57c41b7
authored
Jul 31, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into weblab.(none):/home/marcsql/TREE/mysql-5.0-21269
parents
918f9a38
d251e9be
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
0 deletions
+29
-0
mysql-test/r/udf.result
mysql-test/r/udf.result
+6
-0
mysql-test/t/udf.test
mysql-test/t/udf.test
+12
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+11
-0
No files found.
mysql-test/r/udf.result
View file @
d57c41b7
...
...
@@ -93,6 +93,12 @@ NULL
0R
FR
DROP TABLE bug19904;
CREATE DEFINER=CURRENT_USER() FUNCTION should_not_parse
RETURNS STRING SONAME "should_not_parse.so";
ERROR HY000: Incorrect usage of SONAME and DEFINER
CREATE DEFINER=someone@somewhere FUNCTION should_not_parse
RETURNS STRING SONAME "should_not_parse.so";
ERROR HY000: Incorrect usage of SONAME and DEFINER
End of 5.0 tests.
DROP FUNCTION metaphon;
DROP FUNCTION myfunc_double;
...
...
mysql-test/t/udf.test
View file @
d57c41b7
...
...
@@ -109,6 +109,18 @@ SELECT myfunc_double(n) AS f FROM bug19904;
SELECT
metaphon
(
v
)
AS
f
FROM
bug19904
;
DROP
TABLE
bug19904
;
#
# Bug#21269: DEFINER-clause is allowed for UDF-functions
#
--
error
ER_WRONG_USAGE
CREATE
DEFINER
=
CURRENT_USER
()
FUNCTION
should_not_parse
RETURNS
STRING
SONAME
"should_not_parse.so"
;
--
error
ER_WRONG_USAGE
CREATE
DEFINER
=
someone
@
somewhere
FUNCTION
should_not_parse
RETURNS
STRING
SONAME
"should_not_parse.so"
;
--
echo
End
of
5.0
tests
.
#
...
...
sql/sql_yacc.yy
View file @
d57c41b7
...
...
@@ -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;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment