Fix for upsert select with autocommit on when run client side