From 46f2d790db3aeb03178f2b20eabbd584ffd400ba Mon Sep 17 00:00:00 2001 From: sergiodt Date: Thu, 25 Apr 2024 08:01:32 +0200 Subject: [PATCH 01/16] refs #6312 hotFix fix:replaceItem --- db/routines/vn/procedures/sale_replaceItem.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/routines/vn/procedures/sale_replaceItem.sql b/db/routines/vn/procedures/sale_replaceItem.sql index 1d9f6ff71..fb68b3f3a 100644 --- a/db/routines/vn/procedures/sale_replaceItem.sql +++ b/db/routines/vn/procedures/sale_replaceItem.sql @@ -92,8 +92,8 @@ BEGIN START TRANSACTION; UPDATE sale - SET quantity = quantity - vQuantity - WHERE id = vSaleFk; + SET originalQuantity = quantity - vQuantity, + quantity = quantity - vQuantity INSERT INTO vn.sale(ticketFk, itemFk, From d4d31c6d9e1c7a7826b08ba411831e7f226c78fd Mon Sep 17 00:00:00 2001 From: sergiodt Date: Thu, 25 Apr 2024 08:35:59 +0200 Subject: [PATCH 02/16] refs #6312 hotFix fix:replaceItem --- db/routines/vn/procedures/sale_replaceItem.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/db/routines/vn/procedures/sale_replaceItem.sql b/db/routines/vn/procedures/sale_replaceItem.sql index fb68b3f3a..9a431020b 100644 --- a/db/routines/vn/procedures/sale_replaceItem.sql +++ b/db/routines/vn/procedures/sale_replaceItem.sql @@ -94,6 +94,7 @@ BEGIN UPDATE sale SET originalQuantity = quantity - vQuantity, quantity = quantity - vQuantity + WHERE id = vSaleFk; INSERT INTO vn.sale(ticketFk, itemFk, From c819b921412792baee8b53a165bad10bb81c0f62 Mon Sep 17 00:00:00 2001 From: robert Date: Fri, 26 Apr 2024 09:09:22 +0200 Subject: [PATCH 03/16] fix: refs #177968 restore restriction --- db/routines/vn/procedures/sale_replaceItem.sql | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/db/routines/vn/procedures/sale_replaceItem.sql b/db/routines/vn/procedures/sale_replaceItem.sql index 9a431020b..e50f83b7f 100644 --- a/db/routines/vn/procedures/sale_replaceItem.sql +++ b/db/routines/vn/procedures/sale_replaceItem.sql @@ -81,6 +81,10 @@ BEGIN ORDER BY (vQuantity % `grouping`) ASC LIMIT 1; + IF vNewPrice IS NULL THEN + CALL util.throw('price retrieval failed'); + END IF; + IF vNewPrice > vOldPrice THEN SET vFinalPrice = vOldPrice; SET vOption = 'substitution'; @@ -103,7 +107,8 @@ BEGIN price) SELECT vTicketFk, vNewItemFk, - CEIL(vQuantity / vRoundQuantity) * vRoundQuantity, CONCAT('+ ', i.name), + CEIL(vQuantity / vRoundQuantity) * vRoundQuantity, + CONCAT('+ ', i.name), vFinalPrice FROM vn.item i WHERE id = vNewItemFk; From 9e87b055b74ff8f35eb4c81c0b54695449f0bbdb Mon Sep 17 00:00:00 2001 From: Pako Date: Sat, 27 Apr 2024 12:36:21 +0200 Subject: [PATCH 04/16] hotFix --- db/routines/vn/procedures/collection_assign.sql | 8 +++++--- db/routines/vn/procedures/collection_new.sql | 8 +++++--- db/versions/11016-pinkAralia/00-firstScript.sql | 5 +++++ 3 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 db/versions/11016-pinkAralia/00-firstScript.sql diff --git a/db/routines/vn/procedures/collection_assign.sql b/db/routines/vn/procedures/collection_assign.sql index f6000e87d..1d656a0ed 100644 --- a/db/routines/vn/procedures/collection_assign.sql +++ b/db/routines/vn/procedures/collection_assign.sql @@ -30,8 +30,10 @@ BEGIN -- Si hay colecciones sin terminar, sale del proceso CALL collection_get(vUserFk); - SELECT (pc.maxNotReadyCollections - COUNT(*)) <= 0 - INTO vHasTooMuchCollections + SELECT (pc.maxNotReadyCollections - COUNT(*)) <= 0, + pc.collection_assign_lockname + INTO vHasTooMuchCollections, + vLockName FROM tCollection JOIN productionConfig pc; @@ -47,7 +49,7 @@ BEGIN WHERE workerFk = vUserFk; SET vLockName = CONCAT_WS('/', - 'collection_assign', + vLockName, vWarehouseFk, vItemPackingTypeFk ); diff --git a/db/routines/vn/procedures/collection_new.sql b/db/routines/vn/procedures/collection_new.sql index f3767ddf3..8a1eff4a1 100644 --- a/db/routines/vn/procedures/collection_new.sql +++ b/db/routines/vn/procedures/collection_new.sql @@ -63,7 +63,8 @@ BEGIN o.numberOfWagons, o.trainFk, o.linesLimit, - o.volumeLimit + o.volumeLimit, + pc.collection_new_lockname INTO vMaxTickets, vHasUniqueCollectionTime, vWorkerCode, @@ -73,14 +74,15 @@ BEGIN vWagons, vTrainFk, vLinesLimit, - vVolumeLimit + vVolumeLimit, + vLockName FROM productionConfig pc JOIN worker w ON w.id = vUserFk JOIN state st ON st.`code` = 'ON_PREPARATION' JOIN operator o ON o.workerFk = vUserFk; SET vLockName = CONCAT_WS('/', - 'collection_new', + vLockName, vWarehouseFk, vItemPackingTypeFk ); diff --git a/db/versions/11016-pinkAralia/00-firstScript.sql b/db/versions/11016-pinkAralia/00-firstScript.sql new file mode 100644 index 000000000..675507254 --- /dev/null +++ b/db/versions/11016-pinkAralia/00-firstScript.sql @@ -0,0 +1,5 @@ +-- Place your SQL code here +ALTER TABLE vn.productionConfig ADD collection_new_lockname varchar(100) + DEFAULT 'collection_new' NOT NULL COMMENT 'Lockname value for proc vn.collection_new'; +ALTER TABLE vn.productionConfig ADD collection_assign_lockname varchar(100) + DEFAULT 'collection_assign' NULL COMMENT 'Lockname value for proc vn.collection_new'; From 3440bb1725a0ec8e8b67ed5762d815d20f66c75b Mon Sep 17 00:00:00 2001 From: Pako Date: Sat, 27 Apr 2024 12:43:15 +0200 Subject: [PATCH 05/16] hotFix --- db/routines/vn/procedures/collection_assign.sql | 8 +++++--- db/routines/vn/procedures/collection_new.sql | 8 +++++--- db/versions/11018-crimsonBamboo/00-firstScript.sql | 3 +++ 3 files changed, 13 insertions(+), 6 deletions(-) create mode 100644 db/versions/11018-crimsonBamboo/00-firstScript.sql diff --git a/db/routines/vn/procedures/collection_assign.sql b/db/routines/vn/procedures/collection_assign.sql index f6000e87d..1d656a0ed 100644 --- a/db/routines/vn/procedures/collection_assign.sql +++ b/db/routines/vn/procedures/collection_assign.sql @@ -30,8 +30,10 @@ BEGIN -- Si hay colecciones sin terminar, sale del proceso CALL collection_get(vUserFk); - SELECT (pc.maxNotReadyCollections - COUNT(*)) <= 0 - INTO vHasTooMuchCollections + SELECT (pc.maxNotReadyCollections - COUNT(*)) <= 0, + pc.collection_assign_lockname + INTO vHasTooMuchCollections, + vLockName FROM tCollection JOIN productionConfig pc; @@ -47,7 +49,7 @@ BEGIN WHERE workerFk = vUserFk; SET vLockName = CONCAT_WS('/', - 'collection_assign', + vLockName, vWarehouseFk, vItemPackingTypeFk ); diff --git a/db/routines/vn/procedures/collection_new.sql b/db/routines/vn/procedures/collection_new.sql index f3767ddf3..8a1eff4a1 100644 --- a/db/routines/vn/procedures/collection_new.sql +++ b/db/routines/vn/procedures/collection_new.sql @@ -63,7 +63,8 @@ BEGIN o.numberOfWagons, o.trainFk, o.linesLimit, - o.volumeLimit + o.volumeLimit, + pc.collection_new_lockname INTO vMaxTickets, vHasUniqueCollectionTime, vWorkerCode, @@ -73,14 +74,15 @@ BEGIN vWagons, vTrainFk, vLinesLimit, - vVolumeLimit + vVolumeLimit, + vLockName FROM productionConfig pc JOIN worker w ON w.id = vUserFk JOIN state st ON st.`code` = 'ON_PREPARATION' JOIN operator o ON o.workerFk = vUserFk; SET vLockName = CONCAT_WS('/', - 'collection_new', + vLockName, vWarehouseFk, vItemPackingTypeFk ); diff --git a/db/versions/11018-crimsonBamboo/00-firstScript.sql b/db/versions/11018-crimsonBamboo/00-firstScript.sql new file mode 100644 index 000000000..1d0c8f0bd --- /dev/null +++ b/db/versions/11018-crimsonBamboo/00-firstScript.sql @@ -0,0 +1,3 @@ +-- Place your SQL code here +ALTER TABLE vn.productionConfig ADD collection_new_lockname varchar(100) DEFAULT 'collection_new' NOT NULL COMMENT 'Lockname value for proc vn.collection_new'; +ALTER TABLE vn.productionConfig ADD collection_assign_lockname varchar(100) DEFAULT 'collection_assign' NULL COMMENT 'Lockname value for proc vn.collection_new'; From 9aa6e3f80a0455711bbef787b5bbcfd4eba37cea Mon Sep 17 00:00:00 2001 From: Pako Date: Sat, 27 Apr 2024 13:09:15 +0200 Subject: [PATCH 06/16] hotfix --- db/routines/vn/procedures/collection_assign.sql | 2 +- db/routines/vn/procedures/collection_new.sql | 2 +- db/versions/11016-pinkAralia/00-firstScript.sql | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/db/routines/vn/procedures/collection_assign.sql b/db/routines/vn/procedures/collection_assign.sql index 1d656a0ed..47efa7cd3 100644 --- a/db/routines/vn/procedures/collection_assign.sql +++ b/db/routines/vn/procedures/collection_assign.sql @@ -31,7 +31,7 @@ BEGIN CALL collection_get(vUserFk); SELECT (pc.maxNotReadyCollections - COUNT(*)) <= 0, - pc.collection_assign_lockname + pc.collectionAssignLockname INTO vHasTooMuchCollections, vLockName FROM tCollection diff --git a/db/routines/vn/procedures/collection_new.sql b/db/routines/vn/procedures/collection_new.sql index 8a1eff4a1..f207eb2b0 100644 --- a/db/routines/vn/procedures/collection_new.sql +++ b/db/routines/vn/procedures/collection_new.sql @@ -64,7 +64,7 @@ BEGIN o.trainFk, o.linesLimit, o.volumeLimit, - pc.collection_new_lockname + pc.collectionNewLockname INTO vMaxTickets, vHasUniqueCollectionTime, vWorkerCode, diff --git a/db/versions/11016-pinkAralia/00-firstScript.sql b/db/versions/11016-pinkAralia/00-firstScript.sql index 675507254..de090013d 100644 --- a/db/versions/11016-pinkAralia/00-firstScript.sql +++ b/db/versions/11016-pinkAralia/00-firstScript.sql @@ -1,5 +1,5 @@ -- Place your SQL code here -ALTER TABLE vn.productionConfig ADD collection_new_lockname varchar(100) +ALTER TABLE vn.productionConfig ADD collectionNewLockname varchar(100) DEFAULT 'collection_new' NOT NULL COMMENT 'Lockname value for proc vn.collection_new'; -ALTER TABLE vn.productionConfig ADD collection_assign_lockname varchar(100) +ALTER TABLE vn.productionConfig ADD collectionAssignLockname varchar(100) DEFAULT 'collection_assign' NULL COMMENT 'Lockname value for proc vn.collection_new'; From f2225b49a71415bb977dc39e6d3bb9c523b8510d Mon Sep 17 00:00:00 2001 From: sergiodt Date: Mon, 29 Apr 2024 08:19:18 +0200 Subject: [PATCH 07/16] refs #6275 hotFix fix:getExpeditionSummary --- modules/route/back/methods/route/getExpeditionSummary.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/route/back/methods/route/getExpeditionSummary.js b/modules/route/back/methods/route/getExpeditionSummary.js index ee89401a8..4f95ded2a 100644 --- a/modules/route/back/methods/route/getExpeditionSummary.js +++ b/modules/route/back/methods/route/getExpeditionSummary.js @@ -49,7 +49,7 @@ module.exports = Self => { JOIN vn.agencyMode am ON am.id = r.agencyModeFk JOIN vn.agency ag ON ag.id = am.agencyFk LEFT JOIN vn.userConfig uc ON uc.userFk = account.myUser_getId() - WHERE (r.created = util.VN_CURDATE() OR r.created = util.yesterday()) + WHERE (r.created BETWEEN util.yesterday() AND util.VN_CURDATE() + INTERVAL 1 DAY) AND t.routeFk = ? GROUP BY t.addressFk, e.itemPackingTypeFk ) sub From f4767728bcdede8ed81fd56b9e27b7271572bcfb Mon Sep 17 00:00:00 2001 From: sergiodt Date: Mon, 29 Apr 2024 08:20:57 +0200 Subject: [PATCH 08/16] refs #6275 hotFix fix:getExpeditionSummary --- modules/route/back/methods/route/getExpeditionSummary.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/route/back/methods/route/getExpeditionSummary.js b/modules/route/back/methods/route/getExpeditionSummary.js index 4f95ded2a..34f55feb2 100644 --- a/modules/route/back/methods/route/getExpeditionSummary.js +++ b/modules/route/back/methods/route/getExpeditionSummary.js @@ -49,7 +49,7 @@ module.exports = Self => { JOIN vn.agencyMode am ON am.id = r.agencyModeFk JOIN vn.agency ag ON ag.id = am.agencyFk LEFT JOIN vn.userConfig uc ON uc.userFk = account.myUser_getId() - WHERE (r.created BETWEEN util.yesterday() AND util.VN_CURDATE() + INTERVAL 1 DAY) + WHERE (r.created BETWEEN util.yesterday() AND util.VN_CURDATE() + INTERVAL 1 DAY) AND t.routeFk = ? GROUP BY t.addressFk, e.itemPackingTypeFk ) sub From a180f54390ebe454de3c9ed0b39d686c6170c58a Mon Sep 17 00:00:00 2001 From: sergiodt Date: Mon, 29 Apr 2024 08:59:12 +0200 Subject: [PATCH 09/16] refs #6275 hotFix fix:getExpeditionSummary --- modules/route/back/methods/route/getExpeditionSummary.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/route/back/methods/route/getExpeditionSummary.js b/modules/route/back/methods/route/getExpeditionSummary.js index 34f55feb2..2bd2ca43a 100644 --- a/modules/route/back/methods/route/getExpeditionSummary.js +++ b/modules/route/back/methods/route/getExpeditionSummary.js @@ -49,8 +49,7 @@ module.exports = Self => { JOIN vn.agencyMode am ON am.id = r.agencyModeFk JOIN vn.agency ag ON ag.id = am.agencyFk LEFT JOIN vn.userConfig uc ON uc.userFk = account.myUser_getId() - WHERE (r.created BETWEEN util.yesterday() AND util.VN_CURDATE() + INTERVAL 1 DAY) - AND t.routeFk = ? + WHERE t.routeFk = ? GROUP BY t.addressFk, e.itemPackingTypeFk ) sub GROUP BY addressFk From dcb6f90ab3241ef405a34733ce6572fc50eede99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Mon, 29 Apr 2024 14:42:16 +0200 Subject: [PATCH 10/16] hotfix collection_assign elimino vLockTime --- db/routines/vn/procedures/collection_assign.sql | 5 ----- 1 file changed, 5 deletions(-) diff --git a/db/routines/vn/procedures/collection_assign.sql b/db/routines/vn/procedures/collection_assign.sql index 47efa7cd3..8f23ebe4a 100644 --- a/db/routines/vn/procedures/collection_assign.sql +++ b/db/routines/vn/procedures/collection_assign.sql @@ -16,7 +16,6 @@ BEGIN DECLARE vItemPackingTypeFk VARCHAR(1); DECLARE vWarehouseFk INT; DECLARE vLockName VARCHAR(215); - DECLARE vLockTime INT DEFAULT 30; DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN @@ -54,10 +53,6 @@ BEGIN vItemPackingTypeFk ); - IF NOT GET_LOCK(vLockName, vLockTime) THEN - CALL util.throw(CONCAT('Cannot get lock: ', vLockName)); - END IF; - -- Se eliminan las colecciones sin asignar que estan obsoletas INSERT INTO ticketTracking(stateFk, ticketFk) SELECT s.id, tc.ticketFk From 51c8736da2b707ee313cede6941c466386e2a4a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Mon, 29 Apr 2024 14:54:15 +0200 Subject: [PATCH 11/16] hotFix collection_assign --- db/routines/vn/procedures/collection_assign.sql | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/db/routines/vn/procedures/collection_assign.sql b/db/routines/vn/procedures/collection_assign.sql index 8f23ebe4a..13bf7f836 100644 --- a/db/routines/vn/procedures/collection_assign.sql +++ b/db/routines/vn/procedures/collection_assign.sql @@ -16,6 +16,7 @@ BEGIN DECLARE vItemPackingTypeFk VARCHAR(1); DECLARE vWarehouseFk INT; DECLARE vLockName VARCHAR(215); + DECLARE vLockTime INT DEFAULT 30; DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN @@ -33,8 +34,8 @@ BEGIN pc.collectionAssignLockname INTO vHasTooMuchCollections, vLockName - FROM tCollection - JOIN productionConfig pc; + FROM productionConfig pc + LEFT JOIN tCollection; DROP TEMPORARY TABLE tCollection; @@ -53,6 +54,10 @@ BEGIN vItemPackingTypeFk ); + IF NOT GET_LOCK(vLockName, vLockTime) THEN + CALL util.throw(CONCAT('Cannot get lock: ', vLockName)); + END IF; + -- Se eliminan las colecciones sin asignar que estan obsoletas INSERT INTO ticketTracking(stateFk, ticketFk) SELECT s.id, tc.ticketFk From 7b7afb05c56d1a7f9131df0d60e311cbc398abcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Mon, 29 Apr 2024 15:01:20 +0200 Subject: [PATCH 12/16] hotfix collection_assign --- db/routines/vn/procedures/collection_assign.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/vn/procedures/collection_assign.sql b/db/routines/vn/procedures/collection_assign.sql index 13bf7f836..1c3ef06ab 100644 --- a/db/routines/vn/procedures/collection_assign.sql +++ b/db/routines/vn/procedures/collection_assign.sql @@ -35,7 +35,7 @@ BEGIN INTO vHasTooMuchCollections, vLockName FROM productionConfig pc - LEFT JOIN tCollection; + LEFT JOIN tCollection ON TRUE; DROP TEMPORARY TABLE tCollection; From 21a1e1eed307b29066877cd1345b7083d9a58e02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Mon, 29 Apr 2024 16:59:56 +0200 Subject: [PATCH 13/16] Hotfix feat: new function to kill connections --- db/routines/util/procedures/connection_kill.sql | 11 +++++++++++ db/routines/vn/procedures/collection_assign.sql | 7 ++----- db/routines/vn/procedures/collection_new.sql | 8 +++----- db/versions/11021-bronzeErica/00-firstScript.sql | 4 ++++ 4 files changed, 20 insertions(+), 10 deletions(-) create mode 100644 db/routines/util/procedures/connection_kill.sql create mode 100644 db/versions/11021-bronzeErica/00-firstScript.sql diff --git a/db/routines/util/procedures/connection_kill.sql b/db/routines/util/procedures/connection_kill.sql new file mode 100644 index 000000000..c321a5117 --- /dev/null +++ b/db/routines/util/procedures/connection_kill.sql @@ -0,0 +1,11 @@ +DELIMITER $$ +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`connection_kill`(vConnectionId BIGINT) +BEGIN +/** + * Kill a connection + * + * @param vConnectionId + */ + KILL vConnectionId; +END$$ +DELIMITER ; \ No newline at end of file diff --git a/db/routines/vn/procedures/collection_assign.sql b/db/routines/vn/procedures/collection_assign.sql index 1c3ef06ab..e976367cd 100644 --- a/db/routines/vn/procedures/collection_assign.sql +++ b/db/routines/vn/procedures/collection_assign.sql @@ -30,10 +30,7 @@ BEGIN -- Si hay colecciones sin terminar, sale del proceso CALL collection_get(vUserFk); - SELECT (pc.maxNotReadyCollections - COUNT(*)) <= 0, - pc.collectionAssignLockname - INTO vHasTooMuchCollections, - vLockName + SELECT (pc.maxNotReadyCollections - COUNT(*)) <= 0 INTO vHasTooMuchCollections FROM productionConfig pc LEFT JOIN tCollection ON TRUE; @@ -49,7 +46,7 @@ BEGIN WHERE workerFk = vUserFk; SET vLockName = CONCAT_WS('/', - vLockName, + 'collection_assign', vWarehouseFk, vItemPackingTypeFk ); diff --git a/db/routines/vn/procedures/collection_new.sql b/db/routines/vn/procedures/collection_new.sql index f207eb2b0..f3767ddf3 100644 --- a/db/routines/vn/procedures/collection_new.sql +++ b/db/routines/vn/procedures/collection_new.sql @@ -63,8 +63,7 @@ BEGIN o.numberOfWagons, o.trainFk, o.linesLimit, - o.volumeLimit, - pc.collectionNewLockname + o.volumeLimit INTO vMaxTickets, vHasUniqueCollectionTime, vWorkerCode, @@ -74,15 +73,14 @@ BEGIN vWagons, vTrainFk, vLinesLimit, - vVolumeLimit, - vLockName + vVolumeLimit FROM productionConfig pc JOIN worker w ON w.id = vUserFk JOIN state st ON st.`code` = 'ON_PREPARATION' JOIN operator o ON o.workerFk = vUserFk; SET vLockName = CONCAT_WS('/', - vLockName, + 'collection_new', vWarehouseFk, vItemPackingTypeFk ); diff --git a/db/versions/11021-bronzeErica/00-firstScript.sql b/db/versions/11021-bronzeErica/00-firstScript.sql new file mode 100644 index 000000000..f08667f8e --- /dev/null +++ b/db/versions/11021-bronzeErica/00-firstScript.sql @@ -0,0 +1,4 @@ + + ALTER TABLE vn.productionConfig + DROP COLUMN IF EXISTS collectionNewLockname, + DROP COLUMN IF EXISTS collectionAssignLockname; \ No newline at end of file From e55658e6b3301674ecd23bdc9561604f4380e714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Mon, 29 Apr 2024 17:02:47 +0200 Subject: [PATCH 14/16] Hotfix feat: new function to kill connections --- db/routines/util/procedures/connection_kill.sql | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/db/routines/util/procedures/connection_kill.sql b/db/routines/util/procedures/connection_kill.sql index c321a5117..b38509d1b 100644 --- a/db/routines/util/procedures/connection_kill.sql +++ b/db/routines/util/procedures/connection_kill.sql @@ -1,5 +1,7 @@ DELIMITER $$ -CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`connection_kill`(vConnectionId BIGINT) +CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`connection_kill`( + vConnectionId BIGINT +) BEGIN /** * Kill a connection From e934b47e9831c88b35eb07339bc179cc8947526e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Andr=C3=A9s?= Date: Mon, 29 Apr 2024 17:09:51 +0200 Subject: [PATCH 15/16] Hotfix feat: new function to kill connections --- db/versions/11021-bronzeErica/00-firstScript.sql | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/db/versions/11021-bronzeErica/00-firstScript.sql b/db/versions/11021-bronzeErica/00-firstScript.sql index f08667f8e..6f6b68d49 100644 --- a/db/versions/11021-bronzeErica/00-firstScript.sql +++ b/db/versions/11021-bronzeErica/00-firstScript.sql @@ -1,4 +1,13 @@ ALTER TABLE vn.productionConfig DROP COLUMN IF EXISTS collectionNewLockname, - DROP COLUMN IF EXISTS collectionAssignLockname; \ No newline at end of file + DROP COLUMN IF EXISTS collectionAssignLockname; + + DELIMITER $$ + CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`connection_kill`() + BEGIN + + END$$ + DELIMITER ; + + GRANT EXECUTE ON PROCEDURE util.connection_kill TO 'developer'; \ No newline at end of file From d44b8f7c9a1a167b0bc5eca4241ac3367f5470cf Mon Sep 17 00:00:00 2001 From: guillermo Date: Tue, 30 Apr 2024 11:44:16 +0200 Subject: [PATCH 16/16] hotfix: ticket #179514 ticket_close packaging fix --- db/routines/vn/procedures/ticket_close.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/routines/vn/procedures/ticket_close.sql b/db/routines/vn/procedures/ticket_close.sql index 91e0979cd..47d748ddf 100644 --- a/db/routines/vn/procedures/ticket_close.sql +++ b/db/routines/vn/procedures/ticket_close.sql @@ -63,7 +63,7 @@ BEGIN INSERT INTO ticketPackaging (ticketFk, packagingFk, quantity) (SELECT vCurTicketFk, p.id, COUNT(*) FROM expedition e - JOIN packaging p ON p.itemFk = e.freightItemFk + JOIN packaging p ON p.id = e.packagingFk WHERE e.ticketFk = vCurTicketFk AND p.isPackageReturnable AND vWithPackage GROUP BY p.itemFk);