summaryrefslogtreecommitdiff
path: root/mysys/my_getsystime.c
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2019-09-03 15:28:32 +0200
committerSergei Golubchik <serg@mariadb.org>2019-09-04 09:30:43 +0200
commit647d5b243020b799fd7112a801965f5780b86349 (patch)
tree4e2e51c35a17b8824271375cc243312568b9b5ee /mysys/my_getsystime.c
parent08b01ace8a7284272662c793b3d93b3ddddc7123 (diff)
downloadmariadb-git-647d5b243020b799fd7112a801965f5780b86349.tar.gz
MDEV-20079 When setting back the system time while mysqld is running, NOW() and UNIX_TIMESTAMP() results get stuck
typo. system_time.start wasn't updated when system_time.sec and system_time.sec_part were.
Diffstat (limited to 'mysys/my_getsystime.c')
-rw-r--r--mysys/my_getsystime.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mysys/my_getsystime.c b/mysys/my_getsystime.c
index 677da45ecea..18218c2e8de 100644
--- a/mysys/my_getsystime.c
+++ b/mysys/my_getsystime.c
@@ -99,6 +99,8 @@ my_hrtime_t my_hrtime()
while (gettimeofday(&t, NULL) != 0) {}
hrtime.val= t.tv_sec*1000000ULL + t.tv_usec;
#endif
+ DBUG_EXECUTE_IF("system_time_plus_one_hour", hrtime.val += 3600*1000000ULL;);
+ DBUG_EXECUTE_IF("system_time_minus_one_hour", hrtime.val -= 3600*1000000ULL;);
return hrtime;
}