Commit 3d7dabcf authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-17466 Virtual column value not available during purge

row_build_index_entry_low(): Assert that when the value of a
virtual column is not available, this can only happen when
the index creation was completed but not committed yet.

This change is not fixing any bug, making a debug assertion
stricter, so that bugs can be caught in the future.

Ultimately, we should change the InnoDB undo log format so that
all actual secondary index keys are stored there, also for
virtual or spatial indexes. In that way, purge and rollback would
be more straightforward.
parent ce35ac3b
......@@ -267,9 +267,8 @@ row_build_index_entry_low(
ut_ad(!dfield_is_ext(dfield2));
if (UNIV_UNLIKELY(dfield2->type.mtype
== DATA_MISSING)) {
/* FIXME: why does this happen?
Should the column not be evaluated? */
ut_ad(flag == ROW_BUILD_FOR_PURGE);
ut_ad(!index->is_committed());
return(NULL);
}
} else {
......@@ -374,10 +373,7 @@ row_build_index_entry_low(
row, v_col->v_pos);
ut_ad(dfield_is_null(dfield2) ||
dfield_get_len(dfield2) == 0 || dfield2->data);
if (UNIV_UNLIKELY(dfield2->type.mtype == DATA_MISSING)) {
/* FIXME: why does this happen? */
return(NULL);
}
ut_ad(dfield2->type.mtype != DATA_MISSING);
*dfield = *dfield2;
}
......
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