[PATCH] txn: fix rollback in sub statement

Konstantin Osipov kostja at tarantool.org
Thu Feb 8 22:56:55 MSK 2018


* Vladimir Davydov <vdavydov.dev at gmail.com> [18/02/08 17:03]:
>  - txn_rollback_stmt() rollbacks the current autocommit transaction even
>    if it is called from a sub-statement. As a result, if a sub-statement
>    (i.e. a statement called from a before_replace or on_replace trigger)
>    fails (e.g. due to a conflict), it will trash the current transaction
>    leading to a bad memory access upon returning from the trigger.
> 
>  - txn_begin_stmt() calls txn_rollback_stmt() on failure even if it did
>    not instantiate the statement. So if it is called from a trigger and
>    fails (e.g. due to nesting limit), it may trash the parent statement,
>    again leading to a crash.
> 
> Fix them both and add some tests.
> 
> Closes #3127

Pushed.


-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.org - www.twitter.com/kostja_osipov



More information about the Tarantool-patches mailing list