|
I think the underlying problem here is that marked_for_write assert is incorrectly placed.
It doesn't actually matter what fields are updated in the row image, this doesn't need write_set bitmap, so the assert should not check it.
write_set bitmap shows what fields will be stored in the table after this row image is sent to the engine (in write_row() or update_row() method.
There is really no good way of checking whether write_set is correct. Current assert is store() gets too many false positives (that's why it evolved into a very complex expression). We could put at assert in write_row(), verifying that all fields from the write_set were given values and all other fields weren't — but, again, I expect false positives for cases when the field got a value, but we don't expect it to be stored.
Practically, I don't remember when these asserts fired correctly, indicating a problem to be fixed. So may be a best way forward is simply to remove them altogether.
|