mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +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:
@@ -5575,7 +5575,7 @@ public:
|
||||
lex= backup_lex;
|
||||
}
|
||||
|
||||
bool vers_insert_history(const Field *field) const
|
||||
bool vers_insert_history(const Field *field)
|
||||
{
|
||||
if (!field->vers_sys_field())
|
||||
return false;
|
||||
@@ -5590,22 +5590,7 @@ public:
|
||||
lex->sql_command != SQLCOM_REPLACE_SELECT &&
|
||||
lex->sql_command != SQLCOM_LOAD)
|
||||
return false;
|
||||
switch (opt_secure_timestamp)
|
||||
{
|
||||
case SECTIME_NO:
|
||||
return true;
|
||||
case SECTIME_SUPER:
|
||||
if (security_ctx->master_access & SUPER_ACL)
|
||||
return true;
|
||||
return false;
|
||||
case SECTIME_REPL:
|
||||
if (slave_thread)
|
||||
return true;
|
||||
return false;
|
||||
case SECTIME_YES:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
return !is_set_timestamp_forbidden(this);
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user