From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id D77322D91C for ; Sat, 13 Oct 2018 08:17:59 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kECR3w0RGnOw for ; Sat, 13 Oct 2018 08:17:59 -0400 (EDT) Received: from smtp10.mail.ru (smtp10.mail.ru [94.100.181.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 21ADD2D91B for ; Sat, 13 Oct 2018 08:17:59 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v2 1/1] box: update collation strength option. References: <1539367676.189590095@f400.i.mail.ru> From: Vladislav Shpilevoy Message-ID: <97830699-35df-f312-fe87-c0a8816eb3e5@tarantool.org> Date: Sat, 13 Oct 2018 15:17:55 +0300 MIME-Version: 1.0 In-Reply-To: <1539367676.189590095@f400.i.mail.ru> Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org, =?UTF-8?B?0JzQtdGA0LPQtdC9INCY0LzQtdC1?= =?UTF-8?B?0LI=?= Hi! >     Replace couldn't be used in space box.space._collation: >     tarantool> function update_collation_strength_field() >              >     local _collation = >     box.space[box.schema.COLLATION_ID] >              >     for _, collation in ipairs(_collation:select()) do >              >         if (collation.opts.strength == nil) then >              >             local new_collation = >     _collation:get{collation.id}:totable() >              >             new_collation[6].strength = 'identical' >              >             _collation:replace(new_collation) >              >         end >              >     end >              > end >     --- >     ... >     tarantool> update_collation_strength_field() >     --- >     - error: collation does not support alter >     ... I just found that it is not normal. Triggers on system spaces are turned off before upgrade. But for _collation space they are not. Please, turn off the triggers and use replace. See function set_system_triggers in upgrade.lua. > >>+        end > >>        +    end > >>        +end > >>        + > >>        +local function upgrade_to_2_1_1() > >>        +    update_collation_strength_field() > >>        +end > >>        + > >>        + >