From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp59.i.mail.ru (smtp59.i.mail.ru [217.69.128.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id D2899446426 for ; Wed, 25 Mar 2020 22:18:56 +0300 (MSK) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) From: Chris Sosnin In-Reply-To: <2193f919-8553-1511-18ea-0f249985d820@tarantool.org> Date: Wed, 25 Mar 2020 22:18:54 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <20652CDE-B6A6-4839-A5CE-612048467BE6@tarantool.org> References: <2193f919-8553-1511-18ea-0f249985d820@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH 2/2] sql: fix assertion fault in SELECT * FROM "_vfunc" List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org Hi! Thank you for the review! > On 22 Mar 2020, at 22:42, Vladislav Shpilevoy = wrote: >=20 >> diff --git a/src/box/lua/upgrade.lua b/src/box/lua/upgrade.lua >> index 92c3b460e..2fea6f943 100644 >> --- a/src/box/lua/upgrade.lua >> +++ b/src/box/lua/upgrade.lua >> @@ -974,6 +974,12 @@ local function upgrade_to_2_3_1() >> create_session_settings_space() >> end >>=20 >> +local function upgrade_to_2_3_1_1() >> + local _func =3D box.space[box.schema.FUNC_ID] >> + local _vfunc =3D box.space[box.schema.VFUNC_ID] >> + _vfunc:format(_func:format()) >=20 > It is worth adding a comment why such a trivial thing should be done. I added the following one: +local function upgrade_to_2_3_1_1() + -- Formats must be equal in order to avoid crashes in SQL + -- caused by incorrectly allocated cursor. + local _func =3D box.space[box.schema.FUNC_ID] + local _vfunc =3D box.space[box.schema.VFUNC_ID] + _vfunc:format(_func:format()) +end +=