Bug #21269 DEFINER-clause is allowed for UDF-functions
| Submitted: | 25 Jul 2006 10:07 | Modified: | 30 Aug 2006 19:24 |
|---|---|---|---|
| Reporter: | Alexander Nozdrin | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: User-defined functions ( UDF ) | Severity: | S3 (Non-critical) |
| Version: | 5.0.24/5.0BK/5.1BK | OS: | Linux (Linux) |
| Assigned to: | Marc ALFF | CPU Architecture: | Any |
[25 Jul 2006 10:07]
Alexander Nozdrin
[26 Jul 2006 13:35]
MySQL Verification Team
Thank you for the bug report.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.25-debug
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> CREATE DEFINER=CURRENT_USER() FUNCTION metaphon RETURNS STRING SONAME
-> 'udf_example.so';
Query OK, 0 rows affected (0.02 sec)
[29 Jul 2006 3:47]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/9751 ChangeSet@1.2243, 2006-07-28 21:46:58-07:00, malff@weblab.(none) +3 -0 Bug#21269 (DEFINER-clause is allowed for UDF-functions) 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.
[31 Jul 2006 18:26]
Marc ALFF
Modified the test cases as per code review comments.
[31 Jul 2006 21:46]
Konstantin Osipov
Approved by email.
[2 Aug 2006 15:58]
Konstantin Osipov
Pushed into 5.0.25
[14 Aug 2006 20:50]
Konstantin Osipov
Merged into 5.1.12
[30 Aug 2006 19:24]
Paul DuBois
Noted in 5.0.25, 5.1.12 changelogs. For user-defined functions created with CREATE FUNCTION, the DEFINER clause is not legal, but no error was generated.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.057 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.