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 51B1B2A8BA for ; Thu, 6 Sep 2018 14:29:29 -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 gl1vhpuXhMXW for ; Thu, 6 Sep 2018 14:29:29 -0400 (EDT) Received: from smtp52.i.mail.ru (smtp52.i.mail.ru [94.100.177.112]) (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 0B4D92A8A6 for ; Thu, 6 Sep 2018 14:29:28 -0400 (EDT) From: imeevma@tarantool.org Subject: [tarantool-patches] [PATCH v1 1/1] lua: strength in the _collation space Date: Thu, 6 Sep 2018 21:29:24 +0300 Message-Id: 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, v.shpilevoy@tarantool.org 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|WMnipWjA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(jYpWtvx_iKTbYqdU!lycF-3cU7ciYp;OA5gX%DM ztj89v(jrfVBPl6~3cb5eC8aUCI>`~P)=QLeaHoX|++hZf|B=DyCb7lO$6m1~r~Be1 z@xE{_Xg?ooo&V@6=`8Y0FuFR)of|G_G;HZyv!9POH9#S&38h8e%nSOt=;|cD76E2N zKYC_9Sl}p+jTJpAC{GF=6jbMgj(>^OPJwHv@nB@A1Vj)300Bq<(FF%F=!ymsV6Z@p zqcDzv5C}sMib5MlKmZIv3N(mXFmw#X1G+Vsh*mHlY&r++LOo~~s&(K4#;TcCn$8#= zw#GmV)=Os{5WowiLVR5xRm zglikvbEc)^3I6iQ7eRo4wKc!xbL5^YeZ*<3sro0Vxay)8$E95ewfVU#tk|tLJoG>+ zMDeLB$5vrcRfoS)Btp-b`kO6++Cl#k8h>0hY<6-Xk?!H6ND}prJ`;7fwzC*$bOg4NY$1Il9!$RG1>`8WXbo^ zB8%{$bqHJZ|8J|gfwBXzXfX{b|CtOjCUh~;(3H27LgO-P>Ou;+Ab-bK+M@mJI&8bdZuZ2^UN!^Th9Y zaiUcWoI>ODx(%tE>Hj(7eFhXY6W;l-fFXBl<$MyEaF%-k0Jp`*ZNcI{^%`+O0SUwU zXvyEH8KVHvdvv&?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