java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml | 4 +++-
java/code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 7bf722e3e57c2868451ad60c4a99818c1cb9893a
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Feb 28 16:26:57 2011 +0100
No need to convert numeric values to upper.
Addressing
com.redhat.rhn.common.db.WrappedSQLException: ERROR: function upper(numeric) does not exist
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml
index e1e6382..b89c564 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Errata_queries.xml
@@ -1084,7 +1084,7 @@ SELECT DISTINCT E.id, E.update_date
SELECT EBL.bug_id, EBL.summary
FROM rhnErrataBugList EBL
WHERE EBL.errata_id = :eid
-ORDER BY UPPER(EBL.bug_id)
+ORDER BY EBL.bug_id
</query>
</mode>
commit 78978b88002a187e07c26c87545f2ff08420226d
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Mon Feb 28 16:09:10 2011 +0100
Fixing affected_by_errata for PostgreSQL.
Addressing
org.postgresql.util.PSQLException: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list
diff --git a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
index dff7094..5923567 100644
--- a/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
+++ b/java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
@@ -812,13 +812,15 @@ SELECT DISTINCT C.id,
<mode name="affected_by_errata" class="com.redhat.rhn.domain.channel.Channel">
<query params="eid, org_id">
+select * from (
SELECT DISTINCT C.id, C.name
FROM rhnAvailableChannels AC, rhnChannel C, rhnChannelErrata CE
WHERE CE.errata_id = :eid
AND CE.channel_id = C.id
AND AC.org_id = :org_id
AND C.id = AC.channel_id
- ORDER BY UPPER(C.name)
+) X
+ ORDER BY UPPER(X.name)
</query>
</mode>