summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Sabino Mullane2011-01-03 19:04:30 +0000
committerGreg Sabino Mullane2011-01-03 19:04:30 +0000
commit0ed0cb58c8eb1a3b02b271d43394d6941fd978f7 (patch)
treee4b0a59dd06e0f634817779ca29a74ede8a0dfab
parente8b6ef46c21c24ba7e0fb1e90ba89bf6bbcfb4b0 (diff)
Fixes for custom_query.
-rwxr-xr-xcheck_postgres.pl8
1 files changed, 6 insertions, 2 deletions
diff --git a/check_postgres.pl b/check_postgres.pl
index 968c1c6bf..de56cbea0 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -3155,6 +3155,10 @@ sub check_custom_query {
$goodrow++;
$db->{perf} .= " $msg";
my $gotmatch = 0;
+ if (! defined $data) {
+ add_unknown msg('custom-invalid');
+ return;
+ }
if (length $critical) {
if (($valtype eq 'string' and $data eq $critical)
or
@@ -3167,7 +3171,7 @@ sub check_custom_query {
if (length $warning and ! $gotmatch) {
if (($valtype eq 'string' and $data eq $warning)
or
- ($reverse ? $data <= $warning : $data >= $warning)) {
+ (length $data and $reverse ? $data <= $warning : $data >= $warning)) {
add_warning "$data";
$gotmatch = 1;
}
@@ -6937,7 +6941,7 @@ WHERE xact_start IS NOT NULL $USERWHERECLAUSE
## Use of skip_item means we may have no matches
if ($maxdb eq '?') {
if ($USERWHERECLAUSE) { ## needed?
- add_unknown msg('fixme-nomatch');
+ add_unknown msg('txntime-none');
}
else {
add_ok msg('txntime-none');