in reply to Re: fetchrow_hashref failed problem
in thread fetchrow_hashref failed problem

We get:
DBD::mysql::st execute failed: Deadlock found when trying to get lock; + try restarting transaction at /path/to/Database.pm line 313. DBD::mysql::st fetchrow_hashref failed: fetch() without execute() at / +path/to/Database.pm line 315.
Now the deadlock is not unexpected - we just want to deal with it gracefully and not get the fetchrow_hashref error.

Replies are listed 'Best First'.
Re^3: fetchrow_hashref failed problem
by 1nickt (Canon) on Jul 21, 2015 at 02:23 UTC

    are you sure they are from the same call? Assuming you are looping through something, could this be relevant from the docs?

    If execute() is called on a statement handle that's still active ($sth +->{Active} is true) then it should effectively call finish() to tidy +up the previous execution results before starting this new execution.
    The way forward always starts with a minimal test.
Re^3: fetchrow_hashref failed problem
by runrig (Abbot) on Jul 21, 2015 at 17:13 UTC
    Is RaiseError set? If you get the deadlock error, you should not fetch again, you should start the whole transaction over again.