greg(a)svn.wikimedia.org wrote:
Revision: 37062
Author: greg
Date: 2008-07-04 15:57:44 +0000 (Fri, 04 Jul 2008)
Log Message:
-----------
Properly handle the 'IGNORE' option passed to the insert funtion:
rather than just turning off errors, do some savepoint trickery
so we end at the same state as when we started, to emulate
MySQL's INSERT...IGNORE. Bug 14708.
I'm not sure, but the impression I get from this code is that the query
will be aborted and rolled back when it reaches a key conflict. This
sounds like it will behave the same as MySQL's INSERT IGNORE only for
the special case where a single row is being inserted.
When inserting multiple rows, the end state should be that all
non-conflicting rows are successfully inserted, while conflicting rows
are silently dropped.
When we ask for the number of affected rows after the query, we should
get a count of the rows which were inserted.
-- brion vibber (brion @
wikimedia.org)