• Nikita Malyavin's avatar
    MDEV-26220 Server crashes with indexed by prefix virtual column · b549af69
    Nikita Malyavin authored
    Server crashes in Field::register_field_in_read_map upon select from
    partitioned table with indexed by prefix virtual column.
    
    After several read-mark fixes a problem has surfaced:
    Since KEY (c(10),a) uses only a prefix of c, a new field is created,
    duplicated from table->field[3], with a new length. However,
    vcol_inco->expr is not copied.
    
    Therefore, (*key_info)->key_part[i].field->vcol_info->expr was left NULL
    in ha_partition::index_init().
    
    Solution: copy vcol_info from table field when it's set up.
    b549af69
gcol_partition_innodb.result 3.71 KB