Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re: Mysql handle not in asynchronous mode

by Anonymous Monk
on Jul 16, 2011 at 06:39 UTC ( #914806=note: print w/replies, xml ) Need Help??

in reply to Mysql handle not in asynchronous mode

and am wondering if this is the cause and the solution of my problem. Would a DBI/mysql savvy monk kindly elucidate?

That would seem to be the cause of your problems -- turning on this async feature, means you have to wait after execute before you can fetch

So the solution would be to comb your code (or whatever abstraction you're using), to make sure async is turned off

Or add the loop as per async docs, to wait before fetching

  • Comment on Re: Mysql handle not in asynchronous mode

Replies are listed 'Best First'.
Re^2: Mysql handle not in asynchronous mode
by punkish (Priest) on Jul 16, 2011 at 15:57 UTC
    I am not using any abstraction... just pure DBI. And, I have done nothing to turn on the async feature. In fact, now your reply has confused me even more, as you seem to imply that I might have that feature on, and that I have to try and turn it off. I thought it was just the other way around.

    I am making Ajax calls. It could be that Dancer, which tends to use a lot of global cars, is causing this problem. But, these calls are to separate Starman instances, albeit on the same computer, and they are making separate calls the the db, albeit, the same db.

    addendum: the above note is confusing, so I would appreciate some explanation. Wouldn't it be normal to first execute and then fetch? After all, that is how my code is written. As I said above in my OP, Perl doesn't just jump over lines of code. So, the only conclusion I can derive is that one call to the db is made, and before the db can respond to it, another call comes in. The db gets confused, and tries to fetch (from the first call) on the second call that hasn't executed yet. This would imply that there is namespace pollution going on... vars from different web calls are clobbering each other.

    when small people start casting long shadows, it is time to go to bed

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://914806]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2018-01-16 10:04 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (176 votes). Check out past polls.