- Fixed few test case.

parent 71fdafb7
......@@ -1410,7 +1410,7 @@ void dict_table_t::instant_column(const dict_table_t& table, const ulint* map)
for (unsigned i = 0; i < n_v_def; i++) {
dict_v_col_t& v = v_cols[i];
v.m_col.ind = map[v.m_col.ind];
v.m_col.ind = v.m_col.ind - get_n_drop_cols(map, v.m_col.ind);
for (ulint n = v.num_base; n--; ) {
dict_col_t*& base = v.base_col[n];
......
......@@ -1633,6 +1633,20 @@ struct dict_table_t {
return NULL;
}
/** Get the n-drop columns till the given n_cols.
@param[in] n_cols number of old columns
@return number of drop columns */
static unsigned get_n_drop_cols(const ulint* col_map, unsigned n_cols)
{
unsigned n_drop_cols = 0;
for (ulint i = 0; i < n_cols; i++) {
if (col_map[i] == ULINT_UNDEFINED) {
n_drop_cols++;
}
}
return n_drop_cols;
}
/** Read the metadata blob and fill the non primary fields,
non-drop nullable fields and fill the drop columns in the
vector.
......
......@@ -1559,11 +1559,15 @@ row_log_table_apply_convert_mrec(
const dict_col_t* col
= dict_field_get_col(ind_field);
if (col->is_dropped()) {
ut_ad(index->is_instant());
continue;
}
ulint col_no
= log->col_map[dict_col_get_no(col)];
if (col_no == ULINT_UNDEFINED) {
/* dropped column */
continue;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment