Several MySQL related fixes.