Comment 18 for bug 1514608

Revision history for this message
Aaron Wells (u-aaronw) wrote :

I did a search through the Mahara code base for "db_start()", and found over 200 places where we use it. Some of these are reasonable, a few SQL queries together in the same function. Others are quite wide-ranging, like the collection copy. Or they do things like trigger events before calling db_commit(), which, depending on the registered event handlers, can lead to a lot of code getting executed.

That's interesting, those deadlock log files are definitely from the DB that I was running Mahara against (I made direct DB updates and saw them reflected in the web application). And the copy task did error out, with the errors coming from the mysqli driver saying "deadlock": [1213: Deadlock found when trying to get lock; try restarting transaction]

But perhaps mysqli means something different by "deadlock" than the MySQL InnoDB engine does? Or maybe there's some kind of logging setting in this DB that's making it not show up?