Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH] box: remove unicode_ci for functions
@ 2019-11-29 23:39 Chris Sosnin
  2019-11-30 20:34 ` Konstantin Osipov
  0 siblings, 1 reply; 17+ messages in thread
From: Chris Sosnin @ 2019-11-29 23:39 UTC (permalink / raw)
  To: tarantool-patches

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)

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2019-12-10 12:44 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-29 23:39 [Tarantool-patches] [PATCH] box: remove unicode_ci for functions Chris Sosnin
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox