[freetds] goodread... not so fine
alex.kiesel at document-root.de
Mon Jan 26 04:08:25 EST 2004
On Mon, 2004-01-19 at 12:29, Alex Kiesel wrote:
> Sqsh is not a multithreaded application, but it indeed issues a cancel
> within the signal handler. It does two thing from within this handler:
> * send a cancel
> * set a global variable which gets checked in all normal 'result
> processing loops'. Those loops are left when this variable is set to
> '1'. One excerpt:
I've written a patch, which should fix FreeTDS cancel behaviour in
The problem has indeed been in reading from / writing to the wire while
within an interrupt handler. When remodelling Sybase behaviour more
exact, that is, waiting for the next "normal access" to the data and
just then executing the cancellation, it seems to work fine.
After having a (short) look at dblib and odbc, I've come to the
conclusion that the problem is a pure ctlib problem and thus should be
fixed in ct.c, not in the tds layer:
* dblib does not have an asynchronous cancel (or am I wrong here)
* ODBC must handle multithreaded applications in SQLCancel which is
something completely different as what ctlib has to do.
Next to my patch, I'm sending a unittest for ctlib (t0010.c), which
simulates what I did manually with sqsh.
Could someone have a look at it, please?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2992 bytes
Desc: not available
Url : http://lists.ibiblio.org/pipermail/freetds/attachments/20040126/4fb99474/attachment.bin
More information about the FreeTDS