$dbh->errstr is a string describing the error whereas $dbh->err
is just a number. The fomer seems somewhat more useful for logging
purposes.
Cc: Roberto Nibali <ratz@xxxxxxxxxxxx>
Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>
Index: heartbeat/ldirectord/ldirectord.in
===================================================================
--- heartbeat.orig/ldirectord/ldirectord.in 2007-04-24 17:47:45.000000000
+0900
+++ heartbeat/ldirectord/ldirectord.in 2007-04-24 17:48:22.000000000 +0900
@@ -2506,7 +2506,8 @@ sub check_sql
"host=$$r{server};port=$port", $$v{login},
$$v{passwd});
unless ($dbh) {
- &ld_debug(4, "Failed to bind to $$r{server} with $dbh->err");
+ &ld_debug(4, "Failed to bind to $$r{server} with " .
+ $dbh->errstr);
service_set($v, $r, "down");
return 1;
}
--
--
Horms
H: http://www.vergenet.net/~horms/
W: http://www.valinux.co.jp/en/
|