Re: DBD::ODBC and cancel()



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.
.



Relevant Pages

  • DBD::ODBC and cancel()
    ... I'm trying to test cancel of long running queries ... delivery of queries from client to server. ... believe the stmt handle is active when I cancel it. ... query is still pending in the proxy when I hit ctrl-C, ...
    (perl.dbi.users)
  • Re: Melbourne Australia~Postmark query.
    ... The term "LC List" is used in a number of contexts (eg *Library of ... Congress" subject list for libraries). ... to ensure that the item was directed to the correct delivery route. ... the other cancel on Bruno's cover says "G.D.B. ...
    (rec.collecting.stamps.discuss)
  • Re: Online order - where do I stand?
    ... I placed an order for a washing machine online on the 2nd May. ... I asked about delivery, ... they are obliged to cancel. ... to cancel the contract no later than seven working days of receipt. ...
    (uk.legal)
  • Re: One TV shopping Channel
    ... > Anyone had experience of the One TV shopping Channel? ... On 22nd October I had a call from them promising delivery ... them 7 days to cancel, if no cancel then contact the cc company. ... tumbleweednews at hotmail dot com ...
    (uk.media.tv.sky)
  • Re: Online order - where do I stand?
    ... I placed an order for a washing machine online on the 2nd May. ... I asked about delivery, ... they are obliged to cancel. ... wish to cancel your contract under the distance selling act. ...
    (uk.legal)