diff options
author | Alexander Barkov <bar@mariadb.com> | 2019-10-01 10:50:32 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.com> | 2019-10-01 11:44:27 +0400 |
commit | 1ae09ec8636be184d8a1017381a7d533f2bb29c9 (patch) | |
tree | 7723af89a724cb6337e480ac31621c33d0056584 /sql/table.cc | |
parent | 4cd79588deb1b49499ff1f49bcf7f17f00eb241a (diff) | |
parent | dc588e3d3fc0d3610ffb6f4e9c804dc539394669 (diff) | |
download | mariadb-git-1ae09ec8636be184d8a1017381a7d533f2bb29c9.tar.gz |
Merge remote-tracking branch 'origin/10.4' into 10.5
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/table.cc b/sql/table.cc index c6d9de645ea..6e5e86468da 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1152,12 +1152,21 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table, vcol= unpack_vcol_info_from_frm(thd, mem_root, table, &expr_str, &((*field_ptr)->vcol_info), error_reported); *(vfield_ptr++)= *field_ptr; + DBUG_ASSERT(table->map == 0); + /* + We need Item_field::const_item() to return false, so + datetime_precision() and time_precision() do not try to calculate + field values, e.g. val_str(). + Set table->map to non-zero temporarily. + */ + table->map= 1; if (vcol && field_ptr[0]->check_vcol_sql_mode_dependency(thd, mode)) { DBUG_ASSERT(thd->is_error()); *error_reported= true; goto end; } + table->map= 0; break; case VCOL_DEFAULT: vcol= unpack_vcol_info_from_frm(thd, mem_root, table, &expr_str, |