MDEV-41154: Report an error when the engine fails in ha_rnd_pos - #5685
Conversation
406458e to
27b7ffc
Compare
01078ea to
f7fbfd3
Compare
3e73f70 to
a147dfd
Compare
a147dfd to
cfb2de4
Compare
cfb2de4 to
f486bd7
Compare
f486bd7 to
ba0eec8
Compare
DELETE skips the row without reporting anything when error is returned by handler::ha_rnd_pos() Report every error except the two that genuinely mean "the row is not there any more".
ba0eec8 to
dec56d7
Compare
|
And so it seems, an invariant "c" holds, though I added it as a seemingly valid, but a comic case :) ha_tina, representing engine=CSV, only returns HA_ERR_END_OF_FILE for all the not-found cases. It doesn't have all the rich and diverse in-statement failure analysis, as other engines have. It never marks records "deleted", but deletes the record straight out of csv on every operation. On the rnd_pos side, it receives a file offset. If previous operations deleted enough records, then the pre-saved offset may point... At this point, fellows, I went to investigate further. If every delete_row shifts the records in file, and position holds a file offset, then wrong records may be deleted. I came across this test: it deletes v=3 instead of the requested v=2: So rewriting in-between delete_row's and pre-collecting the positions to delete in a later pass is wrong. And so the result is "b": HA_ERR_END_OF_FILE cannot happen, but in a correct program :) in fact, we have it erroneously.
|
DELETE skips the row without reporting anything when error is returned by handler::ha_rnd_pos()
Report every error except the two that genuinely mean "the row is not there
any more".