Interesting deadlock situation in MySQL and its solution
blog.tekenlight.com