diff options
author | Sergei Golubchik <serg@mariadb.org> | 2022-05-08 15:02:19 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2022-05-08 23:03:08 +0200 |
commit | a70a1cf3f4ed10c9d9194b2b8df6b6f08551a937 (patch) | |
tree | 517124ec5059f48bff1e02b934355e8162183efc /sql/sql_lex.h | |
parent | 40b8f3ec1a76fc23eb6bf9c5a8fef1debcbf5843 (diff) | |
parent | 79660e59ee8fcd23f928c72dc77682b875bd58ce (diff) | |
download | mariadb-git-a70a1cf3f4ed10c9d9194b2b8df6b6f08551a937.tar.gz |
Merge branch '10.3' into 10.4
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r-- | sql/sql_lex.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 6a3a01f69d6..3db50222a27 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -4436,6 +4436,29 @@ public: return create_info.vers_info; } + /* The list of history-generating DML commands */ + bool vers_history_generating() const + { + switch (sql_command) + { + case SQLCOM_DELETE: + return !vers_conditions.delete_history; + case SQLCOM_UPDATE: + case SQLCOM_UPDATE_MULTI: + case SQLCOM_DELETE_MULTI: + case SQLCOM_REPLACE: + case SQLCOM_REPLACE_SELECT: + return true; + case SQLCOM_INSERT: + case SQLCOM_INSERT_SELECT: + return duplicates == DUP_UPDATE; + case SQLCOM_LOAD: + return duplicates == DUP_REPLACE; + default: + return false; + } + } + int add_period(Lex_ident name, Lex_ident_sys_st start, Lex_ident_sys_st end) { if (lex_string_cmp(system_charset_info, &start, &end) == 0) |