MySQL Forums
Forum List  »  General

Re: WHY: Same timestamp for two different records from two different sessions
Posted by: Kristijan Marin
Date: January 26, 2019 07:41PM

Hi,

I'm already back with the results ...

OK now I'm confused .... this is my trigger:

CREATE xxx_BEFORE_INSERT` BEFORE INSERT ON `messages` FOR EACH ROW BEGIN
SET NEW.lastupdate=UNIX_TIMESTAMP();
insert into i8_logs(message) VALUES (NEW.lastupdate);
END

After 4 inserts, my logs show different timestamps which is great, BUT the actual value of my 'lastupdate' of all 4 records is the same. And the value of 'lastupdate' is equal or greater then the last timestamp from the log ...

How is this even possible?

Thank you,
Kris

Options: ReplyQuote




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.