CREATE PROCEDURE and CREATE FUNCTION in
MySQL currently (as of 5.0.18) don't allow for an explicit
DEFINER= clause. This has dangerous implications for
any setup in which stored routines and replication are used
together.
The DEFINER of a stored routine currently is always
set to the CURRENT_USER at the time of the
CREATE statement, there is no possibility to
override this with an explicit setting. If you issue a
CREATE command as root on the MySQL
server, that's what you get:
mysql-master [root]> CREATE PROCEDURE test() DETERMINISTIC SELECT 'test';
Query OK, 0 rows affected (0.00 sec)
mysql-master [root]> SELECT * FROM information_schema.routines
WHERE ROUTINE_NAME='test'\G
*************************** 1. row ***************************
SPECIFIC_NAME: test
...
DEFINER: root@localhost
1 row in set …[Read more]