DELIMITER $$ CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `hedera`.`myTpvTransaction_end`( vSelf INT, vStatus VARCHAR(12)) BEGIN /** * See tpvTransaction_start() for more info. * * @param vSelf Transaction indentifier * @param vStatus The status, 'ok' o 'ko' */ DECLARE vIsOwned BOOL; SELECT COUNT(*) > 0 INTO vIsOwned FROM myTpvTransaction WHERE id = vSelf; IF NOT vIsOwned THEN CALL util.throw('transactionNotOwnedByUser'); END IF; CALL tpvTransaction_end(vSelf, vStatus); END$$ DELIMITER ;