On Wed, May 14, 2008 at 03:12:27PM -0700, Dean Arnold wrote: > (DBI 1.604, DBD::ODBC 1.15, WinXP, AS 5.8.8) > > I'm trying to test cancel of long running queries > via DBD::ODBC (using psqlodbc driver). I've written > a small proxy which injects 10+ second delays in > delivery of queries from client to server. And I've > managed to get SIGINT signals delivered to my app. > But it appears that DBD::ODBC doesn't appear to > believe the stmt handle is active when I cancel it. > I hacked DBD::ODBC's dbdimp.c:odbc_cancel() to > add printf's on entry, if no stmt is active, > or if SQLCancel fails. When I run the test and > hit ctrl-C, odbc_cancel() does get called, *but* > it reports no active statement. > > So I commented out the Active test in odbc_cancel(), > and then everything works as expected. > > Is this a known sequencing problem ? Is Active not getting > set until the rows start returning ? If so, shouldn't it get > set immediately upon calling SQLExecute ?
I don't think it should be checking the Active flag at all. Active (which is poorly named) wouldn't be set for an UPDATE statement, for example, but you'd still want to be able to cancel it. Tim.
