java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml | 12
+++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
New commits:
commit aefe48159a0b296244e50453db014195af2da0d0
Author: Milan Zazrivec <mzazrivec(a)redhat.com>
Date: Thu Nov 10 13:47:22 2011 +0100
IPv6: fix duplicates based on IP comparison
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml
b/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml
index 2c93cb1..a060ae3 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/System_queries.xml
@@ -1616,18 +1616,20 @@ SELECT 1
<mode name="duplicate_system_ids_ip"
class="com.redhat.rhn.frontend.dto.NetworkDto">
<query params="uid, inactive_date">
- SELECT distinct S.id as id, S.name as name, NI.ip_addr as key, si.checkin as
last_checkin,
+ SELECT distinct S.id as id, S.name as name, sa4.address as key, si.checkin as
last_checkin,
(select count(*) from rhnServerInfo Si2 where S.id = Si2.server_id and Si2.checkin
< :inactive_date) as inactive
from rhnServer S inner join
rhnUserServerPerms USP on S.id = USP.server_id inner join
rhnServerNetInterface NI on NI.server_id = S.id inner join
rhnServerInfo si on si.server_id = S.id inner join
- ( Select NI2.ip_addr, count(distinct NI2.server_id) as syscount
+ rhnServerNetAddress4 sa4 on sa4.interface_id = NI.id inner join
+ ( Select sa4_2.address, count(distinct NI2.server_id) as syscount
from rhnServerNetInterface NI2 inner join
- rhnUserServerPerms USP2 on NI2.server_id = USP2.server_id
+ rhnUserServerPerms USP2 on NI2.server_id = USP2.server_id inner join
+ rhnServerNetAddress4 sa4_2 on sa4_2.interface_id = ni2.id
where USP2.user_id = :uid and
- NI2.ip_addr not in(%s) and NI2.name not like 'vnet%' and NI2.name not like
'virbr%'
- group by NI2.ip_addr having count(distinct NI2.server_id) > 1) SUMM on
SUMM.ip_addr = NI.ip_addr
+ sa4_2.address not in(%s) and NI2.name not like 'vnet%' and NI2.name not like
'virbr%'
+ group by sa4_2.address having count(distinct NI2.server_id) > 1) SUMM on
SUMM.address = sa4.address
where USP.user_id = :uid
</query>
</mode>
Show replies by date