Skip to Content.
Sympa Menu

freetds - RE: [freetds] odbc isql

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] odbc isql
  • Date: Fri, 8 Apr 2005 09:20:37 +0200

>
> http://www.schemamania.org/projects/freetds/samples/isql.c
>
> I'm hacking the unixodbc isql and deciding if we want it
> included in our
> tree.
>
> My version is considerable simpler than the original: no html, no
> delimited output, no fancy help. More like tsql for odbc.
> My objective
> is to have a very simple (but complete) isql for FreeTDS that
> we can use
> to test ODBC functionality. I'm considering writing scripts
> against it
> for regression testing.
>
> The motivation will be clear to anyone who's read the list
> this week. The
> just-released 0.63 odbc driver doesn't handle row-error-row situations
> correctly: the second resultset is concatenated to the first
> one, and the
> first resultset's final row is duplicated. That's a data corruption
> issue, and the mere fact that it crept into a release says
> the testing was
> (by definition) not good enough. I'm looking to make better testing
> easier, on the theory that what's easy will happen more.
>

Well, if you read my mail you will discover 4 bugs:
- 1 MS odbc driver
- 2 FreeTDS
- 1 DBD::ODBC

However the issue came from DBD::ODBC that do not handle SQLMoreResults
if it returns SQL_ERROR. It works on MS odbc driver only because MS odbc
driver discard error...
I'm updating raiserror.c test to catch this case (and do some fix)

I'm not that happy to include an isql in FreeTDS, it seems a
duplication. Normal ODBC programmers should use DM and is a bad idea to
distribute an ODBC example that do not use DM. However I must say that
writing tests is very hard and a way to script them would help a lot.
Perl is not a good solution cause it not easy to have right
perl/DBI/DBD::ODBC installed.

It seems that DMs are quite different so (as anyone can see) tests
present small differences using different DM...

Also keep in mind that many tests require different way to get data. You
can bind data before or after query, prepare or not the query, fetch
data with binding, use SQLGetData (or a mix of the two or not fetch but
only skip rows..), read column/row number or not, read all rows or
not... Your "isql" have to be capable to combine all possibility. Also
different db engine versions (sybase, mssql or even the same but
different version) have different behavior (ie ASE 11.5 support
DATE/TIME).

To improve test accuracy I would implement a test coverage script using
GCC... I think that many functions still lack a test.

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page