Skip to Content.
Sympa Menu

freetds - Re: [freetds] supported ODBC attributes - progress

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] supported ODBC attributes - progress
  • Date: Fri, 7 Mar 2008 14:37:00 +0100

...
>
> > The fellow who maintains the OTL library wrote to me
> because our ODBC
> > driver faked him out:
> >
> > status=SQLSetConnectAttr
> > (hdbc,
> > SQL_ATTR_TXN_ISOLATION,
> > ...
> >
> > SQLGetInfo says the driver supports all isolation levels:
> >
> > case SQL_TXN_ISOLATION_OPTION:
> > /* TODO check SQLSetConnectAttr support */
> > UIVAL = SQL_TXN_READ_COMMITTED |
> > SQL_TXN_READ_UNCOMMITTED |
> > SQL_TXN_REPEATABLE_READ | SQL_TXN_SERIALIZABLE;
> >
> > SQLGetConnectAttr/SQLSetConnectAttr report success for all
> > those, and it's
> > faithfully stored in dbc->attr.txn_isolation.
> >
> > Trouble is, txn_isolation is never used. :-(
> >
>
> I saw. Perhaps the confusion is caused by SQLGetInfo that mix server
> informations with driver ones.
> I'll write a test to check what happen changing isolation level during
> connection, after connection and using implicit transactions in odbc.
>

Actually I added transaction level setting
http://freetds.cvs.sourceforge.net/freetds/freetds/src/odbc/unittests/tr
ansaction2.c?revision=1.1&view=markup
and a test
http://freetds.cvs.sourceforge.net/freetds/freetds/src/odbc/unittests/tr
ansaction2.c?revision=1.1&view=markup
still missing
- test setting before connection (shold work)
- test setting wrong constant (check error returned)
- test setting with active transaction (check error returned)
- test setting with pending data (check error returned)
I don't know if backporting or changing

case SQL_TXN_ISOLATION_OPTION:
/* TODO check SQLSetConnectAttr support */
UIVAL = SQL_TXN_READ_COMMITTED | SQL_TXN_READ_UNCOMMITTED |
SQL_TXN_REPEATABLE_READ | SQL_TXN_SERIALIZABLE;
break;

in

case SQL_TXN_ISOLATION_OPTION:
UIVAL = SQL_TXN_READ_COMMITTED;
break;

in 0.82 branch.

...

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page