From fbeb9b058d4ca6367b4e003142b29c4ec09ffb5c Mon Sep 17 00:00:00 2001 From: guillermo Date: Thu, 14 Mar 2024 09:34:37 +0100 Subject: [PATCH] hotfix: itemProposal added optimizer_search_depth --- db/routines/vn/procedures/itemProposal.sql | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/db/routines/vn/procedures/itemProposal.sql b/db/routines/vn/procedures/itemProposal.sql index 0dc04124d..da9e757aa 100644 --- a/db/routines/vn/procedures/itemProposal.sql +++ b/db/routines/vn/procedures/itemProposal.sql @@ -18,21 +18,17 @@ BEGIN DECLARE vCalcFk INT; DECLARE vTypeFk INT; DECLARE vPriority INT DEFAULT 1; - DECLARE EXIT HANDLER FOR SQLEXCEPTION - BEGIN - ROLLBACK; - RESIGNAL; - END; SELECT warehouseFk, shipped INTO vWarehouseFk, vShipped FROM ticket WHERE id = vTicketFk; - START TRANSACTION; - CALL cache.available_refresh(vCalcFk, FALSE, vWarehouseFk, vShipped); + SET @_optimizer_search_depth = @@optimizer_search_depth; + SET SESSION optimizer_search_depth = 0; + WITH itemTags AS ( SELECT i.id, typeFk, @@ -99,6 +95,7 @@ BEGIN match7 DESC, (i.tag8 = its.tag8) DESC, match8 DESC; - COMMIT; + + SET SESSION optimizer_search_depth = @_optimizer_search_depth; END$$ DELIMITER ;