summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 92dfa59e648..a4de5d9c930 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -8383,9 +8383,10 @@ int TABLE::update_virtual_fields(handler *h, enum_vcol_update_mode update_mode)
int TABLE::update_virtual_field(Field *vf)
{
- DBUG_ASSERT(!in_use->is_error());
- Query_arena backup_arena;
DBUG_ENTER("TABLE::update_virtual_field");
+ Query_arena backup_arena;
+ Counting_error_handler count_errors;
+ in_use->push_internal_handler(&count_errors);
in_use->set_n_backup_active_arena(expr_arena, &backup_arena);
bitmap_clear_all(&tmp_set);
vf->vcol_info->expr->walk(&Item::update_vcol_processor, 0, &tmp_set);
@@ -8393,7 +8394,8 @@ int TABLE::update_virtual_field(Field *vf)
vf->vcol_info->expr->save_in_field(vf, 0);
DBUG_RESTORE_WRITE_SET(vf);
in_use->restore_active_arena(expr_arena, &backup_arena);
- DBUG_RETURN(in_use->is_error());
+ in_use->pop_internal_handler();
+ DBUG_RETURN(count_errors.errors);
}