MDEV-17199 Assertion `pos < table->n_v_def' failed after upgrade to 10.2
Before MDEV-5800 in MariaDB 10.2.2, InnoDB knew nothing about virtual columns. But, they would be present in the TABLE_SHARE. It appears that the MDEV-12936 fix only worked in the special case when the virtual columns are the last columns in a table definition. mysql_fields(): Remove. build_template_needs_field(): Omit virtual columns if the InnoDB table definition is known to not contain them, based on the .frm file version. build_template_field(): Clean up some code. ha_innobase::build_template(): Remove redundant computations. Loop over all MariaDB columns. Skip virtual columns if InnoDB does not know about them. calc_row_difference(): Skip not-known-to-InnoDB virtual columns. wsrep_calc_row_hash(): Skip all virtual columns. This would fix an out-of-bounds access to dict_table_t::cols[]. Also, remove some redundant computations and variables. create_table_check_doc_id_col(): Assert that the .frm file for a newly created table will be in a format where InnoDB knows about virtual columns.
Showing
Please register or sign in to comment