refs #6090 fast upserts and updates

git-svn-id: file:///svn/mysql.com/mariadb-5.5.30@54904 c7de825b-a66e-492c-adef-691d508d4ae1