MySQL: INSERT .... ON DUPLICATE KEY UPDATE: affected-rows == 3?
===

The MySQL documentation states that when using INSERT ... ON DUPLICATE KEY UPDATE, the affected-rows value will be 1 when a record was inserted, 2 if an existing record was updated.

We're getting an affected-rows value of 3 when a record is updated, although I'm only seeing this when the updates are performed via MySQL calls using Connector-J from Java; when I invoke the stored procedure from the MySQL Workbench, I get the expected result of 2 rows updated.

Does anyone have any idea what this might mean?  Is this perhaps a Connector-J annomaly?  I'd be inclined to just run with it, but without a reasonable explanation, I'm left with concerns for my data integrity (which is, after all, one of the reasons to check the affected-rows value).

MySQL server version: 5.1.57; Connector-J version: 5.1.7 (Java 1.6)

<b>Additional details:</b>
This is the table being modified:

    CREATE TABLE `UserContactProperty` (
      `id` int(11) NOT NULL AUTO_INCREMENT,
      `UserContactId` int(11) NOT NULL,
      `Property` varchar(45) NOT NULL,
      `Value` tinytext,
      `Date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
      PRIMARY KEY (`id`),
      UNIQUE KEY `Contact-Property` (`UserContactId`,`Property`),
      KEY `FK_UserContact` (`UserContactId`),
      CONSTRAINT `FK_UserContact` FOREIGN KEY (`UserContactId`) REFERENCES `UserContact` (`id`) ON   DELETE CASCADE ON UPDATE CASCADE
    ) ENGINE=InnoDB AUTO_INCREMENT=28685 DEFAULT CHARSET=latin1

The stored procedure performing the insert/update is as follows:

    CREATE PROCEDURE `setUserContactProperty`(
        UID VARCHAR(50),
        CID INT,
        Prop VARCHAR(45),
        Val TINYTEXT
    )
    BEGIN
        INSERT INTO UserContactProperty ( UserContactId, Property, Value )
            VALUES ( CID, Prop, Val )
            ON DUPLICATE KEY UPDATE Value = Val, Date = CURRENT_TIMESTAMP;
    END


