Subject: | [unixODBC][Driver Manager]Function sequence error (SQL-HY010) |
Date: | Fri, 2 Mar 2012 10:56:19 -0500 |
To: | "bug-DBD-ODBC [...] rt.cpan.org" <bug-DBD-ODBC [...] rt.cpan.org> |
From: | "Bower, Wayne (Wayne)" <Wayne.Bower [...] lsi.com> |
Found what looks like a bug and I did my best to reduce the code that reproduces to a small test case.
The code I reduced it to has no practical use other than to reveal what appears to be the bug and how I am able to work around it.
uname -a
Linux palltc04 2.6.9-89.0.20.EL.bz501565.11largesmp #1 SMP Tue Mar 23 04:20:50 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
This is perl 5, version 14, subversion 1 (v5.14.1) built for x86_64-linux-thread-multi-ld
DBI 1.616
DBD::ODBC 1.33
The 1st attachment (debugio14.pl) is the script that demonstrates the problem and how I'm attempting to work around it.
The 2nd attachment (debugio14.log) is from DBI_TRACE=15=debugio14_dbi.log ./debugio14 >debugio14.log 2>&1
And the 3rd attachment (debugio14_dbi.log) is the DBI_TRACE output.
Essentially the issue appears to be related to using 'SET NOCOUNT ON' in a stored procedure. The script creates a procedure and executes it. The first procedure and execution fails with 'Unable to fetch information about the error' while the remaining ones that fail return '[unixODBC][Driver Manager]Function sequence error (SQL-HY010)'. To avoid the failure I have to either remove 'SET NOCOUNT ON' or move later in the procedure. Keep in mind that this is just a test case to reveal the issue. In our actual code we always start each procedure with 'SET NOCOUNT ON' and do much more than shown in this test case.
We don't see this problem using older perl 5.8.7, DBI 1.616, DBD::ODBC 1.16, tds 0.64, iodbc
Please let me know if more information is needed.
Thank you,
Wayne Bower
Message body is not shown because sender requested not to inline it.
Message body not shown because it is not plain text.
Message body not shown because it is not plain text.