Tarantool development patches archive
 help / color / mirror / Atom feed
From: Chris Sosnin <k.sosnin@tarantool.org>
To: tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH] box: remove unicode_ci for functions
Date: Sat, 30 Nov 2019 02:39:22 +0300	[thread overview]
Message-ID: <20191129233922.36600-1-k.sosnin@tarantool.org> (raw)

Unicode_ci collation breaks the general
rule for objects naming, so we remove it
in version 2.3.1

Closes #4561
---
branch: https://github.com/tarantool/tarantool/tree/ksosnin/gh-4561-drop-func-collation
issue: https://github.com/tarantool/tarantool/issues/4561

 src/box/bootstrap.snap       | Bin 5944 -> 5921 bytes
 src/box/lua/upgrade.lua      |  14 ++++++++++++++
 test/box-py/bootstrap.result |   4 ++--
 test/box/alter.result        |   2 +-
 4 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/src/box/lua/upgrade.lua b/src/box/lua/upgrade.lua
index e71b7fb41..07f1e0317 100644
--- a/src/box/lua/upgrade.lua
+++ b/src/box/lua/upgrade.lua
@@ -942,6 +942,19 @@ local function upgrade_to_2_3_0()
     _ck_constraint:format(format)
 end

+--------------------------------------------------------------------------------
+-- Tarantool 2.3.1
+--------------------------------------------------------------------------------
+
+local function drop_func_collation()
+    local _func = box.space[box.schema.FUNC_ID]
+    _func.index.name:alter({parts = {{'name', 'string'}}})
+end
+
+local function upgrade_to_2_3_1()
+    drop_func_collation()
+end
+
 --------------------------------------------------------------------------------

 local function get_version()
@@ -977,6 +990,7 @@ local function upgrade(options)
         {version = mkversion(2, 1, 3), func = upgrade_to_2_1_3, auto = true},
         {version = mkversion(2, 2, 1), func = upgrade_to_2_2_1, auto = true},
         {version = mkversion(2, 3, 0), func = upgrade_to_2_3_0, auto = true},
+        {version = mkversion(2, 3, 1), func = upgrade_to_2_3_1, auto = true},
     }

     for _, handler in ipairs(handlers) do
diff --git a/test/box-py/bootstrap.result b/test/box-py/bootstrap.result
index 123aa2feb..938a7631e 100644
--- a/test/box-py/bootstrap.result
+++ b/test/box-py/bootstrap.result
@@ -4,7 +4,7 @@ box.internal.bootstrap()
 box.space._schema:select{}
 ---
 - - ['max_id', 511]
-  - ['version', 2, 3, 0]
+  - ['version', 2, 3, 1]
 ...
 box.space._cluster:select{}
 ---
@@ -123,7 +123,7 @@ box.space._index:select{}
   - [289, 2, 'name', 'tree', {'unique': true}, [[0, 'unsigned'], [2, 'string']]]
   - [296, 0, 'primary', 'tree', {'unique': true}, [[0, 'unsigned']]]
   - [296, 1, 'owner', 'tree', {'unique': false}, [[1, 'unsigned']]]
-  - [296, 2, 'name', 'tree', {'unique': true}, [{'field': 2, 'collation': 2, 'type': 'string'}]]
+  - [296, 2, 'name', 'tree', {'unique': true}, [[2, 'string']]]
   - [297, 0, 'primary', 'tree', {'unique': true}, [[0, 'unsigned']]]
   - [297, 1, 'owner', 'tree', {'unique': false}, [[1, 'unsigned']]]
   - [297, 2, 'name', 'tree', {'unique': true}, [[2, 'string']]]
diff --git a/test/box/alter.result b/test/box/alter.result
index 46ce8687b..9a2f9917e 100644
--- a/test/box/alter.result
+++ b/test/box/alter.result
@@ -190,7 +190,7 @@ _index:select{}
   - [289, 2, 'name', 'tree', {'unique': true}, [[0, 'unsigned'], [2, 'string']]]
   - [296, 0, 'primary', 'tree', {'unique': true}, [[0, 'unsigned']]]
   - [296, 1, 'owner', 'tree', {'unique': false}, [[1, 'unsigned']]]
-  - [296, 2, 'name', 'tree', {'unique': true}, [{'field': 2, 'collation': 2, 'type': 'string'}]]
+  - [296, 2, 'name', 'tree', {'unique': true}, [[2, 'string']]]
   - [297, 0, 'primary', 'tree', {'unique': true}, [[0, 'unsigned']]]
   - [297, 1, 'owner', 'tree', {'unique': false}, [[1, 'unsigned']]]
   - [297, 2, 'name', 'tree', {'unique': true}, [[2, 'string']]]
--
2.21.0 (Apple Git-122.2)

             reply	other threads:[~2019-11-29 23:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-29 23:39 Chris Sosnin [this message]
2019-11-30 20:34 ` Konstantin Osipov
2019-12-01 14:12   ` k.sosnin
2019-12-01 14:36   ` Vladislav Shpilevoy
2019-12-02  7:07     ` Konstantin Osipov
2019-12-02 14:36       ` Nikita Pettik
2019-12-02 14:49         ` Konstantin Osipov
2019-12-06 11:42       ` Kirill Yukhin
2019-12-06 20:17         ` Konstantin Osipov
2019-12-09 11:06           ` Kirill Yukhin
2019-12-09 11:24             ` Konstantin Osipov
2019-12-09 13:25               ` Kirill Yukhin
2019-12-09 13:39                 ` Konstantin Osipov
2019-12-09 14:07                   ` Nikita Pettik
2019-12-09 23:09                   ` Vladislav Shpilevoy
2019-12-10  8:19                     ` Konstantin Osipov
2019-12-10 12:44                       ` 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=20191129233922.36600-1-k.sosnin@tarantool.org \
    --to=k.sosnin@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH] box: remove unicode_ci for functions' \
    /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