Eli Mesika has uploaded a new change for review.

Change subject: core: Failed to activate ISO domain ...(#854492)
......................................................................

core: Failed to activate ISO domain ...(#854492)

core: Failed to activate ISO domain that is already attached to 2 DC

https://bugzilla.redhat.com/854492

Replacing "UNION" with "UNION ALL" in fn_get_entity_parents when
sub query may return more than one result.

For the reported scenario in the BZ the following query was part of the
UNION :

SELECT storage_pool_id as id FROM storage_pool_iso_map WHERE
storage_id = v_entity_id

Since in this scenario the ISO domain exists in 2 DCs the sub query
returned 2 rows and Postgres throwed the reported SQL exception.

Change-Id: I887005e3fc0461101b4b8ec9e24654e7dc228142
Signed-off-by: Eli Mesika <[email protected]>
---
M backend/manager/dbscripts/create_functions.sql
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/04/7804/1

diff --git a/backend/manager/dbscripts/create_functions.sql 
b/backend/manager/dbscripts/create_functions.sql
index a0776c8..f9f5760 100644
--- a/backend/manager/dbscripts/create_functions.sql
+++ b/backend/manager/dbscripts/create_functions.sql
@@ -250,7 +250,7 @@
 
                RETURN QUERY
                        SELECT system_root_id AS id
-                       UNION
+                       UNION ALL
                        SELECT storage_pool_id as id FROM storage_pool_iso_map 
WHERE storage_id = v_entity_id
                        UNION
                        SELECT v_entity_id AS id;


--
To view, visit http://gerrit.ovirt.org/7804
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I887005e3fc0461101b4b8ec9e24654e7dc228142
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to