• Alexey Botchkov's avatar
    MDEV-26546 SIGSEGV's in spider_db_connect on SHOW TABLE and spider_db…... · 8911823f
    Alexey Botchkov authored
    MDEV-26546 SIGSEGV's in spider_db_connect on SHOW TABLE and spider_db… …_mbase::connect (and SIGSEGV's in check_vcol_forward_refs and inline_mysql_mutex_lock)
    
    Not the SPIDER issue - happens to INSERT DELAYED.
    the field::make_new_field does't copy the LONG_UNIQUE_HASH_FIELD
    flag to the new field. Though the Delayed_insert::get_local_table
    copies the field->vcol_info for this field. Ad a result
    the parse_vcol_defs doesn't create the expression for that column
    so the field->vcol_info->expr is NULL. Which leads to crash.
    Backported fix for this from 10.5 - the flagg added in the
    Delayed_insert::get_local_table.
    
    Another problem with the USING HASH key is thst the
    parse_vcol_defs modifies the table->keys content. Then the same
    parse_vcol_defs is called on the table copy that has keys already
    modified. Backported fix for that from 10.5 - key copying added
    tot the Delayed_insert::get_local_table.
    
    Finally - the created copy has to clear the expr_arena as
    this table is not in the thd->open_tables list so won't be
    cleared automatically.
    8911823f
delayed.result 13.7 KB