Skip to Content.
Sympa Menu

freetds - [freetds] [unixODBC][Driver Manager]Function sequence error (SQL-HY010)

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Bower, Wayne (Wayne)" <Wayne.Bower AT lsi.com>
  • To: "FreeTDS AT lists.ibiblio.org" <FreeTDS AT lists.ibiblio.org>
  • Subject: [freetds] [unixODBC][Driver Manager]Function sequence error (SQL-HY010)
  • Date: Fri, 2 Mar 2012 16:43:39 -0500

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

perl v5.14.1
DBI 1.616
DBD::ODBC 1.33
freeTDS 0.91 and unixODBC

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

I also have debugio14_dbi.log (the DBI_TRACE output) if that helps, but it
will exceed the mail message size limit.

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 cases
that fail issue the message '[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 our old install of perl 5.8.7, DBI 1.616,
DBD::ODBC 1.16, freeTDS 0.64 with iodbc.

The DBD::ODBC developer already reviewed this and believes the issue to be
with freeTDS 0.91 since he doesn't see the problem using both of the
following:
Easysoft SQL Server ODBC Driver and unixODBC driver manager
MS ODBC Driver manager and MS SQL Server ODBC Driver

Attachment: debugio14.log
Description: debugio14.log

Attachment: debugio14.pl
Description: debugio14.pl




Archive powered by MHonArc 2.6.24.

Top of Page