don't use tmp tables for mysql
reorder pre/post execute calls so they won't interfere with getting the auto increment id.