vinyl: fix crash on invalid upsert
`vy_apply_result_does_cross_pk()` must be called after the new tuple format is validated, otherwise it may crash in case the new tuple has fields conflicting with the primary key definition. While we are at it, fix the operation cursor (`ups_ops`) not advanced on this kind of error. This resulted in skipped `upsert` statements following an invalid `upsert` statement in a transaction. Closes #10099 NO_DOC=bug fix (cherry picked from commit dd0ac814)
Showing
- changelogs/unreleased/gh-10099-vy-crash-on-invalid-upsert-fix.md 4 additions, 0 deletions...ogs/unreleased/gh-10099-vy-crash-on-invalid-upsert-fix.md
- src/box/vy_upsert.c 12 additions, 11 deletionssrc/box/vy_upsert.c
- test/vinyl-luatest/gh_10099_invalid_upsert_test.lua 42 additions, 0 deletionstest/vinyl-luatest/gh_10099_invalid_upsert_test.lua
Please register or sign in to comment