Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "Kiriakos Georgiou" <kiriakos dot georgiou at nrl dot navy dot mil>
Subject: RE: :Sybase bug that could affect you
Date: Oct 5 2000 4:46PM

It's also happening with the latest production ASE (ESD 9264) on Solaris 8.

Open Client:
Sybase Client-Library/12.0/P/SPARC/Solaris 2.5.1/1/OPT/Mon Oct  4 12:07:29

Adaptive Server Enterprise/ 9264 ESD 3/Sun_svr4/OS
5.6/1629/32bit/FBO/Wed Sep  6 22:14:20 2000

This is not good!  We do have a support contract with Sybase so
if this can be narrowed down even more, we could have Sybase look
into it from their end, especially since this works on


-----Original Message-----
[]On Behalf Of Michael Peppler
Sent: Thursday, October 05, 2000 12:17 PM
To: SybPerl Discussion List
Subject: DBD::Sybase bug that could affect you

I've discovered a bug in all versions of DBD::Sybase that support
?-style placeholders. This bug shows up with the 12.0 ESD#1 for
Solaris that I have available here. It is NOT present in
ESD#6 for linux. I do not know on what other platforms this bug may
exist. You are NOT affected if you do not use placeholders.


Prepare a statement with ?-style placeholders.
Execute it a with an invalid parameter that causes Sybase to return
with an error message (I discovered this getting an "arithmetic
overflow" error).
Now try to re-execute the statement, with valid parameters.
Result: Sybase responds:
ERROR: 2812 'Server message number=2812 severity=16 state=5 line=65535
procedure=DBD1 text=Stored procedure '*00001400000000_1c3c17' not found.
Specify owner.objectname or use sp_help to check whether the object exists
(sp_help may produce lots of outpu

As if the statement had been dropped. DBI->trace() shows that the
statement is not destroyed or freed after the initial error, so I
suspect Sybase of doing a "bad thing" here.

You can run the following little script to see if you are affected:


use DBI;

$Srv = "SYBASE";
$Uid = "sa";
$Pwd = "";

my $dbh = DBI->connect("dbi:Sybase:server=$Srv", $Uid, $Pwd, {PrintError =>

my $rc;

$rc = $dbh->do("create table #t(string varchar(20), date datetime, val
float, other_val numeric(9,3))");

my $sth = $dbh->prepare("insert #t values(?, ?, ?, ?)");

$rc = $sth->execute("test", "Jan 1 1998", 123.4, 222.3334);
print "rc = $rc\n";
$rc = $sth->execute("test", "Feb 30 1998", 123.4, 222.3334);
print "rc = $rc\n";

$rc = $sth->execute("test", "Feb 28 1998", 123.4, 222.3355);
print "rc = $rc\n";
$rc = $sth->execute("test", "Feb 28 1998", 123.4, 999.99999);
print "rc = $rc\n";




Michael Peppler         -||-  Data Migrations Inc.    -||-
Int. Sybase User Group  -||-
Sybase on Linux mailing list: