From 6586bb51f3167fad9e353e8c9cd69f51e0acec21 Mon Sep 17 00:00:00 2001 From: Aleksey Midenkov Date: Tue, 25 Aug 2020 22:21:07 +0300 Subject: MDEV-23467 SIGSEGV in fill_record/fill_record_n_invoke_before_triggers on INSERT DELAYED Field::make_new_field() resets invisible property (needed for "CREATE .. SELECT" f.ex.). Recover invisible property in Delayed_insert::get_local_table() (unireg_check works by the same principle). --- sql/sql_insert.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'sql/sql_insert.cc') diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index a24cb61449b..b574e7ab9d7 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -2614,6 +2614,7 @@ TABLE *Delayed_insert::get_local_table(THD* client_thd) if (!(*field= (*org_field)->make_new_field(client_thd->mem_root, copy, 1))) goto error; (*field)->unireg_check= (*org_field)->unireg_check; + (*field)->invisible= (*org_field)->invisible; (*field)->orig_table= copy; // Remove connection (*field)->move_field_offset(adjust_ptrs); // Point at copy->record[0] memdup_vcol(client_thd, (*field)->vcol_info); -- cgit v1.2.1