Gap logs prevented race conditions when a concurrent connection
^
Typo, gap locks.
Integer lax with postfix operator-- allows redundant
long_unique_fields_differ(). I've replaced it with bool logic.
What happens if to replace innodb_row_ins_step_enter with
ha_write_row_end in the first example? Row-level locking works and
ha_index_next_same() of INSERT(5) long unique check is blocked until
INSERT(15) commits. That proves post-write long unique check is enough
for fixing race condition. I've added test case for that.
The below was done by Sachin but the cleanup commit b7905fa61b is
good occasion to fix these.
Redundant if (result == HA_ERR_FOUND_DUPP_KEY) check, same for other
error codes. The below patch brings up understanding at which calls
which error codes overridden to 0.
if (!result) is needless extra indentation level for substantional
amount of code.
For convenience these cleanups are separated on top of b7905fa61b
cleanup for easy merge:
934b9f2868 (mariadb/bb-10.6-midenok-review2, bb-10.6-midenok-review2) MDEV-37199 Cleanup
One more FIXME below for test file. Also innodb_lock_wait_timeout is
not needed for original test cases (nor for unpatched repro).