From 94c4c43bb5f716e8cc0e98babd2c7d7bd3df165a Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 13 Oct 2022 17:01:18 +0200 Subject: [PATCH] #4474 Fix memory leaks --- debian/changelog | 2 +- forms/ecomerce/catalog/ui.xml | 31 +++++++++++++++++++++++++------ forms/ecomerce/confirm/ui.xml | 5 +++-- package.json | 2 +- 4 files changed, 30 insertions(+), 10 deletions(-) diff --git a/debian/changelog b/debian/changelog index a8228455..d2025216 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -hedera-web (1.408.20) stable; urgency=low +hedera-web (1.408.21) stable; urgency=low * Initial Release. diff --git a/forms/ecomerce/catalog/ui.xml b/forms/ecomerce/catalog/ui.xml index d7ea6de6..9aa91d6b 100644 --- a/forms/ecomerce/catalog/ui.xml +++ b/forms/ecomerce/catalog/ui.xml @@ -50,8 +50,9 @@ + DROP TEMPORARY TABLE IF EXISTS tmp.item; CREATE TEMPORARY TABLE tmp.item (INDEX (itemFk)) ENGINE = MEMORY @@ -77,6 +78,13 @@ WHERE b.available > 0 ORDER BY i.relevancy DESC, i.name, i.size LIMIT 5000; + DROP TEMPORARY TABLE + tmp.item, + tmp.ticketCalculateItem, + tmp.ticketComponentPrice, + tmp.ticketComponent, + tmp.ticketLot, + tmp.zoneGetShipped; @@ -227,7 +235,8 @@ JOIN tmp.itemAvailable a ON a.id = i.id JOIN vn.itemTypeL10n l ON l.id = t.id WHERE t.`order` >= 0 AND #filter - ORDER BY t.`order`, l.name + ORDER BY t.`order`, l.name; + DROP TEMPORARY TABLE tmp.itemAvailable; @@ -247,7 +256,8 @@ JOIN tmp.itemAvailable a ON a.id = i.id JOIN vn.inkL10n l ON l.id = i.inkFk WHERE #filter - ORDER BY name + ORDER BY name; + DROP TEMPORARY TABLE tmp.itemAvailable; @@ -269,7 +279,8 @@ JOIN tmp.itemAvailable a ON a.id = i.id JOIN vn.producer p ON p.id = i.producerFk WHERE #filter - ORDER BY name + ORDER BY name; + DROP TEMPORARY TABLE tmp.itemAvailable; @@ -292,7 +303,8 @@ JOIN vn.origin o ON o.id = i.originFk JOIN vn.originL10n l ON l.id = o.id WHERE #filter - ORDER BY name + ORDER BY name; + DROP TEMPORARY TABLE tmp.itemAvailable; @@ -313,7 +325,8 @@ JOIN vn.itemType t ON t.id = i.typeFk JOIN tmp.itemAvailable a ON a.id = i.id WHERE #filter - ORDER BY category + ORDER BY category; + DROP TEMPORARY TABLE tmp.itemAvailable; @@ -450,6 +463,12 @@ JOIN tmp.ticketComponentPrice p ON p.warehouseFk = l.warehouseFk JOIN vn.warehouse w ON w.id = p.warehouseFk ORDER BY warehouseFk, `grouping`; + DROP TEMPORARY TABLE + tmp.ticketCalculateItem, + tmp.ticketComponentPrice, + tmp.ticketComponent, + tmp.ticketLot, + tmp.zoneGetShipped; diff --git a/forms/ecomerce/confirm/ui.xml b/forms/ecomerce/confirm/ui.xml index 75f9ae71..5ded7394 100644 --- a/forms/ecomerce/confirm/ui.xml +++ b/forms/ecomerce/confirm/ui.xml @@ -18,8 +18,9 @@ IFNULL(SUM(tax), 0) tax FROM tmp.orderAmount ) t; - DROP TEMPORARY TABLE tmp.orderAmount; - DROP TEMPORARY TABLE tmp.orderTax; + DROP TEMPORARY TABLE + tmp.orderAmount, + tmp.orderTax; diff --git a/package.json b/package.json index 65aec1c5..2cfc6786 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hedera-web", - "version": "1.408.20", + "version": "1.408.21", "description": "Verdnatura web page", "license": "GPL-3.0", "repository": {