Test fixes for Postgres and MySQL