michael.cahill comments with reference to the Pull Request in
I'd be inclined to go the other way and always "unpack" a missing value cell as if it was a zero-length value. If __wt_row_leaf_value_cell returned an unpacked value, rather than a pointer to the raw cell, that would be straightforward (AFAICT, all callers currently call __wt_cell_unpack right after).
Alternatively, we could keep around the bits corresponding to a zero-length value cell in a static array, and have __wt_row_leaf_value_cell return a pointer to that, but that seems messier to me.
This change would clean up various callers like __cursor_row_slot_return and __value_return that currently have to check for NULL and hard-code knowledge that NULL means an empty value in multiple parts of the code.
- is related to
WT-4031 on-page zero-length row-store values can be discarded from checkpoints