-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A read only transaction should not invalidate the fiber region. The problem was found in context of calling a Lua function from SQL on tarantool 2.* (#5427). Another problem (#5623) was fixed by this commit on tarantool 2.*. Since 2.2.0-469-g707e58a3f ('box: rework box_lua_{call, eval} to use input port') arguments for a C stored procedure is allocated on a fiber region. The region is truncated at the end of the call. When the procedure performs a read only transaction, fiber_gc() may be called and so the region_truncate() call will fail on assertion (on Debug build). Despite that all found cases are specific for tarantoo 2.*, it is possible to be hit by the problem on 1.10 as well. It is enough to allocate something on a region (explicitly or implicitly) and perform any read only transaction. So it looks worthful to backport the fix to 1.10 as well. (cherry picked from commit d0d668f) The original commit message: | sql: do not reset region on select | | Prior to this patch, region on fiber was reset during select(), get(), | count(), max(), or min(). This would result in an error if one of these | operations was used in a user-defined function in SQL. After this patch, | these functions truncate region instead of resetting it. | | Closes #5427
- Loading branch information
1 parent
f92bf2d
commit 96916f8
Showing
3 changed files
with
38 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters