List:MySQL++« Previous MessageNext Message »
From:Nick Hall Date:February 22 2008 5:14pm
Subject:Proper way to detect deadlocks?
View as plain text  
Hello,

I've been using MySQL++ for several years now and it works great. Recently,
as one of my applications has been used more, I've started having deadlocks
occur periodically. According to the mysql website (
http://dev.mysql.com/doc/refman/4.1/en/innodb-deadlocks.html) "you must
write your applications so that they are always prepared to re-issue a
transaction if it gets rolled back because of a deadlock." As of MySQL++
2.1.1, a deadlock issues a BadQuery exception with the text: "Deadlock found
when trying to get lock; try restarting transaction". I obviously don't want
to do string parsing to determine if a deadlock has occurred -- is there a
way to detect deadlocks in a better fashion? I realize my version of MySQL++
is somewhat old, but I looked through the changelock and documentation and
could not find any indication that there is now some sort of deadlock
exception -- if there is, I could upgrade. What is the proper way to detect
deadlocks with MySQL++? Thanks,

Nick

Thread
Proper way to detect deadlocks?Nick Hall22 Feb
  • Re: Proper way to detect deadlocks?Warren Young22 Feb