This commit is contained in:
parent
376adebe9d
commit
96d2bacb3d
|
@ -8,11 +8,6 @@ BEGIN
|
||||||
*
|
*
|
||||||
* @param vSelf Id ruta
|
* @param vSelf Id ruta
|
||||||
*/
|
*/
|
||||||
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
|
||||||
BEGIN
|
|
||||||
ROLLBACK;
|
|
||||||
RESIGNAL;
|
|
||||||
END;
|
|
||||||
|
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tRouteVolume
|
CREATE OR REPLACE TEMPORARY TABLE tRouteVolume
|
||||||
ENGINE = MEMORY
|
ENGINE = MEMORY
|
||||||
|
@ -20,8 +15,6 @@ BEGIN
|
||||||
FROM saleVolume
|
FROM saleVolume
|
||||||
WHERE routeFk = vSelf;
|
WHERE routeFk = vSelf;
|
||||||
|
|
||||||
START TRANSACTION;
|
|
||||||
|
|
||||||
-- Hago el INTO para que no de error en los triggers
|
-- Hago el INTO para que no de error en los triggers
|
||||||
SELECT id INTO vSelf FROM `route` WHERE id = vSelf FOR UPDATE;
|
SELECT id INTO vSelf FROM `route` WHERE id = vSelf FOR UPDATE;
|
||||||
|
|
||||||
|
@ -29,8 +22,6 @@ BEGIN
|
||||||
SET m3 = (SELECT volume FROM tRouteVolume)
|
SET m3 = (SELECT volume FROM tRouteVolume)
|
||||||
WHERE id = vSelf;
|
WHERE id = vSelf;
|
||||||
|
|
||||||
COMMIT;
|
|
||||||
|
|
||||||
DROP TEMPORARY TABLE tRouteVolume;
|
DROP TEMPORARY TABLE tRouteVolume;
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
Loading…
Reference in New Issue