Skip to Content.
Sympa Menu

freetds - Re: [freetds] FreeTDS 0.64RC2 src/odbc/unittests/raiserror failure with unixODBC 2.2.11

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: entropy AT freetds.org
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] FreeTDS 0.64RC2 src/odbc/unittests/raiserror failure with unixODBC 2.2.11
  • Date: Thu, 22 Jun 2006 21:58:47 -0400

ZIGLIO, Frediano, VF-IT wrote:
ZIGLIO, Frediano, VF-IT wrote:

I use this line to configure my tests

LDFLAGS='-lgcov' CFLAGS='-O0 -pipe -g -fprofile-arcs

-ftest-coverage' sh autogen.sh --enable-extra-checks --prefix=$HOME/install --with-odbc-nodm=/usr --with-gnutls


in other words... no DM at all... if you think is stupid to always
suggest DM and do not use it I have to say that is a

nightmare to make


all DMs happy so many time ago I decided to get rid of all these
problems and do not use for tests...

Thanks, the test succeeds after I rebuilt with no DM.

Now that I know how to make the unit test pass, I also need messages/errors handled properly in my production environment. I'm running with FreeTDS 0.64RC2 and unixODBC 2.2.11 right now,

and there
are some message/error oddities I've had to work around.



Which oddities??

I haven't had time to narrow it down and put together a coherent description of what's going on, so I apologize for this hand-waving. But briefly, under certain circumstances messages are being lost, errors are being lost, and messages are being displayed in the wrong order. For example, with a query "print 'a' print 'b' print 'c' print 'd'" I get the output in my log in reverse order:

ODBC Message: SQLState 01000 ErrorMessage [unixODBC][FreeTDS][SQL Server]d NativeServerError 0
ODBC Message: SQLState 01000 ErrorMessage [unixODBC][FreeTDS][SQL Server]c NativeServerError 0
ODBC Message: SQLState 01000 ErrorMessage [unixODBC][FreeTDS][SQL Server]b NativeServerError 0
ODBC Message: SQLState 01000 ErrorMessage [unixODBC][FreeTDS][SQL Server]a NativeServerError 0



:(
I don't understand the reason why they came in reverse order... is DM or
a rank_errors problem? Could you post a short test?

I don't understand why either. I did hack on it a bit but haven't yet found the source of the problem. I don't think rank_errors is at fault, because I dummied out rank_errors with an immediate return and it had the same behavior.

Did you use SQLError or SQLGetDiag*?

I'm not calling either one directly. It's a DBI program, using DBD::ODBC with an odbc_err_handler callback. With so many layers of indirection involved, I couldn't figure out which component was at fault.

--
Cheers,
entropy




Archive powered by MHonArc 2.6.24.

Top of Page