diff options
author | Nikita Malyavin <nikitamalyavin@gmail.com> | 2020-07-21 13:06:36 +1000 |
---|---|---|
committer | Nikita Malyavin <nikitamalyavin@gmail.com> | 2020-07-21 13:06:36 +1000 |
commit | 879223f1f296d749b8135d23a05e5dd899667975 (patch) | |
tree | 42ba99126236cf4eafcbbd5fc3349e3b4ea81014 | |
parent | adcddca83833a3e69c2cfc71eff30c9894621234 (diff) | |
download | mariadb-git-bb-10.5-MDEV-16039-nikita.tar.gz |
move fix_vcol_exprs into TABLEbb-10.5-MDEV-16039-nikita
-rw-r--r-- | sql/sql_base.cc | 10 | ||||
-rw-r--r-- | sql/table.h | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index cd13985894c..45ce4be3eb5 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -5332,18 +5332,18 @@ static void mark_real_tables_as_free_for_reuse(TABLE_LIST *table_list) DBUG_VOID_RETURN; } -static int fix_table_vcol_exprs(THD *thd, TABLE *t) +int TABLE::fix_vcol_exprs(THD *thd) { - for (Field **vf= t->vfield; vf && *vf; vf++) + for (Field **vf= vfield; vf && *vf; vf++) if (fix_session_vcol_expr(thd, (*vf)->vcol_info)) return 1; - for (Field **df= t->default_field; df && *df; df++) + for (Field **df= default_field; df && *df; df++) if ((*df)->default_value && fix_session_vcol_expr(thd, (*df)->default_value)) return 1; - for (Virtual_column_info **cc= t->check_constraints; cc && *cc; cc++) + for (Virtual_column_info **cc= check_constraints; cc && *cc; cc++) if (fix_session_vcol_expr(thd, (*cc))) return 1; @@ -5371,7 +5371,7 @@ static bool fix_all_session_vcol_exprs(THD *thd, TABLE_LIST *tables) if (table->security_ctx) thd->security_ctx= table->security_ctx; - error= fix_table_vcol_exprs(thd, t); + error= t->fix_vcol_exprs(thd); thd->security_ctx= save_security_ctx; thd->stmt_arena= stmt_backup; diff --git a/sql/table.h b/sql/table.h index f719a0d03a2..cef6861f6b5 100644 --- a/sql/table.h +++ b/sql/table.h @@ -1760,6 +1760,8 @@ public: void vers_update_end(); void find_constraint_correlated_indexes(); + int fix_vcol_exprs(THD *thd); + /** Number of additional fields used in versioned tables */ #define VERSIONING_FIELDS 2 }; |