MySQL Forums
Forum List  »  InnoDB

is there a Recordcount for records modified inside transactions?
Posted by: sean smith
Date: July 16, 2009 01:12PM

I want to start a transaction and then attempt to update a record. If the id doesn't exists, it will fail, so I haven't updated any records. How can I figure out whether or not something was updated? I have heard of an inner-transactional "counter" that records how many records have been modified - called Recordcount, but it seems it only exists in other dbs.

I am trying to figure out if there is a way to achieve the "UPDATE ON DUPLICATE KEY" using:

UPDATE

IF recordcount = 0

INSERT

As well, I am curious if anyone can point me anywhere that I might be able to figure out what's happening behind the scenes when we do "UPDATE ON DUPLICATE KEY" - ie. is it a performance gain to use duplicate key if we look at what's actually going on?

Options: ReplyQuote


Subject
Views
Written By
Posted
is there a Recordcount for records modified inside transactions?
3150
July 16, 2009 01:12PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.