MySQL Forums
Forum List  »  Replication

Re: measuring slave lag without sysdate() - 4.1.13
Posted by: Rick James
Date: February 09, 2012 11:05AM

> the slave insert shows exactly the same time as the master insert
That is deliberate.

The SELECT on the _slave_ reads that value (the Master's clock) and the Slaves clock (NOW()). The difference is the replication delay.

You cannot tell when the INSERT happened on the Slave.

So...
Do the INSERT on the Master every second.
Check as often as you like on the Slave.

Don't do an INSERT -- do an UPDATE -- and keep the table at only 1 row!

(AFAIK, This behaviour has always been the case. Are you saying it changed sometime after 4.1.13?)

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: measuring slave lag without sysdate() - 4.1.13
1120
February 09, 2012 11:05AM


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.