Upsert with autoincrement

This branch fixes the problem that does change the value in the column with primary key on upsert.
Especially,  when the caller calls insert() with the value: AUTO_INCREMENT_VALUE and
the unique key (not primary key) is duplicated, the column of the primary key changes to 0
(atucal value of AUTO_INCREMENT_VALUE).