[DBAgentMySQL] Fix a problem that lastUpsertDidUpdate() causes exception

When a record is updated by the same data, mysql_affected_rows()
returns 0. But the previous implementation doesn't care it.

http://dev.mysql.com/doc/refman/5.6/en/mysql-affected-rows.html