Improved gerrit backed so it works with MySQL 5.6.