From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> To: tarantool-patches@freelists.org, "Мерген Имеев" <imeevma@tarantool.org> Subject: [tarantool-patches] Re: [PATCH v2 1/1] box: update collation strength option. Date: Sat, 13 Oct 2018 15:17:55 +0300 [thread overview] Message-ID: <97830699-35df-f312-fe87-c0a8816eb3e5@tarantool.org> (raw) In-Reply-To: <1539367676.189590095@f400.i.mail.ru> 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 > >> + > >> + >
next prev parent reply other threads:[~2018-10-13 12:17 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-10-12 18:07 [tarantool-patches] " Мерген Имеев 2018-10-13 12:17 ` Vladislav Shpilevoy [this message] 2018-10-15 18:30 ` Imeev Mergen -- strict thread matches above, loose matches on Subject: below -- 2018-10-06 9:04 [tarantool-patches] " imeevma 2018-10-10 11:18 ` [tarantool-patches] " Vladislav Shpilevoy 2018-10-11 18:10 ` Imeev Mergen 2018-10-12 0:05 ` Vladislav Shpilevoy
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=97830699-35df-f312-fe87-c0a8816eb3e5@tarantool.org \ --to=v.shpilevoy@tarantool.org \ --cc=imeevma@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='[tarantool-patches] Re: [PATCH v2 1/1] box: update collation strength option.' \ /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