xrow: fix crash on nested map/array update ops
If an update operation tried to insert a new key into a map or an array which was created by a previous update operation, then the process would fail an assertion. That was because the first operation was stored as a bar update. The second operation tried to branch it assuming that the entire bar update's JSON path must exist, but it wasn't so for the newly created part of the path. The solution is to fallback to branching earlier than the entire bar path ends, if can see that the next part of the path can't be found. Closes #7705 NO_DOC=bugfix
Showing
- changelogs/unreleased/gh-7705-json-update-crash.md 4 additions, 0 deletionschangelogs/unreleased/gh-7705-json-update-crash.md
- src/box/xrow_update_route.c 17 additions, 7 deletionssrc/box/xrow_update_route.c
- test/box/update.result 157 additions, 0 deletionstest/box/update.result
- test/box/update.test.lua 55 additions, 0 deletionstest/box/update.test.lua
Loading