Skip navigation links

MySQL Forums :: MySQL & Virtualization :: select now(); doesn't change


Advanced Search

Re: select now(); doesn't change
Posted by: Tom Hanlon ()
Date: December 02, 2009 11:56PM

Replication set the time to the server time of the master,

It does this by wrapping each binlog event in a

set timestamp statement.

You must have run this in a client or something.

mysql> SET TIMESTAMP=1259819684;
Query OK, 0 rows affected (0.02 sec)

mysql> select now();
+---------------------+
| now() |
+---------------------+
| 2009-12-03 00:54:44 |
+---------------------+
1 row in set (0.00 sec)

mysql> select now();
+---------------------+
| now() |
+---------------------+
| 2009-12-03 00:54:44 |
+---------------------+
1 row in set (0.00 sec)

mysql> SET TIMESTAMP=0;
Query OK, 0 rows affected (0.00 sec)

mysql> select now();
+---------------------+
| now() |
+---------------------+
| 2009-12-03 00:56:17 |
+---------------------+
1 row in set (0.00 sec)

mysql>

Options: ReplyQuote


Subject Written By Posted
select now(); doesn't change Dirk Müller 11/23/2009 11:06AM
Re: select now(); doesn't change Dirk Müller 11/24/2009 03:57AM
Re: select now(); doesn't change Tom Hanlon 12/02/2009 11:56PM
Re: select now(); doesn't change Robert Giffords 01/06/2010 04:55PM


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.