in reply to fetchrow_hashref failed problem

what does the sql say? What is the return value of the execute call?

The way forward always starts with a minimal test.

Replies are listed 'Best First'.
Re^2: fetchrow_hashref failed problem
by dcunningham (Sexton) on Jul 21, 2015 at 01:34 UTC
    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.

      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.
      Is RaiseError set? If you get the deadlock error, you should not fetch again, you should start the whole transaction over again.