|
|
BugDB: View Bug 616
Detailed Description:
When error 151 is raised by Sybase ASE 15 esd 1, Openclient v15
error to STDERR:
----
OpenClient message: LAYER = (1) ORIGIN = (1) SEVERITY = (1) NUMBER = (151)
Message String: ct_cancel(): user api layer: external error: A connection to the
server must exist on the connection structure before this routine can be called.
Even with PrintError disabled and a return code of 0 within the syb_err_handler,
this particular error will be printed to STDERR.
Connect string:
----
my $dbh =
DBI->connect("dbi:Sybase:server=$server;loginTimeout=5;timeout=5;scriptName=$script;encryptPassword=1;tdsLevel=CS_TDS_50;charset=iso_1",
$login, $password, { PrintError => 0, syb_err_handler => \&syb_err_handler } )) {
Syb Handler:
----
sub syb_err_handler {
my($err, $sev, $state, $line, $server, $proc, $msg, $sql, $err_type) = @_;
my %ignore_errors = map { $_, 1 } (6, 151, 208, 2056, 2057, 14024, 17001);
if( ($err == 4002 && $sev == 5 && $state == 4) || $err == 44 || $err ==
14021 || $err == 4002 ) { # wrong password
report_err("Wrong password", "warn");
$wrong_pass = 1;
return 0; # This is not an error
} elsif ($err == 63 || ($err == 4 && $sev == 5) ) {
report_err("Connection timed out", "error");
return 1;
} elsif ($ignore_errors{$err}) {
# ignore
return 0;
}
print "error: $err, $sev, $state : $msg\n";
return 1;
}
Log Entries:
Dec 29 2006 9:49AM - mpeppler@peppler.org
Dec 29 2006 9:59AM - mpeppler@peppler.org
This is probably related to having a short login timeout. When the timeout
fires the client callback is called, and this tries to issue a ct_cancel.
Dec 29 2006 10:40AM - jfroebe@froebe.net
I upped the login/query timeout to 60 seconds.. 151 is still being sent to
STDERR :(
Apr 10 2007 4:33AM - mpeppler@peppler.org
After re-reading the error handling recommendations in the Client Library manual
I've found the problem (calling ct_cancel() when the connection hasn't been
established yet).
This should be fixed in 1.08, to be released "soon".
Apr 21 2007 12:05PM - mpeppler@peppler.org
Fixed in 1.08, released on apr 21 2007
|