I'm using Mysql 5.7 with PHP 7 and I noticed that when I add a simple trigger to a table that is inside a transaction, it takes a very long time to execute the process, it does not happen when it is out of the transaction. / p>
Does anyone know what it can be?
'DELIMITER //
CREATE TRIGGER ESTOQUEENTRADA AFTER INSERT ON estoque
FOR EACH ROW
BEGIN
UPDATE produtos SET quant_estoque = quant_estoque + NEW.quant_prod WHERE cod_prod = NEW.cod_prod;
END;//
//
DELIMITER ;'