hotfix: itemProposal added optimizer_search_depth
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Guillermo Bonet 2024-03-14 09:34:37 +01:00
parent b4b6b47a9c
commit fbeb9b058d
1 changed files with 5 additions and 8 deletions

View File

@ -18,21 +18,17 @@ BEGIN
DECLARE vCalcFk INT; DECLARE vCalcFk INT;
DECLARE vTypeFk INT; DECLARE vTypeFk INT;
DECLARE vPriority INT DEFAULT 1; DECLARE vPriority INT DEFAULT 1;
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
ROLLBACK;
RESIGNAL;
END;
SELECT warehouseFk, shipped SELECT warehouseFk, shipped
INTO vWarehouseFk, vShipped INTO vWarehouseFk, vShipped
FROM ticket FROM ticket
WHERE id = vTicketFk; WHERE id = vTicketFk;
START TRANSACTION;
CALL cache.available_refresh(vCalcFk, FALSE, vWarehouseFk, vShipped); CALL cache.available_refresh(vCalcFk, FALSE, vWarehouseFk, vShipped);
SET @_optimizer_search_depth = @@optimizer_search_depth;
SET SESSION optimizer_search_depth = 0;
WITH itemTags AS ( WITH itemTags AS (
SELECT i.id, SELECT i.id,
typeFk, typeFk,
@ -99,6 +95,7 @@ BEGIN
match7 DESC, match7 DESC,
(i.tag8 = its.tag8) DESC, (i.tag8 = its.tag8) DESC,
match8 DESC; match8 DESC;
COMMIT;
SET SESSION optimizer_search_depth = @_optimizer_search_depth;
END$$ END$$
DELIMITER ; DELIMITER ;