mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
MDEV-20661 Virtual fields are not recalculated on system fields value assignment
Fix stale virtual field value in 4 cases: when virtual field depends on row_start/row_end in timestamp/trx_id versioned table. row_start dep is recalculated in vers_update_fields() (SQL and InnoDB layer). row_end dep is recalculated on history row insert.
This commit is contained in:
@@ -1658,6 +1658,10 @@ int vers_insert_history_row(TABLE *table)
|
||||
if (row_start->cmp(row_start->ptr, row_end->ptr) >= 0)
|
||||
return 0;
|
||||
|
||||
if (table->vfield &&
|
||||
table->update_virtual_fields(table->file, VCOL_UPDATE_FOR_READ))
|
||||
return HA_ERR_GENERIC;
|
||||
|
||||
return table->file->ha_write_row(table->record[0]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user