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.
This commit is contained in:
Marko Mäkelä 2019-03-19 15:30:42 +02:00
parent 1efda582ad
commit a77e266866

View File

@ -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