MySQL Forums
Forum List  »  Stored Procedures

Need help with optimize stored procedure
Posted by: Dmitriy Grishin
Date: November 13, 2018 12:56AM

When updating product photos, a table (`sh_prod_im_`) is created,
after filling which the stored procedure is called.

Stored procedure:

DELIMITER $$
CREATE DEFINER=`root`@`%` PROCEDURE `sync_fl`()
BEGIN
DROP TABLE IF EXISTS `sh_prod_im__`;
ALTER TABLE `sh_prod_im` RENAME TO `sh_prod_im__`;
ALTER TABLE `sh_prod_im_` RENAME TO `sh_prod_im`;
END$$
DELIMITER ;

And i regular see this error in logs:

Table 'sh_prod_im' doesn't exist.

How can i optimize sored procedure or process for fix this error?

Options: ReplyQuote


Subject
Views
Written By
Posted
Need help with optimize stored procedure
123
November 13, 2018 12:56AM


Sorry, only registered users may post in this forum.

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.