Skip Menu |

This queue is for tickets about the DBD-ODBC CPAN distribution.

Report information
The Basics
Id: 75251
Status: rejected
Priority: 0/
Queue: DBD-ODBC

People
Owner: Nobody in particular
Requestors: mmcgillis [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.29
Fixed in: (no value)



Subject: DBD::ODBC/freeTDS bug large image param
With intel 64 running Red Hat Enterprise Linux Server 6.1 using FreeTDS 0.82, unixODBC 2.3.0, perl 5.10 and DBD::ODBC 1.29. Connecting to a Windows box with Microsoft SQL Server 2005 - 9.00.4035.00 (X64) If I create this stored procedure in a database. "create procedure testbug @data image as begin return end" Then create a script "bug" with the following: #!/usr/bin/perl use DBI; my $dbh=DBI->connect("dbi:ODBC:".$ENV{DB},$ENV{USER},$ENV{PASS}, {PrintError => 1, RaiseError=> 1}) || die "Failed DB connect: ".$dbh->errstr; my $query = qq/{call testbug( ? )}/; my $sth = $dbh->prepare($query); my $name=""; while (true) { $name.="a"; $sth->bind_param(1,$name, -4); $sth->execute() || die $dbh->errstr; print length($name)."\n"; } The "bug" script will die when $name reaches 32768 chars with the message: DBD::ODBC::st execute failed: Unable to fetch information about the error at ./bug line 17. however if I replace the query so it includes a ";" at the end like: my $query = qq/{call testbug( ? )};/; The code will not die at 32768 chars and goes way beyond (never actually let the program run long enough to determine if it ever does die at some other larger limit).
On Thu Feb 23 15:51:45 2012, MMCGILLIS wrote: Show quoted text
> With intel 64 running Red Hat Enterprise Linux Server 6.1 using > FreeTDS 0.82, unixODBC > 2.3.0, perl 5.10 and DBD::ODBC 1.29. > > Connecting to a Windows box with Microsoft SQL Server 2005 - > 9.00.4035.00 (X64) > > If I create this stored procedure in a database. > > "create procedure testbug @data image as begin return end" > > Then create a script "bug" with the following: > > #!/usr/bin/perl > > use DBI; > > my $dbh=DBI->connect("dbi:ODBC:".$ENV{DB},$ENV{USER},$ENV{PASS}, > {PrintError => 1, RaiseError=> 1}) || > die "Failed DB connect: ".$dbh->errstr; > > > my $query = qq/{call testbug( ? )}/; > my $sth = $dbh->prepare($query); > > my $name=""; > while (true) { > $name.="a"; > $sth->bind_param(1,$name, -4); > $sth->execute() || die $dbh->errstr; > print length($name)."\n"; > } > > The "bug" script will die when $name reaches 32768 chars with the > message: > > DBD::ODBC::st execute failed: Unable to fetch information about > the error at ./bug line 17. > > however if I replace the query so it includes a ";" at the end like: > > my $query = qq/{call testbug( ? )};/; > > The code will not die at 32768 chars and goes way beyond (never > actually let the program > run long enough to determine if it ever does die at some other larger > limit).
I know I asked you to report this but I didn't want it to get lost. I also didn't think I could try it out as soon as I imagined. The result of running the following code against the MS SQL Server ODBC Driver on Windows shows no errors: my $query = qq/{call testbug( ? )}/; my $sth = $dbh->prepare($query); my $name=""; while (true) { $name.="a"; $sth->bind_param(1,$name, -4); $sth->execute() || die $dbh->errstr; print length($name)."\n"; } output: 1 . . 32765 32766 32767 32768 32769 32770 and it just keeps going. I suspect a freeTDS bug. If you post it to the freeTDS mailing list and get an outcome I'd appreciate you posting it back on this rt. Martin -- Martin J. Evans Wetherby, UK
On Thu Feb 23 16:04:09 2012, MJEVANS wrote: Show quoted text
> On Thu Feb 23 15:51:45 2012, MMCGILLIS wrote:
> > With intel 64 running Red Hat Enterprise Linux Server 6.1 using > > FreeTDS 0.82, unixODBC > > 2.3.0, perl 5.10 and DBD::ODBC 1.29. > > > > Connecting to a Windows box with Microsoft SQL Server 2005 - > > 9.00.4035.00 (X64) > > > > If I create this stored procedure in a database. > > > > "create procedure testbug @data image as begin return end" > > > > Then create a script "bug" with the following: > > > > #!/usr/bin/perl > > > > use DBI; > > > > my $dbh=DBI->connect("dbi:ODBC:".$ENV{DB},$ENV{USER},$ENV{PASS}, > > {PrintError => 1, RaiseError=> 1}) || > > die "Failed DB connect: ".$dbh->errstr; > > > > > > my $query = qq/{call testbug( ? )}/; > > my $sth = $dbh->prepare($query); > > > > my $name=""; > > while (true) { > > $name.="a"; > > $sth->bind_param(1,$name, -4); > > $sth->execute() || die $dbh->errstr; > > print length($name)."\n"; > > } > > > > The "bug" script will die when $name reaches 32768 chars with the > > message: > > > > DBD::ODBC::st execute failed: Unable to fetch information about > > the error at ./bug line 17. > > > > however if I replace the query so it includes a ";" at the end like: > > > > my $query = qq/{call testbug( ? )};/; > > > > The code will not die at 32768 chars and goes way beyond (never > > actually let the program > > run long enough to determine if it ever does die at some other
larger Show quoted text
> > limit).
> > I know I asked you to report this but I didn't want it to get lost. I > also didn't think I could try it out as soon as I imagined. The result > of running the following code against the MS SQL Server ODBC Driver on > Windows shows no errors: > > my $query = qq/{call testbug( ? )}/; > my $sth = $dbh->prepare($query); > > my $name=""; > while (true) { > $name.="a"; > $sth->bind_param(1,$name, -4); > $sth->execute() || die $dbh->errstr; > print length($name)."\n"; > } > > output: > 1 > . > . > 32765 > 32766 > 32767 > 32768 > 32769 > 32770 > > and it just keeps going. > > I suspect a freeTDS bug. If you post it to the freeTDS mailing list
and Show quoted text
> get an outcome I'd appreciate you posting it back on this rt. > > Martin
Did you get anywhere with this? Did you try the freeTDS mailing list? Martin -- Martin J. Evans Wetherby, UK
Subject: Re: [rt.cpan.org #75251] DBD::ODBC/freeTDS bug large image param
Date: Mon, 27 Feb 2012 09:12:26 -0800
To: bug-DBD-ODBC [...] rt.cpan.org
From: Matthew McGillis <matthew [...] jenika.com>
Show quoted text
> Did you get anywhere with this? Did you try the freeTDS mailing list?
I posted it to the FreeTDS mailing list and sent a copy to the FreeTDS author. Have not gotten any feedback. Matthew
Sending the previous mail has failed. Please contact your admin, they can find more details in the logs.
Sending the previous mail has failed. Please contact your admin, they can find more details in the logs.
On Mon Feb 27 12:12:39 2012, matthew@jenika.com wrote: Show quoted text
> > Did you get anywhere with this? Did you try the freeTDS mailing
> list? > > I posted it to the FreeTDS mailing list and sent a copy to the FreeTDS > author. Have not gotten any feedback. > > Matthew
I saw your post to freeTDS and also saw no one answered. That is very unusual - perhaps have another go. I'm sorry I cannot help beyond that as I can see it works with other drivers, just not freeTDS and I don't use freeTDS, I use the Easysoft SQL Server ODBC driver. Martin -- Martin J. Evans Wetherby, UK
On Fri Mar 02 13:30:59 2012, MJEVANS wrote: Show quoted text
> On Mon Feb 27 12:12:39 2012, matthew@jenika.com wrote:
> > > Did you get anywhere with this? Did you try the freeTDS mailing
> > list? > > > > I posted it to the FreeTDS mailing list and sent a copy to the
FreeTDS Show quoted text
> > author. Have not gotten any feedback. > > > > Matthew
> > I saw your post to freeTDS and also saw no one answered. That is very > unusual - perhaps have another go. I'm sorry I cannot help beyond that > as I can see it works with other drivers, just not freeTDS and I don't > use freeTDS, I use the Easysoft SQL Server ODBC driver. > > Martin
Do you mind if I close this now. I suspect a freeTDS issue and you never got a reply on the freeTDS list. Martin -- Martin J. Evans Wetherby, UK
Subject: Re: [rt.cpan.org #75251] DBD::ODBC/freeTDS bug large image param
Date: Thu, 29 Nov 2012 11:00:17 -0800
To: bug-DBD-ODBC [...] rt.cpan.org
From: Matthew McGillis <matthew [...] jenika.com>
Not for me to decide but in my book if the bug still exists it should get fixed. Matthew On Nov 29, 2012, at 2:01 AM, Martin J Evans via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=75251 > > > On Fri Mar 02 13:30:59 2012, MJEVANS wrote:
>> On Mon Feb 27 12:12:39 2012, matthew@jenika.com wrote:
>>>> Did you get anywhere with this? Did you try the freeTDS mailing
>>> list? >>> >>> I posted it to the FreeTDS mailing list and sent a copy to the
> FreeTDS
>>> author. Have not gotten any feedback. >>> >>> Matthew
>> >> I saw your post to freeTDS and also saw no one answered. That is very >> unusual - perhaps have another go. I'm sorry I cannot help beyond that >> as I can see it works with other drivers, just not freeTDS and I don't >> use freeTDS, I use the Easysoft SQL Server ODBC driver. >> >> Martin
> > Do you mind if I close this now. I suspect a freeTDS issue and you never > got a reply on the freeTDS list. > > Martin > -- > Martin J. Evans > Wetherby, UK
On Thu Nov 29 14:00:37 2012, matthew@jenika.com wrote: Show quoted text
> Not for me to decide but in my book if the bug still exists it should > get fixed. > > Matthew
The problem is the bug is reported to DBD::ODBC and I believe it is in freeTDS. I will close this. If you want to reopen it with evidence that DBD::ODBC is at fault feel free. Martin -- Martin J. Evans Wetherby, UK
CC: mmcgillis [...] cpan.org
Subject: Re: [rt.cpan.org #75251] DBD::ODBC/freeTDS bug large image param
Date: Fri, 30 Nov 2012 10:45:33 -0800
To: bug-DBD-ODBC [...] rt.cpan.org
From: Matthew McGillis <matthew [...] jenika.com>
Bugs aren't about who's at fault. If I have a product and I want it to be high quality I find solutions that hide the existence of bugs in things I can't control. My code does not have this bug to those that use it because I hide the issue for them. Matthew On Nov 30, 2012, at 1:37 AM, Martin J Evans via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=75251 > > > On Thu Nov 29 14:00:37 2012, matthew@jenika.com wrote:
>> Not for me to decide but in my book if the bug still exists it should >> get fixed. >> >> Matthew
> The problem is the bug is reported to DBD::ODBC and I believe it is in > freeTDS. > > I will close this. If you want to reopen it with evidence that DBD::ODBC > is at fault feel free. > > Martin > -- > Martin J. Evans > Wetherby, UK