Tarantool development patches archive
 help / color / mirror / Atom feed
From: imeevma@tarantool.org
To: tarantool-patches@freelists.org, v.shpilevoy@tarantool.org
Subject: [tarantool-patches] [PATCH v1 1/1] lua: strength in the _collation space
Date: Thu,  6 Sep 2018 21:29:24 +0300	[thread overview]
Message-ID: <ca389fe0db3d29db4852bf69f37d065f9a78ae63.1536258486.git.imeevma@gmail.com> (raw)

This patch sets "primary" strength as default for collations.

Closes #3573
---
Branch: https://github.com/tarantool/tarantool/tree/imeevma/gh-3573-show-collation-strength
Issue: https://github.com/tarantool/tarantool/issues/3573

 src/box/bootstrap.snap  | Bin 1888 -> 1883 bytes
 src/box/lua/schema.lua  |   5 ++++-
 src/box/lua/upgrade.lua |   2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/box/bootstrap.snap b/src/box/bootstrap.snap
index 65739384a66d6ba4a538553ccf4677536ba15280..c3e27705897a490b02d1c37f83fa158bcd881177 100644
GIT binary patch
delta 1863
zcmV-N2e|m)4%-fp8Gku6G%aUkG-f$4W-|&&ZgX^DZewLSATl&&Gh#V1IW1;pWMnNg
zGh|{dI59UfEnzh|WMnipWjA6oISN)oY;R+0Iv{&}3JTS_3%bn);sDN6ljNzT00000
z04TLD{QywSHUJ7sC=g1(SWy8eilQhYrYO#$b&K+dis+JNWPhvdCcueh{WqP&ny3+p
zOi58nvUbRpU!>GULa{NyYpdaJX~538v4%eg{!}zNHVQ9ON&)5o;sEymH|J4Xj+1`O
zH&)8@rIE5PLUU=nJGTwZjLe`8dsum4|MIxKQ5OMs?^}Kr$6jilY2RxX=6b}vDC@Nk
z+xM=>aSyw?Hh)w^KWxP@+%BBZ{2acDcsI9l-#`Cnzu)`8|7@0N9J5j=rAkRmFafY<
zkt%?$PExin3~%xF>Ms4ebDYqU94TDT=zpPy^?0L4rkAd(lbp2b5cB=98<MV0a)~N^
z*alsgjdpdCt4Dz=9UT-7>b(=|TdWh9%E>u_EtTq|YJcgdP~fXDWZB>On7!M~<U;4X
z;x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oI>ODx(%tE>Hj(7eFhXY6W;l-fFXBl<$MyEaF%-k0Jp`*ZNcI{^%`+O0SUwU
zXvyEH8KVHvdvv&<oiG-M^e%;HWMH>?MOVcC^{jdnkxBH*o>ioYD*hn#owS?6;c5Pa
zOKII?w&KGFV&V|3Mbr&L5X!Yz%p;DnMjk&-Yt$nN6QbqE1&=eiq^6&i)+qs1`Uid;
WTT(bI7&}6muV?loF^6>35UuT6gN?`l

diff --git a/src/box/lua/schema.lua b/src/box/lua/schema.lua
index 74b7064..dedd072 100644
--- a/src/box/lua/schema.lua
+++ b/src/box/lua/schema.lua
@@ -1988,10 +1988,13 @@ box.internal.collation.create = function(name, coll_type, locale, opts)
         box.error(box.error.ILLEGAL_PARAMS,
         "options (fourth arg) must be a table or nil")
     end
+    local opts_defaults = {
+        strength = "primary",
+    }
+    opts = update_param_table(opts, opts_defaults)
     local lua_opts = {if_not_exists = opts.if_not_exists }
     check_param_table(lua_opts, {if_not_exists = 'boolean'})
     opts.if_not_exists = nil
-    opts = setmap(opts)
 
     local _coll = box.space[box.schema.COLLATION_ID]
     if lua_opts.if_not_exists then
diff --git a/src/box/lua/upgrade.lua b/src/box/lua/upgrade.lua
index d9c2ae4..e09318b 100644
--- a/src/box/lua/upgrade.lua
+++ b/src/box/lua/upgrade.lua
@@ -396,7 +396,7 @@ local function create_collation_space()
     box.space._index:insert{_collation.id, 1, 'name', 'tree', {unique = true}, {{1, 'string'}}}
 
     log.info("create predefined collations")
-    box.space._collation:replace{1, "unicode", ADMIN, "ICU", "", setmap{}}
+    box.space._collation:replace{1, "unicode", ADMIN, "ICU", "", {strength='primary'}}
     box.space._collation:replace{2, "unicode_ci", ADMIN, "ICU", "", {strength='primary'}}
 
     local _priv = box.space[box.schema.PRIV_ID]
-- 
2.7.4

             reply	other threads:[~2018-09-06 18:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-06 18:29 imeevma [this message]
2018-09-06 20:03 ` [tarantool-patches] " 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=ca389fe0db3d29db4852bf69f37d065f9a78ae63.1536258486.git.imeevma@gmail.com \
    --to=imeevma@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='Re: [tarantool-patches] [PATCH v1 1/1] lua: strength in the _collation space' \
    /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