hotfix: refs #7486 collection_new debug error
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-06-17 14:51:04 +02:00
parent 131b44305d
commit ce709798b4
2 changed files with 16 additions and 5 deletions

View File

@ -1,5 +1,8 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`debugAdd`(vVariable VARCHAR(255), vValue VARCHAR(255))
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`debugAdd`(
vVariable VARCHAR(255),
vValue TEXT
)
MODIFIES SQL DATA
BEGIN
/**

View File

@ -28,6 +28,8 @@ BEGIN
DECLARE vLockName VARCHAR(215);
DECLARE vLockTime INT DEFAULT 30;
DECLARE vFreeWagonFk INT;
DECLARE vErrorNumber INT;
DECLARE vErrorMsg TEXT;
DECLARE c1 CURSOR FOR
SELECT ticketFk, `lines`, m3
@ -47,12 +49,18 @@ BEGIN
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
GET DIAGNOSTICS CONDITION 1
vErrorNumber = MYSQL_ERRNO,
vErrorMsg = MESSAGE_TEXT;
IF vLockName IS NOT NULL THEN
DO RELEASE_LOCK(vLockName);
CALL util.debugAdd(JSON_OBJECT(
'type', 'releaseLock',
'userFk', vUserFk
), vLockName); -- Tmp
CALL util.debugAdd('collection_new', JSON_OBJECT(
'errorNumber', vErrorNumber,
'errorMsg', vErrorMsg,
'lockName', vLockName,
'userFk', vUserFk
)); -- Tmp
END IF;
RESIGNAL;