merge where and update for upsert
Merge branch 'master' into ubuntu