 SET SQL_SAFE_UPDATES = @OLD_SQL_SAFE_UPDATES;
 SET SQL_MODE = @OLD_SQL_MODE;
 
+COMMIT;
+
 SELECT vulnerabilityId;
 
 END //

    DECLARE cpeId INT DEFAULT 0;
    DECLARE currentEcosystem VARCHAR(255);

    SET @OLD_SQL_SAFE_UPDATES = (SELECT @@SQL_SAFE_UPDATES);
    SET SQL_SAFE_UPDATES = 0;


    VALUES (p_vulnerabilityId, cpeId, p_versionEndExcluding, p_versionEndIncluding,
            p_versionStartExcluding, p_versionStartIncluding, p_vulnerable);

    SET SQL_SAFE_UPDATES = @OLD_SQL_SAFE_UPDATES;
    COMMIT;
END //
DELIMITER ;

