Re: do_attr in SQLConnect.c is broken on some myodbc versions (data loss bug)
Nick Gorham <[email protected]> Wed, 31 Jul 2013 19:53:16 +0100
| Newsgroups | gmane.comp.db.unixodbc.devel |
|---|---|
| Message-ID | <[email protected]> |
On 31/07/13 03:05, Andy Lutomirski wrote:
> do_attr in SQLConnect.c does this:
>
> if ( value_set )
> {
> if (CHECK_SQLSETCONNECTATTR( connection ))
> {
> SQLSETCONNECTATTR(connection,
> connection -> driver_dbc,
> attr3,
> value,
> sizeof( value ));
>
> That checks for function[61]->func.
>
> My copy of libmyodbc5.so provides SQLSetConnectAttrW and
> MySQLSetConnectAttr. This means that ->funcW and ->funcA get set, but
> ->func does not (I haven't tried to follow all the machinations
> involved in this).
>
> The upshot is that CHECK_SQLSETCONNECTATTR is false. This causes
> SQL_ATTR_AUTOCOMMIT to have no effect if set to false before
> SQLDriverConnect gets called. This is a data loss bug.
I have checked in what should be a fix for this and its in the 2.3.2pre
tarball.
--
Nick
_______________________________________________
unixODBC-dev mailing list
[email protected]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev