From: Kirill Yukhin <kyukhin@tarantool.org>
To: tarantool-patches@freelists.org
Cc: v.shpilevoy@tarantool.org, Nikita Pettik <korablev@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH] sql: update ptr to VDBE after its creation in sql_txn
Date: Thu, 25 Apr 2019 11:58:33 +0300 [thread overview]
Message-ID: <20190425085833.swi457llz2l4yaa5@tarantool.org> (raw)
In-Reply-To: <20190415232522.10188-1-korablev@tarantool.org>
Hello,
On 16 Apr 02:25, Nikita Pettik wrote:
> VDBE object is used in struct sql_txn to add new autoincrement ids in
> sequence_next(). List of these ids is returned later as a query
> execution result. sql_txn is created once SQL statement is executed
> inside transaction and exists till commit or rollback. After its
> creation it contains pointer to current VDBE. Each VDBE is freed after
> statement is executed. Hence, after first SQL statement within
> transaction is executed, sql_txn will point to freed memory (dangling
> pointer). This leads to crash in the next processed statement. Fix to
> this bug is simple: we must re-assign pointer to VDBE in sql_txn before
> VDBE execution.
>
> Closes #4157
> ---
> Branch: https://github.com/tarantool/tarantool/tree/np/gh-4157-fix-autoincrement-in-transaction
> Issue: https://github.com/tarantool/tarantool/issues/4157
I've checked your patch into 2.1 and master branches.
--
Regards, Kirill Yukhin
prev parent reply other threads:[~2019-04-25 8:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-15 23:25 [tarantool-patches] " Nikita Pettik
2019-04-16 14:35 ` [tarantool-patches] " Vladislav Shpilevoy
2019-04-18 19:20 ` n.pettik
2019-04-18 20:06 ` Vladislav Shpilevoy
2019-04-25 8:58 ` Kirill Yukhin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190425085833.swi457llz2l4yaa5@tarantool.org \
--to=kyukhin@tarantool.org \
--cc=korablev@tarantool.org \
--cc=tarantool-patches@freelists.org \
--cc=v.shpilevoy@tarantool.org \
--subject='[tarantool-patches] Re: [PATCH] sql: update ptr to VDBE after its creation in sql_txn' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox