summaryrefslogtreecommitdiff
path: root/sql/sql_partition.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-05-02 21:53:12 +0200
committerSergei Golubchik <serg@mariadb.org>2018-05-12 10:16:46 +0200
commita4272bf154acf0e35b4b678812024b43a0c57829 (patch)
treeb586567adc4344660452561cf578260ae4a3c8f5 /sql/sql_partition.cc
parent4203f572aeebb55ad97c9576d58c0a14ed73862a (diff)
downloadmariadb-git-a4272bf154acf0e35b4b678812024b43a0c57829.tar.gz
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).
Diffstat (limited to 'sql/sql_partition.cc')
-rw-r--r--sql/sql_partition.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc
index c2534a9962e..f7cd6c2a71e 100644
--- a/sql/sql_partition.cc
+++ b/sql/sql_partition.cc
@@ -1571,7 +1571,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->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;
}
}