[Tarantool-patches] [PATCH 2/2] sql: fix assertion fault in SELECT * FROM "_vfunc"

Chris Sosnin k.sosnin at tarantool.org
Wed Mar 25 22:18:54 MSK 2020


Hi! Thank you for the review!

> On 22 Mar 2020, at 22:42, Vladislav Shpilevoy <v.shpilevoy at tarantool.org> wrote:
> 
>> 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
>> 
>> +local function upgrade_to_2_3_1_1()
>> +    local _func = box.space[box.schema.FUNC_ID]
>> +    local _vfunc = box.space[box.schema.VFUNC_ID]
>> +    _vfunc:format(_func:format())
> 
> 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 = box.space[box.schema.FUNC_ID]
+    local _vfunc = box.space[box.schema.VFUNC_ID]
+    _vfunc:format(_func:format())
+end
+


More information about the Tarantool-patches mailing list