Google Cloud MySQL trigger error. A Enterprice license is required even for a Not Deployed app?

We have developed an app with a Core license in Not Deployed mode, with a connection to a Google Cloud MySQL database; We connect successfully and can create, update and delete records. Even the database has a stored procedure working satisfactorily; However, when creating a trigger in the MySQL workbench the following error occurs:
Can't update table 'entries' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.

After much research, I would like to know if the Enterprise license is essential to develop an app with a Google Cloud MySQL; even in not-deployed mode?

0 2 92
2 REPLIES 2

No license required for a non-deployed app.  You can connect and test database functionality, plus include up to 9 other people for testing purposes all with no charges.  Do be aware that undeployed apps will not have full feature access - emails are sent to App Creator only, Scheduled automations can only be ran manually using Test button.

Regarding the error message...I have not seen it before but the message makes it sound like there is some kind of circular reference to the trigger.  For example, you can't create a trigger that then performs some activity that would again execute the trigger.

This is the Stored Proceduere  which works perfectly well:

CREATE DEFINER=`dbmigracion`@`%` PROCEDURE `sp_entradas_salidas_netas_alberto`()
BEGIN
UPDATE entradas AS e
JOIN (
SELECT entrada_id, SUM(salida_neta) AS total_salida_neta
FROM salidas
GROUP BY entrada_id
) AS s ON e.entrada_id = s.entrada_id
SET e.salidas_netas = total_salida_neta;
END

Them; we implement the following Trigges which generates the described error: 

CREATE DEFINER=`dbmigracion`@`%` TRIGGER `entradas_AFTER_UPDATE` AFTER UPDATE ON `entradas` FOR EACH ROW BEGIN
call sp_entradas_salidas_netas_alberto();
END.

 

... the error...: 

Can't update table 'entries' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.

We will greatly appreciate any comments, thank you very much in advance.

 

Top Labels in this Space