1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

fix THD::system_time to follow, well, system time

Because NOW() is set to system time, unless overriden.
And both should follow big manual system time changes,
while still coping with lowres system clocks.

Ignoring system time changes is both confusing and
breaks with restarts.
This commit is contained in:
Sergei Golubchik
2018-02-25 12:55:12 +01:00
parent 30981dcf56
commit ac2d4d49a0
6 changed files with 37 additions and 33 deletions

View File

@ -1574,7 +1574,7 @@ static bool check_vers_constants(THD *thd, partition_info *part_info)
my_tz_OFFSET0->TIME_to_gmt_sec(&ltime, &error);
if (error)
goto err;
if (vers_info->hist_part->range_value <= thd->system_time)
if (vers_info->hist_part->range_value <= thd->systime())
vers_info->hist_part= el;
}
return 0;
@ -5314,7 +5314,7 @@ that are reorganised.
if (*fast_alter_table && tab_part_info->vers_info->interval.is_set())
{
partition_element *hist_part= tab_part_info->vers_info->hist_part;
if (hist_part->range_value <= thd->system_time)
if (hist_part->range_value <= thd->systime())
hist_part->part_state= PART_CHANGED;
}
}