fix freeing pooled mysql connection when prepareCached is used