mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
versioning: use @@timestamp
Don't use hidden system time in versioning, but keep the system time logic in THD to workaround low-res system clock and replication not versioned to versioned. This reverts MDEV-14788 (System versioning cannot be based on local timestamps, as it is now). Versioning is based on local timestamps again, but timestamps are protected by MDEV-15923 (option to control who can set session @@timestamp).
This commit is contained in:
@@ -1571,7 +1571,7 @@ static bool check_vers_constants(THD *thd, partition_info *part_info)
|
||||
my_tz_OFFSET0->TIME_to_gmt_sec(<ime, &error);
|
||||
if (error)
|
||||
goto err;
|
||||
if (vers_info->hist_part->range_value <= thd->systime())
|
||||
if (vers_info->hist_part->range_value <= thd->query_start())
|
||||
vers_info->hist_part= el;
|
||||
}
|
||||
return 0;
|
||||
@@ -5310,7 +5310,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->systime())
|
||||
if (hist_part->range_value <= thd->query_start())
|
||||
hist_part->part_state= PART_CHANGED;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user