mirror of
https://github.com/MariaDB/server.git
synced 2025-11-06 13:56:14 +01:00
DELAYED with virtual columns
Segfault was cause by two different copies of same Field instance in
prepared delayed insert. One was made by
Delayed_insert::get_local_table() (see make_new_field()). That copy
went through parse_vcol_defs() and received new vcol_info->expr.
Another one was made by copy_keys_from_share() by this code:
/*
We are using only a prefix of the column as a key:
Create a new field for the key part that matches the index
*/
field= key_part->field=field->make_new_field(root, outparam, 0);
field->field_length= key_part->length;
So, key_part and table got different objects of same field and the
crash was because key_part->field->vcol_info->expr is NULL.
The fix does update_keypart_vcol_info() to update vcol_info->expr in
key_part->field.
Cleanup: memdup_vcol() is static inline instead of macro + check OOM.
|
||
|---|---|---|
| .. | ||
| alter_inplace-9045.result | ||
| binlog.result | ||
| charsets.result | ||
| cross_db.result | ||
| delayed.result | ||
| func_regexp.result | ||
| index.result | ||
| innodb_autoinc_vcol.result | ||
| innodb_virtual_fk.result | ||
| load_data.result | ||
| mrr.result | ||
| myisam_repair_prefix_varchar.result | ||
| not_supported.result | ||
| partition.result | ||
| races.result | ||
| range.result | ||
| rpl_vcol.result | ||
| update.result | ||
| update_binlog.result | ||
| upgrade.result | ||
| vcol_archive.result | ||
| vcol_blackhole.result | ||
| vcol_blocked_sql_funcs.result | ||
| vcol_column_def_options_innodb.result | ||
| vcol_column_def_options_myisam.result | ||
| vcol_csv.result | ||
| vcol_handler_aria.result | ||
| vcol_handler_innodb.result | ||
| vcol_handler_myisam.result | ||
| vcol_ins_upd_innodb.result | ||
| vcol_ins_upd_myisam.result | ||
| vcol_keys_aria.result | ||
| vcol_keys_innodb.result | ||
| vcol_keys_myisam.result | ||
| vcol_memory.result | ||
| vcol_merge.result | ||
| vcol_misc.result | ||
| vcol_non_stored_columns_innodb.result | ||
| vcol_non_stored_columns_myisam.result | ||
| vcol_partition_innodb.result | ||
| vcol_partition_myisam.result | ||
| vcol_select_innodb.result | ||
| vcol_select_myisam.result | ||
| vcol_sql_mode.result | ||
| vcol_sql_mode_datetime.result | ||
| vcol_sql_mode_time.result | ||
| vcol_sql_mode_timestamp.result | ||
| vcol_sql_mode_upgrade.result | ||
| vcol_supported_sql_funcs.result | ||
| vcol_syntax.result | ||
| vcol_trigger_sp_innodb.result | ||
| vcol_trigger_sp_myisam.result | ||
| vcol_utf32.result | ||
| vcol_view_innodb.result | ||
| vcol_view_myisam.result | ||
| wrong_arena.result | ||