Description:
Using SQLyog enterprise 5.19 or MySQL Query browser 1.2.3 beta, ALTER PROCEDURE doesnt work as described in manual.
ALTER {PROCEDURE | FUNCTION} sp_name [characteristic ...]
characteristic:
{ CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }
| SQL SECURITY { DEFINER | INVOKER }
| COMMENT 'string'
This statement can be used to change the characteristics of a stored procedure or function. You must
have the ALTER ROUTINE privilege for the routine. (That privilege is granted automatically to the
routine creator.)
How to repeat:
When you execute the following script:
DELIMITER $$
ALTER PROCEDURE `Prueba`()
BEGIN
SELECT 1;
END$$
DELIMITER ;
Returns
Error Code : 1064
Algo está equivocado en su sintax cerca '()
BEGIN
SELECT 1;
END' en la linea 1
(0 ms taken)
The script was executed with "admin" user who has ALTER ROUTINE privileges. Binary logging is OFF.
Id tried every combination between the first $$ and the BEGIN clause. Including DEFINER, INVOKER and adding Database to the name (`database`.`Prueba`) and many other posibilities.
Alter Procedure does not have workaround when you define security like:
- "admin" user can alter procedures but doesnt have GRANT permissions
- "admin" user cant select tables
If anyone knows "admin" password cant get data of the database writing new procedures with select statements.
Suggested fix:
Please verify and fix (if it is then case).
Description: Using SQLyog enterprise 5.19 or MySQL Query browser 1.2.3 beta, ALTER PROCEDURE doesnt work as described in manual. ALTER {PROCEDURE | FUNCTION} sp_name [characteristic ...] characteristic: { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA } | SQL SECURITY { DEFINER | INVOKER } | COMMENT 'string' This statement can be used to change the characteristics of a stored procedure or function. You must have the ALTER ROUTINE privilege for the routine. (That privilege is granted automatically to the routine creator.) How to repeat: When you execute the following script: DELIMITER $$ ALTER PROCEDURE `Prueba`() BEGIN SELECT 1; END$$ DELIMITER ; Returns Error Code : 1064 Algo está equivocado en su sintax cerca '() BEGIN SELECT 1; END' en la linea 1 (0 ms taken) The script was executed with "admin" user who has ALTER ROUTINE privileges. Binary logging is OFF. Id tried every combination between the first $$ and the BEGIN clause. Including DEFINER, INVOKER and adding Database to the name (`database`.`Prueba`) and many other posibilities. Alter Procedure does not have workaround when you define security like: - "admin" user can alter procedures but doesnt have GRANT permissions - "admin" user cant select tables If anyone knows "admin" password cant get data of the database writing new procedures with select statements. Suggested fix: Please verify and fix (if it is then case).