feat: refs #7144 DiagnoseProducionFailure changes
gitea/salix/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-05-23 13:51:18 +02:00
parent 2a6cd4698a
commit 9210d2e6ce
2 changed files with 5 additions and 5 deletions

View File

@ -20,7 +20,7 @@ BEGIN
CALL util.throw("Configuration variables not set");
END IF;
SELECT IF(COUNT(ID) > vMaxThreads, TRUE, FALSE) INTO vHasError
SELECT COUNT(ID) INTO vHasError
FROM information_schema.PROCESSLIST
WHERE COMMAND = 'Query'
AND `time` > vMaxTime;

View File

@ -24,7 +24,7 @@ BEGIN
DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = TRUE;
CREATE OR REPLACE TEMPORARY TABLE tmp.diagnoseProductionFailure (
CREATE OR REPLACE TEMPORARY TABLE tDiagnoseProductionFailure (
`message` TEXT NOT NULL,
hasError TINYINT(1) NOT NULL,
`resolution` TEXT
@ -49,7 +49,7 @@ BEGIN
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
INSERT INTO tmp.diagnoseProductionFailure
INSERT INTO tDiagnoseProductionFailure
SELECT vMessage,
@vHasError,
IF (@vHasError,
@ -60,7 +60,7 @@ BEGIN
END LOOP;
CLOSE cFunctions;
SELECT * FROM tmp.diagnoseProductionFailure;
DROP TEMPORARY TABLE tmp.diagnoseProductionFailure;
SELECT * FROM tDiagnoseProductionFailure;
DROP TEMPORARY TABLE tDiagnoseProductionFailure;
END$$
DELIMITER ;