On 09/17/2012 06:36 PM, Kenny Van Alstyne wrote:
I'm just curious if anyone else is having the below issue --

When browsing to Systems -> Select a Solaris x86 box -> Software ->
Patches, an ISE is reported.  The Tomcat and PostgreSQL logs are
below.

2012-09-17 09:07:45,345 [TP-Processor5] ERROR
com.redhat.rhn.common.db.datasource.CachedStatement - Error while
processing cached statement sql: SELECT PN.id as ID,
        PN.id || '|' || PE.id AS ID_COMBO,
       PN.name || '-' || evr_t_as_vre_simple(PE.evr) AS NVRE,
       PN.name AS name,
       PE.version,
       PE.release,
       PE.epoch,
       PN.id AS NAME_ID,
       PE.id AS EVR_ID,
         nvl( (select spt.name                 from rhnSolarisPatchType spt,
                    rhnSolarisPatch RSP,
                          rhnPackage p
              where RSP.package_id = p.id
          and P.name_id = SP.name_id
                and P.evr_id = SP.evr_id
                and P.package_arch_id = SP.package_arch_id
                and RSP.patch_type = spt.id),
                'unknown') as PATCH_TYPE
FROM  rhnPackageName PN,
         rhnPackageEVR PE,
         rhnServerPackage SP
WHERE SP.server_id = ?
  AND  SP.name_id = PN.id
  AND  SP.evr_id = PE.id
  AND  EXISTS ( SELECT  1
                  FROM  rhnPackageArch PA,
                        rhnArchType AT
                 WHERE  PA.id = SP.package_arch_id
                   AND  AT.id = PA.arch_type_id
                   AND  AT.label = 'solaris-patch' )
ORDER BY UPPER(PN.name), UPPER(evr_t_as_vre_simple(PE.evr))
com.redhat.rhn.common.db.WrappedSQLException: ERROR: more than one row
returned by a subquery used as an expression


Hi Kenny,

Unfortunately I don't have a Solaris system I can register to try to reproduce this with, but it looks to me like this sub query is returning more than one row when it should be returning either one or zero rows:

select spt.name
from rhnSolarisPatchType spt,
rhnSolarisPatch RSP,
rhnPackage p
where RSP.package_id = p.id
and P.name_id = SP.name_id
and P.evr_id = SP.evr_id
and P.package_arch_id = SP.package_arch_id
and RSP.patch_type = spt.id


I don't know *why* that query is returning more than one row. I would think there should only be a single Solaris Patch that corresponds with a given package name / epoch / version / release / arch combination, right?

-Stephen Herr

_______________________________________________
Spacewalk-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-list

Reply via email to