Skip Menu |
 

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

Report information
The Basics
Id: 101579
Status: resolved
Priority: 0/
Queue: DBD-ODBC

People
Owner: Nobody in particular
Requestors: lorgle [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.51_3



Subject: Issue with bound parameters in DBD-ODBC 1.50 (DB is SQLServer 2008 10.0.5500)
Date: Fri, 16 Jan 2015 14:56:54 -0800
To: bug-DBD-ODBC [...] rt.cpan.org
From: laura <lorgle [...] gmail.com>
Download (untitled) / with headers
text/plain 1.4k
Hi there, Found this address as the quickest way to report a bug in DBD::ODBC via rt.cpan.org/Public/Bug/Report.html?Queue=DBD-ODBC so am writing. Distribution: DBD-ODBC-1.50 Perl version: 5.20.1 (Strawberry perl, 32-bit version) Operating System: MS Windows 7 Professional SP1 We ran into some odd behavior with DBD::ODBC when we upgraded from 1.43 to 1.50 recently - previously-working insert statements (using placeholders) started failing with a "DBD::ODBC::st execute failed: [Microsoft][ODBC SQL Server Driver]String data, right truncation (SQL-22001)" error message - even if the only data being inserted was numeric. Not all inserts failed, but the majority did (982 out of 1000 would fail). I tried a little testing (test_load.pl, attached) and found that the first insert would succeed, but subsequent ones failed, regardless of the data values being inserted. I could get the inserts working if, instead of using placeholders, I built the statement anew for each row. (Of course, that came along with a significant performance hit.) Reverting to DBD-ODBC-1.43 resulted in all methods being able to successfully insert the data into our table. The output of the test script running with DBD-ODBC-1.50 is attached (test_output_DBD-ODBC-1.50.txt), as is the output of the same script running with DBD-ODBC-1.43 (test_output_DBD-ODBC-1.43.txt). If there's more info/traces I can gather that would be helpful, just let me know and I'd be happy to. Thank you for making DBD-ODBC possible! Laura lorgle@gmail.com

Message body is not shown because sender requested not to inline it.

Download test_load.pl
text/x-perl 2k

Message body is not shown because sender requested not to inline it.

Message body is not shown because sender requested not to inline it.

Download (untitled) / with headers
text/plain 1.7k
On Fri Jan 16 17:57:34 2015, lorgle@gmail.com wrote: Show quoted text
> Hi there, > > Found this address as the quickest way to report a bug in DBD::ODBC via > rt.cpan.org/Public/Bug/Report.html?Queue=DBD-ODBC so am writing. > > Distribution: DBD-ODBC-1.50 > Perl version: 5.20.1 (Strawberry perl, 32-bit version) > Operating System: MS Windows 7 Professional SP1 > > We ran into some odd behavior with DBD::ODBC when we upgraded from 1.43 to > 1.50 recently - previously-working insert statements (using placeholders) > started failing with a "DBD::ODBC::st execute failed: [Microsoft][ODBC SQL > Server Driver]String data, right truncation (SQL-22001)" error message - > even if the only data being inserted was numeric. Not all inserts failed, > but the majority did (982 out of 1000 would fail). I tried a little > testing (test_load.pl, attached) and found that the first insert would > succeed, but subsequent ones failed, regardless of the data values being > inserted. I could get the inserts working if, instead of using > placeholders, I built the statement anew for each row. (Of course, that > came along with a significant performance hit.) > > Reverting to DBD-ODBC-1.43 resulted in all methods being able to > successfully insert the data into our table. > > The output of the test script running with DBD-ODBC-1.50 is attached > (test_output_DBD-ODBC-1.50.txt), as is the output of the same script > running with DBD-ODBC-1.43 (test_output_DBD-ODBC-1.43.txt). > > If there's more info/traces I can gather that would be helpful, just let me > know and I'd be happy to. > > Thank you for making DBD-ODBC possible! > > Laura > lorgle@gmail.com
Thanks for the RT. Just to let you know I have reproduced it with you example and will try and find the problem this weekend. Martin -- Martin J. Evans Wetherby, UK
Download (untitled) / with headers
text/plain 2.1k
On Sat Jan 17 04:16:34 2015, MJEVANS wrote: Show quoted text
> On Fri Jan 16 17:57:34 2015, lorgle@gmail.com wrote:
> > Hi there, > > > > Found this address as the quickest way to report a bug in DBD::ODBC > > via > > rt.cpan.org/Public/Bug/Report.html?Queue=DBD-ODBC so am writing. > > > > Distribution: DBD-ODBC-1.50 > > Perl version: 5.20.1 (Strawberry perl, 32-bit version) > > Operating System: MS Windows 7 Professional SP1 > > > > We ran into some odd behavior with DBD::ODBC when we upgraded from > > 1.43 to > > 1.50 recently - previously-working insert statements (using > > placeholders) > > started failing with a "DBD::ODBC::st execute failed: > > [Microsoft][ODBC SQL > > Server Driver]String data, right truncation (SQL-22001)" error > > message - > > even if the only data being inserted was numeric. Not all inserts > > failed, > > but the majority did (982 out of 1000 would fail). I tried a little > > testing (test_load.pl, attached) and found that the first insert > > would > > succeed, but subsequent ones failed, regardless of the data values > > being > > inserted. I could get the inserts working if, instead of using > > placeholders, I built the statement anew for each row. (Of course, > > that > > came along with a significant performance hit.) > > > > Reverting to DBD-ODBC-1.43 resulted in all methods being able to > > successfully insert the data into our table. > > > > The output of the test script running with DBD-ODBC-1.50 is attached > > (test_output_DBD-ODBC-1.50.txt), as is the output of the same script > > running with DBD-ODBC-1.43 (test_output_DBD-ODBC-1.43.txt). > > > > If there's more info/traces I can gather that would be helpful, just > > let me > > know and I'd be happy to. > > > > Thank you for making DBD-ODBC possible! > > > > Laura > > lorgle@gmail.com
> > Thanks for the RT. > > Just to let you know I have reproduced it with you example and will > try and find the problem this weekend. > > Martin
Hi, I've fixed the problem. If you could let me know your real name I'll credit you with finding the issue in the Changes file. Would you be prepared to test the fix? If so, let me know and I'll mail you a new distribution. Martin -- Martin J. Evans Wetherby, UK
Download (untitled) / with headers
text/plain 2.4k
On Sat Jan 17 04:51:09 2015, MJEVANS wrote: Show quoted text
> On Sat Jan 17 04:16:34 2015, MJEVANS wrote:
> > On Fri Jan 16 17:57:34 2015, lorgle@gmail.com wrote:
> > > Hi there, > > > > > > Found this address as the quickest way to report a bug in DBD::ODBC > > > via > > > rt.cpan.org/Public/Bug/Report.html?Queue=DBD-ODBC so am writing. > > > > > > Distribution: DBD-ODBC-1.50 > > > Perl version: 5.20.1 (Strawberry perl, 32-bit version) > > > Operating System: MS Windows 7 Professional SP1 > > > > > > We ran into some odd behavior with DBD::ODBC when we upgraded from > > > 1.43 to > > > 1.50 recently - previously-working insert statements (using > > > placeholders) > > > started failing with a "DBD::ODBC::st execute failed: > > > [Microsoft][ODBC SQL > > > Server Driver]String data, right truncation (SQL-22001)" error > > > message - > > > even if the only data being inserted was numeric. Not all inserts > > > failed, > > > but the majority did (982 out of 1000 would fail). I tried a > > > little > > > testing (test_load.pl, attached) and found that the first insert > > > would > > > succeed, but subsequent ones failed, regardless of the data values > > > being > > > inserted. I could get the inserts working if, instead of using > > > placeholders, I built the statement anew for each row. (Of course, > > > that > > > came along with a significant performance hit.) > > > > > > Reverting to DBD-ODBC-1.43 resulted in all methods being able to > > > successfully insert the data into our table. > > > > > > The output of the test script running with DBD-ODBC-1.50 is > > > attached > > > (test_output_DBD-ODBC-1.50.txt), as is the output of the same > > > script > > > running with DBD-ODBC-1.43 (test_output_DBD-ODBC-1.43.txt). > > > > > > If there's more info/traces I can gather that would be helpful, > > > just > > > let me > > > know and I'd be happy to. > > > > > > Thank you for making DBD-ODBC possible! > > > > > > Laura > > > lorgle@gmail.com
> > > > Thanks for the RT. > > > > Just to let you know I have reproduced it with you example and will > > try and find the problem this weekend. > > > > Martin
> > Hi, > > I've fixed the problem. > > If you could let me know your real name I'll credit you with finding > the issue in the Changes file. > > Would you be prepared to test the fix? If so, let me know and I'll > mail you a new distribution. > > Martin
I've uploaded 1.51_3 and 1.51_4 development releases which should fix your issue. Martin -- Martin J. Evans Wetherby, UK
Subject: Re: [rt.cpan.org #101579] Resolved: Issue with bound parameters in DBD-ODBC 1.50 (DB is SQLServer 2008 10.0.5500)
Date: Sat, 17 Jan 2015 08:26:53 -0800
To: bug-DBD-ODBC [...] rt.cpan.org
From: laura <lorgle [...] gmail.com>
Download (untitled) / with headers
text/plain 601b
Fantastic, thanks! Having trouble with the bitcard login so hopefully this will get back to you. My full name is Laura Cox and I'll be happy to test out the fix - won't be back in the office till Monday but will download the new releases then to test. Many thanks for the quick action on this. Laura On Sat, Jan 17, 2015 at 7:08 AM, Martin J Evans via RT < bug-DBD-ODBC@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=101579 > > > According to our records, your request has been resolved. If you have any > further questions or concerns, please respond to this message. >
Download (untitled) / with headers
text/plain 869b
On Sat Jan 17 11:27:28 2015, lorgle@gmail.com wrote: Show quoted text
> Fantastic, thanks! Having trouble with the bitcard login so hopefully this > will get back to you. > > My full name is Laura Cox and I'll be happy to test out the fix - won't be > back in the office till Monday but will download the new releases then to > test. > > Many thanks for the quick action on this. > > Laura
Thanks Laura. I've updated the changes file and it will be in the next release. In the meantime either of 1.51_3 or 1.51_4 should contain the fix for you but I'd obviously prefer you to try 1.51_4. See the Changes file for the reason for the problem you found but basically it boils down to improving the unicode support which broke your case with numerics. Please get back to me with results. You can also find me as mje on irc.perl.org in #dbi. Martin -- Martin J. Evans Wetherby, UK
Subject: Re: [rt.cpan.org #101579] Issue with bound parameters in DBD-ODBC 1.50 (DB is SQLServer 2008 10.0.5500)
Date: Mon, 19 Jan 2015 06:31:19 -0800
To: bug-DBD-ODBC [...] rt.cpan.org
From: laura <lorgle [...] gmail.com>
Download (untitled) / with headers
text/plain 1.2k
Hi Martin, I installed 1.51_4 and tested out our loading script and everything worked successfully. Thanks again for your quick action on this! Laura On Sat, Jan 17, 2015 at 8:47 AM, Martin J Evans via RT < bug-DBD-ODBC@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=101579 > > > On Sat Jan 17 11:27:28 2015, lorgle@gmail.com wrote:
> > Fantastic, thanks! Having trouble with the bitcard login so hopefully
> this
> > will get back to you. > > > > My full name is Laura Cox and I'll be happy to test out the fix - won't
> be
> > back in the office till Monday but will download the new releases then to > > test. > > > > Many thanks for the quick action on this. > > > > Laura
> > Thanks Laura. I've updated the changes file and it will be in the next > release. > > In the meantime either of 1.51_3 or 1.51_4 should contain the fix for you > but I'd obviously prefer you to try 1.51_4. > > See the Changes file for the reason for the problem you found but > basically it boils down to improving the unicode support which broke your > case with numerics. > > Please get back to me with results. > > You can also find me as mje on irc.perl.org in #dbi. > > Martin > -- > Martin J. Evans > Wetherby, UK >
Download (untitled) / with headers
text/plain 499b
On Mon Jan 19 09:31:59 2015, lorgle@gmail.com wrote: Show quoted text
> Hi Martin, > > I installed 1.51_4 and tested out our loading script and everything > worked > successfully. > > Thanks again for your quick action on this! > > Laura
Hi Laura, Thanks for coming back and confirming that. Also, it makes it so much easier to find an issue when the reporter provides a self contained script demonstrating the problem. So, you helped yourself get a quicker reponse ;-) Martin -- Martin J. Evans Wetherby, UK


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.