Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: july [...] imperia.bg
Cc:
AdminCc:

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



Subject: Invalid precision value error
Date: Fri, 07 Nov 2014 19:26:33 +0200
To: bug-DBD-ODBC [...] rt.cpan.org
From: Julian <july [...] imperia.bg>
Hello, I'm getting the following error: [Microsoft][ODBC Driver 11 for SQL Server]Invalid precision value (SQL-HY104) This happens for: INSERT into binary_meta VALUES (?, ?, ?, ?, ?, ?) EOF where the problematic column is of type VARBINARY(MAX). The setup is Linux (x64bit Ubuntu 14.04 and CentOS 5.9) client with SQL Server 2008 R2 SP2. The linux driver is the one officially provided by Microsoft: libmsodbcsql-11.0.so.2270.0 (Microsoft ODBC Driver 11 for SQL Server) http://www.microsoft.com/en-us/download/details.aspx?id=36437 plus unixODBC 2.3.0 (prerequirement). Perl versions (5.18.2 and 5.8.8) DBD::ODBC version 1.50 My workaround for this issue is by adding the following code at: dbdimp.c:4180: if (phs->sql_type == SQL_VARBINARY && phs->param_size == 0 && phs->requested_type == 0 && imp_dbh->driver_type == DT_DONT_CARE && strstr(imp_dbh->odbc_driver_name, "libmsodbcsql-11") == imp_dbh->odbc_driver_name && strcmp(imp_dbh->odbc_dbms_name, "Microsoft SQL Server") == 0 ) { /* printf("Driver name: %s\n", imp_dbh->odbc_driver_name); printf("Driver type: %d\n", imp_dbh->driver_type); printf("ODBC DBMS: %s\n", imp_dbh->odbc_dbms_name); printf("Request type: %d\n", phs->requested_type); printf("Param size: %d\n", phs->param_size); # Driver name: libmsodbcsql-11.0.so.2270.0 # Driver type: 0 # ODBC DBMS: Microsoft SQL Server # Request type: 0 # Param size: 0 */ column_size = 0; } This fix is tested against our (software) complete test suits and it looks ok. However I'm not sure whether the DBD::ODBC driver should also take extra care of other column types. Also it seems that the official ODBC driver for Linux, released by Microsoft is not exactly supported by the DBD::ODBC, since the driver_type is DT_DONT_CARE :) Regards, Julian Lishev
On Fri Nov 07 12:27:04 2014, july@imperia.bg wrote: Show quoted text
> Hello, > > I'm getting the following error: > > [Microsoft][ODBC Driver 11 for SQL Server]Invalid precision value > (SQL-HY104) > > This happens for: > INSERT into binary_meta > VALUES (?, ?, ?, ?, ?, ?) > EOF > > where the problematic column is of type VARBINARY(MAX). > > The setup is Linux (x64bit Ubuntu 14.04 and CentOS 5.9) client with SQL > Server 2008 R2 SP2. > The linux driver is the one officially provided by Microsoft: > libmsodbcsql-11.0.so.2270.0 (Microsoft ODBC Driver 11 for SQL Server) > http://www.microsoft.com/en-us/download/details.aspx?id=36437 > plus unixODBC 2.3.0 (prerequirement). > > Perl versions (5.18.2 and 5.8.8) > DBD::ODBC version 1.50 > > My workaround for this issue is by adding the following code at: > > dbdimp.c:4180: > > if (phs->sql_type == SQL_VARBINARY > && phs->param_size == 0 && phs->requested_type == 0 > && imp_dbh->driver_type == DT_DONT_CARE > && strstr(imp_dbh->odbc_driver_name, "libmsodbcsql-11") > == imp_dbh->odbc_driver_name > && strcmp(imp_dbh->odbc_dbms_name, "Microsoft SQL Server") == 0 > ) { > /* > printf("Driver name: %s\n", imp_dbh->odbc_driver_name); > printf("Driver type: %d\n", imp_dbh->driver_type); > printf("ODBC DBMS: %s\n", imp_dbh->odbc_dbms_name); > printf("Request type: %d\n", phs->requested_type); > printf("Param size: %d\n", phs->param_size); > > # Driver name: libmsodbcsql-11.0.so.2270.0 > # Driver type: 0 > # ODBC DBMS: Microsoft SQL Server > # Request type: 0 > # Param size: 0 > */ > > column_size = 0; > } > > This fix is tested against our (software) complete test suits and it > looks ok. However I'm not sure whether the DBD::ODBC driver should also > take extra care of other column types. > Also it seems that the official ODBC driver for Linux, released by > Microsoft is not exactly supported by the DBD::ODBC, since the > driver_type is DT_DONT_CARE :) > > Regards, > Julian Lishev
Julian, Thanks for reporting this issue. Is all of that code an addition? You are right wrt areas in the code which are MS SQL Server specific - the driver you are using should not be DT_DONT_CARE. I don't have that driver so I'm assuming from the above your driver name is libmsodbcsql-11.0.so.2270.0 and I will need to make sure that sets either DT_SQL_SERVER_NATIVE_CLIENT or DT_SQL_SERVER. I'm guessing the latter as that is the newer one. Could you provide a small self contained script I can use to reproduce then I will check it out and make the changes. Martin -- Martin J. Evans Wetherby, UK
Subject: Re: [rt.cpan.org #100186] Invalid precision value error
Date: Tue, 11 Nov 2014 16:03:10 +0200
To: bug-DBD-ODBC [...] rt.cpan.org
From: Julian <july [...] imperia.bg>
Hi Martin, Here is the patch file: ---------------------------- --- dbdimp2.c 2014-11-11 14:08:26.739154650 +0200 +++ dbdimp.c 2014-11-11 15:29:08.419093790 +0200 @@ -4177,6 +4177,25 @@ * sloi = -500100 ps=0 sqlt=-3 (SQL_VARBINARY) * sloi = 4001 ps=0 sqlt=-9 (SQL_WVARCHAR) <--- this one fails without above */ + if (phs->sql_type == SQL_VARBINARY && phs->param_size == 0 + && phs->requested_type == 0 && imp_dbh->driver_type == DT_DONT_CARE + && strstr(imp_dbh->odbc_driver_name, "libmsodbcsql-11") + == imp_dbh->odbc_driver_name + && strcmp(imp_dbh->odbc_dbms_name, "Microsoft SQL Server") == 0 ) { + /* + printf("Driver name: %s\n", imp_dbh->odbc_driver_name); + printf("Driver type: %d\n", imp_dbh->driver_type); + printf("ODBC DBMS: %s\n", imp_dbh->odbc_dbms_name); + printf("Request type: %d\n", phs->requested_type); + printf("Param size: %d\n", phs->param_size); + # Driver name: libmsodbcsql-11.0.so.2270.0 + # Driver type: 0 + # ODBC DBMS: Microsoft SQL Server + # Request type: 0 + # Param size: 0 + */ + column_size = 0; + } /*printf("sloi = %d ps=%d sqlt=%d\n", strlen_or_ind, phs->param_size, phs->sql_type);*/ My /etc/odbc.ini config: ---------------------------- [VirtualODBC] Description = VirtualODBC Driver = /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0 Database = imperia_i10 Server = 10.29.0.184,1433 AutoTranslate = No My /etc/odbcinst.ini config: ---------------------------- [VirtualODBC] Description=Microsoft ODBC Driver 11 for SQL Server Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0 Threading=1 UsageCount=1 The test script: ---------------------------- #!/usr/bin/perl use strict; use warnings; use DBI; use Storable qw (thaw); my ($dsn, $user, $pwd) = ($ARGV[0], $ARGV[1], $ARGV[2]); print "Connecting to the ODBC database.\n"; my $h = DBI->connect("dbi:ODBC:$dsn", $user, $pwd, { AutoCommit => 0, PrintError => 1, RaiseError => 1, }); eval { local $h->{'PrintError'} = 0; local $h->{'RaiseError'} = 0; $h->do(q/drop table metavarbin/); $h->commit; }; print "Create 'metavarbin' test table.\n"; $h->do(<<EOF); CREATE TABLE "metavarbin" ( "doc_id" INTEGER, "meta_name" VARCHAR (255), "meta_value" VARBINARY(MAX), "meta_idx" INTEGER, "from_ver" BIGINT, "to_ver" BIGINT, PRIMARY KEY("doc_id", "meta_name", "meta_idx", "from_ver", "to_ver")); EOF $h->commit; $h->do(<<EOF); CREATE INDEX "metavarbin_idx" ON "metavarbin"("doc_id"); EOF $h->commit; my $sth = $h->prepare('INSERT into metavarbin VALUES (?, ?, ?, ?, ?, ?)'); my @args = (1234, 'name', " " x 8001, 0, '1234567890', '1234567899'); print "Insert VARBINARY data over 8k.\n"; $sth->execute(@args); # Changing the data to prevent errors due PK constraint. $args[0] = $args[0] . '1'; print "Insert VARBINARY data up to 8k.\n"; $args[2] = " " x 8000; $sth->execute(@args); $args[0] = $args[0] . '1'; print "Insert VARBINARY data over 8k again.\n"; $args[2] = " " x 8001; #use DBI ':sql_types'; #$sth->bind_param(3, undef, {TYPE => SQL_VARBINARY}); $sth->execute(@args); $h->commit; # $ perl odbc.pl VirtualODBC user password I've spent some time writing this script since it wasn't obvious what is actually happening. In our software we (re)use prepared statements for performance reasons. The problem is related to the 8000 size limit, but it does not affect the first execute() call, but rather the second one that exceed the 8k limit. I've tried all types of bind_param variations to overcome and rebind the params for the second call, but no luck. Additionally, in our software we use "bytes" over "utf-8", so we have disabled every conversion setting to utf that exists, but it seems this is not related to this problem after all, at least this is still reproducible with the perl script. Another issue I'm not sure what is the origin - if I uncomment the 'bind_param' lines at the end of the script I still receive the "[Microsoft][ODBC Driver 11 for SQL Server]Invalid precision value (SQL-HY104)" which probably means I don't know how to properly bind, by hand, that problematic column (VARBINARY(MAX)) with or without my patch. Probably that is another bug or some kind of knowledge lack on my side. Regards, Julian Lishev
On Tue Nov 11 13:50:28 2014, july@imperia.bg wrote: Show quoted text
> Hi Martin, > > Here is the patch file: > ---------------------------- > > --- dbdimp2.c 2014-11-11 14:08:26.739154650 +0200 > +++ dbdimp.c 2014-11-11 15:29:08.419093790 +0200 > @@ -4177,6 +4177,25 @@ > * sloi = -500100 ps=0 sqlt=-3 (SQL_VARBINARY) > * sloi = 4001 ps=0 sqlt=-9 (SQL_WVARCHAR) <--- this one fails > without above > */ > + if (phs->sql_type == SQL_VARBINARY && phs->param_size == 0 > + && phs->requested_type == 0 && imp_dbh->driver_type == DT_DONT_CARE > + && strstr(imp_dbh->odbc_driver_name, "libmsodbcsql-11") > + == imp_dbh->odbc_driver_name > + && strcmp(imp_dbh->odbc_dbms_name, "Microsoft SQL Server") == 0 ) { > + /* > + printf("Driver name: %s\n", imp_dbh->odbc_driver_name); > + printf("Driver type: %d\n", imp_dbh->driver_type); > + printf("ODBC DBMS: %s\n", imp_dbh->odbc_dbms_name); > + printf("Request type: %d\n", phs->requested_type); > + printf("Param size: %d\n", phs->param_size); > + # Driver name: libmsodbcsql-11.0.so.2270.0 > + # Driver type: 0 > + # ODBC DBMS: Microsoft SQL Server > + # Request type: 0 > + # Param size: 0 > + */ > + column_size = 0; > + } > > /*printf("sloi = %d ps=%d sqlt=%d\n", strlen_or_ind, > phs->param_size, phs->sql_type);*/ > > > My /etc/odbc.ini config: > ---------------------------- > > [VirtualODBC] > Description = VirtualODBC > Driver = /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0 > Database = imperia_i10 > Server = 10.29.0.184,1433 > AutoTranslate = No > > > My /etc/odbcinst.ini config: > ---------------------------- > > [VirtualODBC] > Description=Microsoft ODBC Driver 11 for SQL Server > Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0 > Threading=1 > UsageCount=1 > > > The test script: > ---------------------------- > > #!/usr/bin/perl > > use strict; > use warnings; > use DBI; > use Storable qw (thaw); > > my ($dsn, $user, $pwd) = ($ARGV[0], $ARGV[1], $ARGV[2]); > > print "Connecting to the ODBC database.\n"; > my $h = DBI->connect("dbi:ODBC:$dsn", $user, $pwd, > { > AutoCommit => 0, > PrintError => 1, > RaiseError => 1, > }); > > eval { > local $h->{'PrintError'} = 0; > local $h->{'RaiseError'} = 0; > $h->do(q/drop table metavarbin/); > $h->commit; > }; > > print "Create 'metavarbin' test table.\n"; > $h->do(<<EOF); > CREATE TABLE "metavarbin" ( > "doc_id" INTEGER, > "meta_name" VARCHAR (255), > "meta_value" VARBINARY(MAX), > "meta_idx" INTEGER, > "from_ver" BIGINT, > "to_ver" BIGINT, > PRIMARY KEY("doc_id", "meta_name", "meta_idx", "from_ver", "to_ver")); > EOF > $h->commit; > > $h->do(<<EOF); > CREATE INDEX "metavarbin_idx" ON "metavarbin"("doc_id"); > EOF > $h->commit; > > my $sth = $h->prepare('INSERT into metavarbin VALUES (?, ?, ?, ?, ?, ?)'); > > my @args = (1234, 'name', " " x 8001, 0, '1234567890', '1234567899'); > > print "Insert VARBINARY data over 8k.\n"; > $sth->execute(@args); > > # Changing the data to prevent errors due PK constraint. > $args[0] = $args[0] . '1'; > print "Insert VARBINARY data up to 8k.\n"; > $args[2] = " " x 8000; > $sth->execute(@args); > > $args[0] = $args[0] . '1'; > print "Insert VARBINARY data over 8k again.\n"; > $args[2] = " " x 8001; > > #use DBI ':sql_types'; > #$sth->bind_param(3, undef, {TYPE => SQL_VARBINARY}); > > $sth->execute(@args); > > $h->commit; > > > # $ perl odbc.pl VirtualODBC user password > > I've spent some time writing this script since it wasn't obvious what is > actually happening. In our software we (re)use prepared statements for > performance reasons. The problem is related to the 8000 size limit, but > it does not affect the first execute() call, but rather the second one > that exceed the 8k limit. > > I've tried all types of bind_param variations to overcome and rebind the > params for the second call, but no luck. > > Additionally, in our software we use "bytes" over "utf-8", so we have > disabled every conversion setting to utf that exists, but it seems this > is not related to this problem after all, at least this is still > reproducible with the perl script. > > Another issue I'm not sure what is the origin - if I uncomment the > 'bind_param' lines at the end of the script I still receive the > "[Microsoft][ODBC Driver 11 for SQL Server]Invalid precision value > (SQL-HY104)" which probably means I don't know how to properly bind, by > hand, that problematic column (VARBINARY(MAX)) with or without my patch. > Probably that is another bug or some kind of knowledge lack on my side. > > Regards, > Julian Lishev
Wow Julian, I wish everyone who reported an issue did as much work to help identify the problem. Since my first reply I've tried to reproduce your problem with our MS SQL Server driver and could not so in the hope you would provide a reproducible script I've downloaded and installed the MS driver you are using. I'll look into your solution and also the issues you have when uncommented the bind params at the end of the script. Hopefully, I'll be in a position to provide a new version you can try by the weekend. BTW, the driver you are using is the same codebase as the Windows MS native client driver so I've already fixed the issue of the workarounds in DBD::ODBC for MS SQL Server not working with the linux driver. Any column which uses MAX is a PITA because the driver does not report a size for the parameter. This seems to be the case that MS added max support to MS SQL Server before realising it didn't fit into ODBC too well. Rhanks again for the detailed info - I'll get back to you soon. Martin -- Martin J. Evans Wetherby, UK
First interesting point is that script works perfectly on Windows using the SQL Server ODBC Driver or the native client driver without your patch. It also works with the bind_param uncommented at the end of the script. So it would seem the linux driver is different from the native client windows driver in some way or there is a difference due to the sql server databases we are using. Will try again tomorrow with the linux driver I installed at work. Martin -- Martin J. Evans Wetherby, UK
Subject: Re: [rt.cpan.org #100186] Invalid precision value error
Date: Wed, 12 Nov 2014 13:48:16 +0200
To: bug-DBD-ODBC [...] rt.cpan.org
From: Julian <july [...] imperia.bg>
Hi Martin, Thanks for the feedback. I'm using SQL Server 2008 R2 SP2 (Express Edition). But indeed, that worked quite well before with both Windows client and server. When I had a Windows based test machine, I've successfully run all the tests, by using DSN with "SQL Server" or "SQL Server Native Client" ODBC driver and DBD-ODBC 1.35 (the latest version of the StateAactive's repository for my older Perl). So, yes. I guess the problem is with the Linux driver, compiled by the Microsoft. Let me know if you need tips how to install their package (I can forward you my documentation to your personal email). Julian
On Wed Nov 12 06:48:47 2014, july@imperia.bg wrote: Show quoted text
> Hi Martin, > > Thanks for the feedback. > > I'm using SQL Server 2008 R2 SP2 (Express Edition). > > But indeed, that worked quite well before with both Windows client and > server. When I had a Windows based test machine, I've successfully run > all the tests, by using > DSN with "SQL Server" or "SQL Server Native Client" ODBC driver and > DBD-ODBC 1.35 (the latest version of the StateAactive's repository for > my older Perl). > > So, yes. I guess the problem is with the Linux driver, compiled by the > Microsoft. Let me know if you need tips how to install their package (I > can forward you my documentation to your personal email). > > Julian
The machine I was installing the MS linux driver on is not accessible to me today unfortunately. I have an ubuntu machine I could use. If you think your notes might work for ubuntu send them to my cpan address please - mjevans@cpan.org. Martin -- Martin J. Evans Wetherby, UK
This driver even segfaults in 2nd connect call in 02simple.t test! Issue reproduced at last so now I can start looking for a workaround. Martin -- Martin J. Evans Wetherby, UK
On Wed Nov 12 12:08:10 2014, MJEVANS wrote: Show quoted text
> This driver even segfaults in 2nd connect call in 02simple.t test! > > Issue reproduced at last so now I can start looking for a workaround. > > Martin
OOPS, your test code works (with last bind_param still commented out) without your patch. It still continues to work when I make the following change to recognise it: diff --git a/dbdimp.c b/dbdimp.c index 35dd369..d56dec1 100644 --- a/dbdimp.c +++ b/dbdimp.c @@ -29,9 +29,8 @@ * http://perldoc.perl.org/perlguts.html#Formatted-Printing-of-IVs,-UVs,-and-NVs * http://cpansearch.perl.org/src/RURBAN/illguts-0.44/index.html * Internal replacements for standard C library functions: - * http://search.cpan.org/~jesse/perl-5.12.1/pod/perlclib.pod + * http://perldoc.perl.org/perlclib.html * http://search.cpan.org/dist/Devel-PPPort/PPPort.pm - * * MS ODBC 64 bit: * http://msdn.microsoft.com/en-us/library/ms716287%28v=vs.85%29.aspx */ @@ -6541,7 +6540,8 @@ static int post_connect( if (strcmp(imp_dbh->odbc_driver_name, "SQLSRV32.DLL") == 0) { imp_dbh->driver_type = DT_SQL_SERVER; } else if ((strcmp(imp_dbh->odbc_driver_name, "sqlncli10.dll") == 0) || - (strcmp(imp_dbh->odbc_driver_name, "SQLNCLI.DLL") == 0)) { + (strcmp(imp_dbh->odbc_driver_name, "SQLNCLI.DLL") == 0) || + (strcasestr(imp_dbh->odbc_driver_name, "libmsodbcsql") == 0)) { imp_dbh->driver_type = DT_SQL_SERVER_NATIVE_CLIENT; } else if (strcmp(imp_dbh->odbc_driver_name, "odbcjt32.dll") == 0) { imp_dbh->driver_type = DT_MS_ACCESS_JET; Last bind_param (when uncommented) does still fail. So it appears I have not reproduced it after all. perl rt100186.pl Connecting to the ODBC database. Create 'metavarbin' test table. Insert VARBINARY data over 8k. Insert VARBINARY data up to 8k. Insert VARBINARY data over 8k again. use strict; use warnings; use DBI; use Storable qw (thaw); print "Connecting to the ODBC database.\n"; my $h = DBI->connect("dbi:ODBC:xxx", "xxx", "xxx", { AutoCommit => 0, PrintError => 1, RaiseError => 1, }); eval { local $h->{'PrintError'} = 0; local $h->{'RaiseError'} = 0; $h->do(q/drop table metavarbin/); $h->commit; }; print "Create 'metavarbin' test table.\n"; $h->do(<<EOF); CREATE TABLE "metavarbin" ( "doc_id" INTEGER, "meta_name" VARCHAR (255), "meta_value" VARBINARY(MAX), "meta_idx" INTEGER, "from_ver" BIGINT, "to_ver" BIGINT, PRIMARY KEY("doc_id", "meta_name", "meta_idx", "from_ver", "to_ver")); EOF $h->commit; $h->do(<<EOF); CREATE INDEX "metavarbin_idx" ON "metavarbin"("doc_id"); EOF $h->commit; my $sth = $h->prepare('INSERT into metavarbin VALUES (?, ?, ?, ?, ?, ?)'); my @args = (1234, 'name', " " x 8001, 0, '1234567890', '1234567899'); print "Insert VARBINARY data over 8k.\n"; $sth->execute(@args); # Changing the data to prevent errors due PK constraint. $args[0] = $args[0] . '1'; print "Insert VARBINARY data up to 8k.\n"; $args[2] = " " x 8000; $sth->execute(@args); $args[0] = $args[0] . '1'; print "Insert VARBINARY data over 8k again.\n"; $args[2] = " " x 8001; #use DBI ':sql_types'; #$sth->bind_param(3, undef, {TYPE => SQL_VARBINARY}); #$sth->execute(@args); $h->commit; uncomment last few lines and I do get: Connecting to the ODBC database. Create 'metavarbin' test table. Insert VARBINARY data over 8k. Insert VARBINARY data up to 8k. Insert VARBINARY data over 8k again. DBD::ODBC::st execute failed: [Microsoft][ODBC Driver 11 for SQL Server]Invalid precision value (SQL-HY104) at rt100186.pl line 37. DBD::ODBC::st execute failed: [Microsoft][ODBC Driver 11 for SQL Server]Invalid precision value (SQL-HY104) at rt100186.pl line 37. Issuing rollback() due to DESTROY without explicit disconnect() of DBD::ODBC::db handle gangrad at rt100186.pl line 37. Martin -- Martin J. Evans Wetherby, UK
# osname=linux, osvers=3.13.0-32-generic, archname=x86_64-linux # Using DBI 1.632 # Using DBD::ODBC 1.50 # Using DBMS_NAME 'Microsoft SQL Server' # Using DBMS_VER '11.00.2100' # Using DRIVER_NAME 'libmsodbcsql-11.0.so.2270.0' # Using DRIVER_VER '11.00.2270' # odbc_has_unicode 0 Also tried with odbc_has_unicode=1 Test script runs fine. I'm using SQL Server Express 64bit version 11.0.2100.60 Martin -- Martin J. Evans Wetherby, UK
Subject: Re: [rt.cpan.org #100186] Invalid precision value error
Date: Wed, 12 Nov 2014 19:31:48 +0200
To: bug-DBD-ODBC [...] rt.cpan.org
From: Julian <july [...] imperia.bg>
Hi Martin, I've noticed that you have commented out the last execute() statement: #$sth->execute(@args); That last one is always needed to reproduce the issue. Running the first execute() should be ok, although it passes the limit of 8k. The second execute() should be ok, becuase it is exactly 8k and the third one should fail because it runs with data bigger than 8k. The other reported issue what if uncomment the "bind_param". Julian
Subject: Re: [rt.cpan.org #100186] Invalid precision value error
Date: Wed, 12 Nov 2014 19:50:19 +0200
To: bug-DBD-ODBC [...] rt.cpan.org
From: Julian <july [...] imperia.bg>
I can reproduce it on two different machines: CentOS 5.9: Linux xxxxx 2.6.18-348.el5 #1 SMP Tue Jan 8 17:53:53 EST 2013 x86_64 x86_64 x86_64 GNU/Linux Here, without need for any "hacks", i.e. library dependencies to satisfy, so I guess there is no room for a big configuration mistakes on our server. Also the DBD::ODBC tests fails when I run them. Ubuntu 14.04: Linux yyyyy 3.13.0-39-generic #66-Ubuntu SMP Tue Oct 28 13:30:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux That is my primary dev machine and I had to do a small tweaks (as you saw in my installation tips). The common ground between those two is the SQL Server (2008 R2 Express Edition) : Product: Microsoft SQL Server Express Edition with Advanced Services (64-bit) Version: 10.50.1600.1 Server Collation: SQL_Latin1_General_CP1_CI_AS Regards, Julian
On Wed Nov 12 12:32:06 2014, july@imperia.bg wrote: Show quoted text
> Hi Martin, > > I've noticed that you have commented out the last execute() statement: > > #$sth->execute(@args); > > That last one is always needed to reproduce the issue. Running the first > execute() should be ok, although it passes the limit of 8k. The second > execute() should be ok, becuase it is exactly 8k and the third one > should fail because it runs with data bigger than 8k. > > The other reported issue what if uncomment the "bind_param". > > Julian
ok, sorry, I misunderstood. It is probably reproduced then but I'll have to check tomorrow. I put it on a virtual box which is using nat and cannot get at it from here. I did run with no lines commented out on Windows and it was ok. Martin -- Martin J. Evans Wetherby, UK
I have actually found a native client driver on Windows which your script fails with. I also have this reproduced in Linux with MS's linux driver. I have fixed the issue as can be seen in the following git diff. https://github.com/perl5-dbi/DBD-ODBC/commit/cdddb4f8e8dc3d8a7cd7aad481e22aa24e0c5d2d If I did a delveopment release (1.51_1) which incorporated this change would you be prepared to try it out? Martin -- Martin J. Evans Wetherby, UK
Subject: Re: [rt.cpan.org #100186] Invalid precision value error
Date: Fri, 14 Nov 2014 14:08:51 +0200
To: bug-DBD-ODBC [...] rt.cpan.org
From: Julian <july [...] imperia.bg>
On 14/11/14 13:44, Martin J Evans via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=100186 > > > I have actually found a native client driver on Windows which your script fails with. I also have this reproduced in Linux with MS's linux driver. I have fixed the issue as can be seen in the following git diff. > > https://github.com/perl5-dbi/DBD-ODBC/commit/cdddb4f8e8dc3d8a7cd7aad481e22aa24e0c5d2d > > If I did a delveopment release (1.51_1) which incorporated this change would you be prepared to try it out? > > Martin
Sure, I'll try it when you are ready.
On Fri Nov 14 07:09:18 2014, july@imperia.bg wrote: Show quoted text
> > On 14/11/14 13:44, Martin J Evans via RT wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=100186 > > > > > I have actually found a native client driver on Windows which your > > script fails with. I also have this reproduced in Linux with MS's > > linux driver. I have fixed the issue as can be seen in the following > > git diff. > > > > https://github.com/perl5-dbi/DBD- > > ODBC/commit/cdddb4f8e8dc3d8a7cd7aad481e22aa24e0c5d2d > > > > If I did a delveopment release (1.51_1) which incorporated this > > change would you be prepared to try it out? > > > > Martin
> Sure, I'll try it when you are ready.
It is on its way to the CPAN - may take a while to be seen on whatever mirror you are using. Martin -- Martin J. Evans Wetherby, UK
Subject: Re: [rt.cpan.org #100186] Invalid precision value error
Date: Fri, 14 Nov 2014 16:15:01 +0200
To: bug-DBD-ODBC [...] rt.cpan.org
From: Julian <july [...] imperia.bg>
On 14/11/14 15:00, Martin J Evans via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=100186 > > > It is on its way to the CPAN - may take a while to be seen on whatever mirror you are using. > > Martin
It seems that the new version works well on both CentOS and Ubuntu. Our test suits are running without errors. My pl script works as expected too. The only thing that still fails are the DBD::ODBC own tests, but I guess you'll handle them later :) Julian
On Fri Nov 14 09:15:37 2014, july@imperia.bg wrote: Show quoted text
> On 14/11/14 15:00, Martin J Evans via RT wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=100186 > > > > > It is on its way to the CPAN - may take a while to be seen on > > whatever mirror you are using. > > > > Martin
> > It seems that the new version works well on both CentOS and Ubuntu. > Our > test suits are running without errors. My pl script works as expected > too. > The only thing that still fails are the DBD::ODBC own tests, but I > guess > you'll handle them later :) > > Julian
Thanks Julian. Your efforts are much appreciated. I will look at the test failures but some are going to be a real pain as I get a segfault during one test. I'll mark this issue fixed in 1.51_1. Martin -- Martin J. Evans Wetherby, UK