From b9a302955fd56396b4e92e3d95cb85d6a77d03de Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 9 Apr 2015 20:06:25 +0000 Subject: [PATCH] LP#1435494: do not encourage An empty node in opensrf.xml gets parsed as an empty hashref, not an empty scalar, so we'll use 0 in the suggested opensrf.xml config. This fixes an issue noticed by Ben Shum during testing where reports could fail with the following message: DBD::Pg::st execute failed: ERROR: syntax error at or near "0" LINE 43: ) limited_to_HASH(0x2a974f8)_hits LIMIT HASH(0x2a974f8) ^ at /openils/bin/clark-kent.pl line 243. Signed-off-by: Galen Charlton Signed-off-by: Ben Shum --- Open-ILS/examples/opensrf.xml.example | 4 +++- Open-ILS/src/reporter/clark-kent.pl | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Open-ILS/examples/opensrf.xml.example b/Open-ILS/examples/opensrf.xml.example index fdaf1508b1..62ab1b83b4 100644 --- a/Open-ILS/examples/opensrf.xml.example +++ b/Open-ILS/examples/opensrf.xml.example @@ -198,8 +198,10 @@ vim:et:ts=4:sw=4: has been limited in this fashion. This setting can be overriden by the -resultset-limit command-line switch of clark-kent.pl. + + A value of 0 means that no limit should be set. --> - + 0 diff --git a/Open-ILS/src/reporter/clark-kent.pl b/Open-ILS/src/reporter/clark-kent.pl index c2a6e9f434..0e8a99b1b5 100755 --- a/Open-ILS/src/reporter/clark-kent.pl +++ b/Open-ILS/src/reporter/clark-kent.pl @@ -109,7 +109,9 @@ my $max_rows_for_charts = $opt_max_rows_for_charts // 1000; $max_rows_for_charts = 1000 unless $max_rows_for_charts =~ /^\d+$/; my $resultset_limit = $opt_resultset_limit // - $sc->config_value( reporter => setup => 'resultset_limit' ); + $sc->config_value( reporter => setup => 'resultset_limit' ) // + 0; +$resultset_limit = 0 unless $resultset_limit =~ /^\d+$/; # 0 means no limit my ($dbh,$running,$sth,@reports,$run, $current_time); -- 2.11.0