MySQL Forums
Forum List  »  Stored Procedures

ERROR 1146 on first attempt to drop a stored procedure (MySQL 8.0.3)
Posted by: Homer White
Date: January 02, 2018 08:40PM

Experimenting with MySQL 8.0.3 Community Version, I find that the first attempt to drop a stored procedure fails, but the second attempt succeeds.

Example:

mysql> delimiter $
mysql> create procedure test()
-> begin
-> select sqrt(4);
-> end$
Query OK, 0 rows affected (0.06 sec)

mysql> delimiter ;
mysql> drop procedure if exists test\g
ERROR 1146 (42S02): Table 'mysql.role_edges' doesn't exist
mysql> drop procedure if exists test\g
Query OK, 0 rows affected, 1 warning (0.06 sec)

On the other hand if one does a conditional drop then the behavior is a bit different (following example is using a database called "airlines"):

mysql> delimiter $
mysql> create procedure test() begin select sqrt(4); end$
Query OK, 0 rows affected (0.06 sec)

mysql> drop procedure test\g
ERROR 1146 (42S02): Table 'mysql.role_edges' doesn't exist
mysql> drop procedure test\g
ERROR 1305 (42000): PROCEDURE airlines.test does not exist

Does this look like a bug? If so, should a bug in a development version be filed at bugs.mysql.com?

Thanks,
Homer

Options: ReplyQuote


Subject
Views
Written By
Posted
ERROR 1146 on first attempt to drop a stored procedure (MySQL 8.0.3)
3620
January 02, 2018 08:40PM


Sorry, you can't reply to this topic. It has been closed.

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.