1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-16546 post-review fixes

* clarify the help text for --system-versioning-insert-history
* move the vers_write=false check from Item_field::fix_fields()
  next to other vers field checks in find_field_in_table()
* move row_start validation from handler::write_row() next to
  vers_update_fields()
* make secure_timestamp check to happen in one place only,
  extract it into a function is_set_timestamp_vorbidden().
* overwriting vers fields is an error, just like setting @@timestamp
* don't run vers_insert_history() for every row
This commit is contained in:
Sergei Golubchik
2022-09-06 19:28:42 +02:00
parent a2cda88631
commit 8d2ec37a40
16 changed files with 162 additions and 88 deletions

View File

@@ -434,6 +434,25 @@ x check_row_ts(row_start, row_end)
select row_start = '1980-01-01 00:00:00', row_end = '1980-01-01 00:00:01' from t3 for system_time all where x = 3;
row_start = '1980-01-01 00:00:00' row_end = '1980-01-01 00:00:01'
1 1
# why a slave cannot have system_versioning_insert_history always on
connection master;
set @@system_versioning_insert_history= 0;
set sql_mode='';
create or replace table t1 (a int,
rs timestamp(6) as row start, re timestamp(6) as row end,
period for system_time (rs,re)) with system versioning;
insert t1 values (1, '2000-01-01 02:03:04', '2001-01-01 02:03.04');
Warnings:
Warning 1906 The value specified for generated column 'rs' in table 't1' has been ignored
Warning 1906 The value specified for generated column 're' in table 't1' has been ignored
select a,check_row_ts(rs,re) from t1 for system_time all;
a check_row_ts(rs,re)
1 CURRENT ROW
connection slave;
select a,check_row_ts(rs,re) from t1 for system_time all;
a check_row_ts(rs,re)
1 CURRENT ROW
set sql_mode=default;
connection master;
drop tables t1, t2, t3;
include/rpl_end.inc