Bug #35806 The current system time becomes stagnant after Restore operation is complete.

Submitted: 3 Apr 2008 15:50 Modified: 11 Aug 2008 20:28
Reporter: Hema Sridharan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Backup Severity:S3 (Non-critical)
Version:mysql-6.0-backup OS:Linux
Assigned to: Chuck Bell CPU Architecture:Any

[3 Apr 2008 15:50] Hema Sridharan
Description:
1) I create database and tables in database.
2) I backup the database and check the current time
3) I drop database and perform restore .
4) I check the current time after performing restore in every 2 to 5 minute interval and the time doesn't change and becomes stagnant.

How to repeat:
mysql> create database event;
Query OK, 1 row affected (0.00 sec)

mysql> use event;
Database changed
mysql> set time_zone='+0:00';
Query OK, 0 rows affected (0.00 sec)

mysql> show variables like '%zone%';
+------------------+--------+
| Variable_name    | Value  |
+------------------+--------+
| system_time_zone | GMT    |
| time_zone        | +00:00 |
+------------------+--------+
2 rows in set (0.01 sec)

mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2008-04-03 15:35:31 |
+---------------------+
1 row in set (0.00 sec)

mysql> create table t1(name varchar(10), start timestamp default 0);
Query OK, 0 rows affected (0.04 sec)

mysql> insert into t1 values('aa','2008-04-03 10:37:34');
Query OK, 1 row affected (0.00 sec)

mysql> select * from t1;
+------+---------------------+
| name | start               |
+------+---------------------+
| aa   | 2008-04-03 10:37:34 |
+------+---------------------+
1 row in set (0.00 sec)

mysql> backup database event to '/data2/heman/backup_dmp/events/event';
+-----------+
| backup_id |
+-----------+
| 1         |
+-----------+
1 row in set (0.08 sec)

After backup checking the current time.

mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2008-04-03 15:38:23 |
+---------------------+
1 row in set (0.01 sec)

mysql> drop database event;
Query OK, 1 row affected (0.00 sec)

After dropping checking the time ,shows the correct time

mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2008-04-03 15:38:40 |
+---------------------+
1 row in set (0.00 sec)

mysql> restore from '/data2/heman/backup_dmp/events/event';
+-----------+
| backup_id |
+-----------+
| 3         |
+-----------+
1 row in set (0.08 sec)

mysql> select * from t1;
+------+---------------------+
| name | start               |
+------+---------------------+
| aa   | 2008-04-03 10:37:34 |
+------+---------------------+
1 row in set (0.01 sec)

mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2008-04-03 15:40:50 |
+---------------------+
1 row in set (0.00 sec)

Checking time after 2 minute interval, still shows the same time when restore got completed.

mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2008-04-03 15:40:50 |
+---------------------+
1 row in set (0.00 sec)

checking time after 5 minute interval, shows the same time.

mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2008-04-03 15:40:50 |
+---------------------+
1 row in set (0.00 sec)

mysql> select localtime();
+---------------------+
| localtime()         |
+---------------------+
| 2008-04-03 15:40:50 |
+---------------------+
1 row in set (0.01 sec)

mysql> select curtime();
+-----------+
| curtime() |
+-----------+
| 15:40:50  |
+-----------+
1 row in set (0.00 sec)
[4 Apr 2008 16:55] MySQL Verification Team
Thank you for the bug report.
[12 Jun 2008 19:57] Chuck Bell
This bug is fixed by BUG#33573.
Patch queued for BUG#33573 on 12 June 2008.

Note: had to recommit patch due to bzr merge issue (yet unresolved) on Windows.

New commit (same patch) is:

http://lists.mysql.com/commits/47818
[8 Aug 2008 13:46] Chuck Bell
In main. Was fixed by BUG#33573
[8 Aug 2008 16:31] Chuck Bell
Fix was pushed into 6.0.6.
[11 Aug 2008 20:28] Paul DuBois
Noted in 6.0.6 changelog.

The current system time (as returned by NOW() or synonyms) became       
constant after a RESTORE operation.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.057 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
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.