Added support for upserts on mysql