Commit a77e2668 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-18084: Crash on UPDATE after upgrade from 10.0 or 10.1

MariaDB Server 10.0 and 10.1 support non-indexed virtual columns,
which are hidden from the storage engine. Starting with MDEV-5800
in MariaDB 10.2.2, the virtual columns are visible to storage engines.

calc_row_difference(): Follow up the MDEV-17199 fix, which forgot
to increment num_v when skipping virtual columns in tables that
were created before MariaDB 10.2.2. This caused a corruption of
the update vector when an updated persistent column is preceded
by virtual columns.
parent 1efda582
......@@ -8535,6 +8535,7 @@ calc_row_difference(
field = table->field[i];
const bool is_virtual = !field->stored_in_db();
if (is_virtual && skip_virtual) {
num_v++;
continue;
}
dict_col_t* col = is_virtual
......
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