[freetds] FreeTDS 0.64RC2 src/odbc/unittests/raiserror failure with unixODBC 2.2.11
James K. Lowden
jklowden at freetds.org
Wed Jun 21 06:36:10 EDT 2006
Frediano Ziglio wrote:
> Il giorno mar, 20/06/2006 alle 13.54 -0400, entropy at freetds.org ha
> > $ ./raiserror
> > odbctest
> > --------
> > connection parameters:
> > server: 'mdreports'
> > user: 'reportdbo'
> > password: '????'
> > database: 'reportdb'
> > use reportdb
> > CREATE PROCEDURE #tmp1
> > @InParam int,
> > @OutParam int OUTPUT,
> > @OutString varchar(20) OUTPUT
> > AS
> > SET @OutParam = @InParam
> > SET @OutString = 'This is bogus!'
> > SELECT 'Here is the first row' AS FirstResult
> > RAISERROR('An error occurred.', @InParam, 1)
> > SELECT 'Here is the last row' AS LastResult
> > RETURN (0)
> > RAISERROR('An error occurred.', 5, 1)
> > Result=0 DIAG REC 1: State=01000 Error=50000: [FreeTDS][SQL Server]An
> > error occurred.
> > Result=100 DIAG REC 1: State=00000 Error=0:
> > SQLGetDiagRec error!
> 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...
Oh dear. I thought this was fixed, once and for all.
DBD::ODBC is IMO one of the most important uses of the FreeTDS ODBC
driver. We can't tell people in the UG they can use it, and then say,
"Oh, by the way, error message handling works only without a DM, and we
don't know how to configure DBD::ODBC that way." Well, we *can*, but I
don't think we should.
Two choices on this front:
1. Document how to use DBD::ODBC without a DM.
2. Make src/odbc/unittests/raiserror work with a DM (any one!).
I can understand the frustration of trying to support many driver
managers, particularly because there are so many versions out there. I
don't think we're obliged to support every DM flavor, though. One would
I think it's enough to say "FreeTDS version 0.64 was tested with unixODBC
2.2.11" or whatever. That gives the user a starting point. We did just
that in our last release.
I also wonder whether the problem is in the DM or in our conformance to
the ODBC spec. Sybase makes an ODBC driver, and I'd be surprised if no DM
handled their messages correctly.
(I also know of course the 0.64 release has been long in gestation, to say
the least. I'm planning to finish it very soon, now that I have some
time. First I have to deal with sourceforge's CVS changes, then decide
what to do with the changes to 0.64 since rc2.)
Freddy, what do you think? How can we go about fixing this?
More information about the FreeTDS