java/code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml | 4 ++--
web/modules/rhn/RHN/DB/Channel.pm | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 4ae162939c8578741aaf4a397a2e29b087ab84e5
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Mar 11 10:36:28 2011 +0100
Fixing is_eoled, replacing sysdate with current_timestamp.
Addressing
DBD::Pg::st execute failed: ERROR: column "sysdate" does not exist
LINE 4: AND sysdate - end_of_life > 0
^
RHN::DB /usr/share/perl5/vendor_perl/RHN/DB.pm 228 RHN::Exception::DB::throw
RHN::DB::st /usr/share/perl5/vendor_perl/RHN/DB.pm 564 RHN::DB::handle_error
RHN::DB::Channel /usr/share/perl5/vendor_perl/RHN/DB/Channel.pm 134
RHN::DB::st::execute_h
RHN::Access::Channel /usr/share/perl5/vendor_perl/RHN/Access/Channel.pm 77
RHN::DB::Channel::is_eoled
PXT::ACL /usr/share/perl5/vendor_perl/PXT/ACL.pm 93
RHN::Access::Channel::channel_eoled
Sniglets::Users /usr/share/perl5/vendor_perl/Sniglets/Users.pm 383
PXT::ACL::eval_acl
diff --git a/web/modules/rhn/RHN/DB/Channel.pm b/web/modules/rhn/RHN/DB/Channel.pm
index 2dfabb7..532025f 100644
--- a/web/modules/rhn/RHN/DB/Channel.pm
+++ b/web/modules/rhn/RHN/DB/Channel.pm
@@ -128,7 +128,7 @@ sub is_eoled {
SELECT 1
FROM rhnChannel
WHERE id = :channel_id
- AND sysdate - end_of_life > 0
+ AND current_timestamp > end_of_life
EOQ
$sth->execute_h(channel_id => $self->id);
commit 15153dcc0a164992f691d3f465563d4dc678ebb8
Author: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri Mar 11 10:29:06 2011 +0100
Adding the AS keyword to column aliases (for PostgreSQL).
Addressing
ERROR com.redhat.rhn.common.db.datasource.CachedStatement - Error while processing
cached statement sql: SELECT P.id, CS.checksum, CS.checksum_type checksum_type,
PN.name || '-' || PE.version
|| '-' || PE.release || (CASE WHEN PE.epoch IS NULL THEN
'' ELSE ':' || PE.epoch END)
|| '-' || PA.label name
from rhnPackage P inner join
rhnChannelPackage CP on P.id = CP.package_id inner join
rhnErrataPackage EP on EP.package_id = CP.package_id inner join
rhnPackageName PN on P.name_id = PN.id inner join
rhnPackageEvr PE on P.evr_id = PE.id inner join
rhnPackageArch PA on P.package_arch_id = PA.id inner join
rhnChecksumView CS on P.checksum_id = CS.id
where CP.channel_id = ?
and EP.errata_id = ?
ORDER by name
com.redhat.rhn.common.db.WrappedSQLException: ERROR: syntax error at or near
"name"
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 5923567..d719886 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
@@ -1085,10 +1085,10 @@ GROUP BY C.id, C.name
<mode name="channel_errata_packages"
class="com.redhat.rhn.frontend.dto.PackageDto">
<query params="eid, cid">
- SELECT P.id, CS.checksum, CS.checksum_type checksum_type,
+ SELECT P.id, CS.checksum, CS.checksum_type as checksum_type,
PN.name || '-' || PE.version
|| '-' || PE.release || (CASE WHEN PE.epoch IS NULL THEN '' ELSE
':' || PE.epoch END)
- || '-' || PA.label name
+ || '-' || PA.label as name
from rhnPackage P inner join
rhnChannelPackage CP on P.id = CP.package_id inner join
rhnErrataPackage EP on EP.package_id = CP.package_id inner join
Show replies by date