From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: "i.koptelov" <ivan.koptelov@tarantool.org>,
tarantool-patches@freelists.org,
Kirill Yukhin <kyukhin@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH] sql: set explicit default collation's strength
Date: Thu, 28 Mar 2019 14:45:09 +0300 [thread overview]
Message-ID: <32cb5a53-98c2-c663-0f0e-b2c5e1aeb3fc@tarantool.org> (raw)
In-Reply-To: <EC320A83-073D-458C-B9AC-C2D4F8E3A10B@tarantool.org>
LGTM.
On 28/03/2019 09:55, i.koptelov wrote:
>
>
>> On 27 Mar 2019, at 22:32, Vladislav Shpilevoy <v.shpilevoy@tarantool.org> wrote:
>>
>>
>>
>> On 27/03/2019 22:32, Vladislav Shpilevoy wrote:
>>>
>>>
>>> On 27/03/2019 18:01, i.koptelov wrote:
>>>>
>>>>
>>>>> On 27 Mar 2019, at 17:26, Vladislav Shpilevoy <v.shpilevoy@tarantool.org> wrote:
>>>>>
>>>>> Please, apply the diff below. Be careful because I haven't tested it.
>>>>> Fix it, if tests fail, and do not forget to regenerate boostrap.snap.
>>>>>
>>>>> diff --git a/src/box/lua/upgrade.lua b/src/box/lua/upgrade.lua
>>>>> index a23d0af64..37ab76177 100644
>>>>> --- a/src/box/lua/upgrade.lua
>>>>> +++ b/src/box/lua/upgrade.lua
>>>>> @@ -638,10 +638,9 @@ end
>>>>>
>>>>> local 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 and collation.name ~= 'none' and
>>>>> - collation.name ~= 'binary' then
>>>>> - local new_collation = _collation:get{collation.id}:totable()
>>>>> + for _, collation in _collation:pairs() do
>>>>> + if collation.type == 'ICU' and collation.opts.strength == nil then
>>>>> + local new_collation = collation:totable()
>>>>> new_collation[6].strength = 'tertiary'
>>>>> _collation:delete{collation.id}
>>>>> _collation:insert(new_collation)
>>>>>
>>>> Ok, done. Tests are not broken, bootstrap.snap is regenerated.
>>>>
>>>
>>> Looks like it is not done. You ignored last two lines: fix of
>>> indentation and fix of excess lookup of a tuple which you already
>>> have from pairs.
>>>
>>
>> Sorry, indentation is ok. Only double lookup still is unfixed.
>>
> Sorry, fixed now.
>
next prev parent reply other threads:[~2019-03-28 11:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-26 20:34 [tarantool-patches] " Ivan Koptelov
2019-03-27 9:53 ` [tarantool-patches] " i.koptelov
2019-03-27 11:59 ` Vladislav Shpilevoy
2019-03-27 14:08 ` [tarantool-patches] " i.koptelov
2019-03-27 14:26 ` [tarantool-patches] " Vladislav Shpilevoy
2019-03-27 15:01 ` i.koptelov
2019-03-27 19:32 ` Vladislav Shpilevoy
2019-03-27 19:32 ` Vladislav Shpilevoy
2019-03-28 6:55 ` i.koptelov
2019-03-28 11:45 ` Vladislav Shpilevoy [this message]
2019-03-28 12:02 ` Kirill Yukhin
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=32cb5a53-98c2-c663-0f0e-b2c5e1aeb3fc@tarantool.org \
--to=v.shpilevoy@tarantool.org \
--cc=ivan.koptelov@tarantool.org \
--cc=kyukhin@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='[tarantool-patches] Re: [PATCH] sql: set explicit default collation'\''s strength' \
/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