Allow DML requests from on_replace triggers
Touch txn a little bit to support multistatement transactions in autocommit mode. This patch allow to perform DML requests from space:on_replace() triggers. Trigerred requests are processed as a part of the original transaction and entire transaction is rolled back in case of error. Please note that there is still no support for nested transactions, therefore a call to box.begin() from on_replace() trigger is not allowed. Recursive invocation is not forbidden, but limited to the maximal depth of 4 to avoid stack overflow. Proudly fixes #587
Showing
- src/box/errcode.h 1 addition, 0 deletionssrc/box/errcode.h
- src/box/txn.cc 17 additions, 10 deletionssrc/box/txn.cc
- src/box/txn.h 3 additions, 3 deletionssrc/box/txn.h
- test/box/misc.result 3 additions, 2 deletionstest/box/misc.result
- test/box/on_replace.result 219 additions, 0 deletionstest/box/on_replace.result
- test/box/on_replace.test.lua 88 additions, 0 deletionstest/box/on_replace.test.lua
Loading
Please register or sign in to comment