Re: Time for a release?
"ZIGLIO, Frediano, VF-IT" <[email protected]>
| Newsgroups | gmane.comp.db.unixodbc.devel |
|---|---|
| Message-ID | <[email protected]> |
> On 29/07/2011 07:35, ZIGLIO, Frediano, VF-IT wrote: > >> Hi, > >> > >> I think it may be worth turning 2.3.1pre into a 2.3.1 release. > >> > >> Does anyone have any outstanding issues with 2.3.1pre that > they would > >> like resolving before I do the release? > >> > > Did you fix the SQLCancel thread problem? > > SQLCancel can be called from another thread to cancel for > instance a > > SQLExecDirect on the same statement with any threading > model just stop > > due to lock waiting SQLExecDirect to finish instead of > cancelling it. > > > > Regards, > > Frediano > > Well, the default is to assume the driver is thread safe so > there is no restriction on when the driver is called. > > if thats the problem you refer to. > > If the driver isnt thread safe, then this will still fail, > but if the driver isn't thread safe what can I do? > Just downloaded last stable version (2.3.0) and checked. The default threading level is 3 that is lock the entire environment (see thread_protect). When you enter into SQLCancel a thread_protect( SQL_HANDLE_STMT, statement ) is called so it blocks (cause you entered in the same lock in SQLExecDirect). The only way to get corrent thread behavior for threads is setting Threading to 0 in odbcinst.ini or odbc.ini. Well, our driver is not fully thread safe (i recommend Threading=2, not even 3) but the current default (serialize everything) is too much. I see this cause we have a unittest (cancel) that hang using unixODBC. I think it would be fine to add an extension to unixODBC in order to get the safe threading model directly from driver (I'd like even an exception for SQLCancel but I'm asking too much). Frediano _______________________________________________ unixODBC-dev mailing list [email protected] http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev