diff --git a/src/box/bootstrap.snap b/src/box/bootstrap.snap index 4877919ffcfb8e5e08fd9d6bd22b12a63b9dd4a9..ecb047196e3383961b6837f8e7e764fdea45b617 100644 Binary files a/src/box/bootstrap.snap and b/src/box/bootstrap.snap differ diff --git a/src/box/lua/upgrade.lua b/src/box/lua/upgrade.lua index ae382eda9c455a27a3021de1d023a75cbebe7a69..9a6eaf1c5ea3b5450670d138200b101306b6008d 100644 --- a/src/box/lua/upgrade.lua +++ b/src/box/lua/upgrade.lua @@ -89,6 +89,7 @@ local function erase() truncate(box.space._sequence_data) truncate(box.space._sequence) truncate(box.space._truncate) + truncate(box.space._collation) --truncate(box.space._schema) box.space._schema:delete('version') box.space._schema:delete('max_id') @@ -896,8 +897,8 @@ 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{0, "unicode", ADMIN, "ICU", "", setmap{}} - box.space._collation:replace{1, "unicode_s1", ADMIN, "ICU", "", {strength='primary'}} + box.space._collation:replace{1, "unicode", ADMIN, "ICU", "", setmap{}} + box.space._collation:replace{2, "unicode_ci", ADMIN, "ICU", "", {strength='primary'}} local _priv = box.space[box.schema.PRIV_ID] _priv:insert{ADMIN, PUBLIC, 'space', _collation.id, 2} diff --git a/test/box/ddl.result b/test/box/ddl.result index 20808c32c3e0951ac35c1d3aa1e17d7599564cc4..6f01d89a6216ae4cca19b06081e36e19290bfa39 100644 --- a/test/box/ddl.result +++ b/test/box/ddl.result @@ -337,7 +337,7 @@ box.space._collation:auto_increment{'test', 0, 'ICU', 42} ... box.space._collation:auto_increment{'test', 0, 'ICU', 'ru_RU', setmap{}} --ok --- -- [2, 'test', 0, 'ICU', 'ru_RU', {}] +- [3, 'test', 0, 'ICU', 'ru_RU', {}] ... box.space._collation:auto_increment{'test', 0, 'ICU', 'ru_RU', setmap{}} --- @@ -345,7 +345,7 @@ box.space._collation:auto_increment{'test', 0, 'ICU', 'ru_RU', setmap{}} ... box.space._collation.index.name:delete{'test'} -- ok --- -- [2, 'test', 0, 'ICU', 'ru_RU', {}] +- [3, 'test', 0, 'ICU', 'ru_RU', {}] ... box.space._collation.index.name:delete{'nothing'} -- allowed --- @@ -461,24 +461,24 @@ _ = box.space._collation.index.name:delete{'test'} -- ok ... box.space._collation:auto_increment{'test', 0, 'ICU', 'ru_RU', setmap{}} --- -- [2, 'test', 0, 'ICU', 'ru_RU', {}] +- [3, 'test', 0, 'ICU', 'ru_RU', {}] ... box.space._collation:select{} --- -- - [0, 'unicode', 1, 'ICU', '', {}] - - [1, 'unicode_s1', 1, 'ICU', '', {'strength': 'primary'}] - - [2, 'test', 0, 'ICU', 'ru_RU', {}] +- - [1, 'unicode', 1, 'ICU', '', {}] + - [2, 'unicode_ci', 1, 'ICU', '', {'strength': 'primary'}] + - [3, 'test', 0, 'ICU', 'ru_RU', {}] ... test_run:cmd('restart server default') box.space._collation:select{} --- -- - [0, 'unicode', 1, 'ICU', '', {}] - - [1, 'unicode_s1', 1, 'ICU', '', {'strength': 'primary'}] - - [2, 'test', 0, 'ICU', 'ru_RU', {}] +- - [1, 'unicode', 1, 'ICU', '', {}] + - [2, 'unicode_ci', 1, 'ICU', '', {'strength': 'primary'}] + - [3, 'test', 0, 'ICU', 'ru_RU', {}] ... box.space._collation.index.name:delete{'test'} --- -- [2, 'test', 0, 'ICU', 'ru_RU', {}] +- [3, 'test', 0, 'ICU', 'ru_RU', {}] ... -- -- gh-2839: allow to store custom fields in field definition. diff --git a/test/box/hash.result b/test/box/hash.result index ccbeebe5d700a09ba167ea00eeec189ddedd69e3..6893a1be0fa20b7e997b7c33d0ee35fe6f395055 100644 --- a/test/box/hash.result +++ b/test/box/hash.result @@ -461,10 +461,10 @@ hash:truncate() hash.index['primary']:drop() --- ... -tmp = hash:create_index('primary', { type = 'hash', parts = {{1, 'string', collation = 'unicode_s1'}}, unique = true}) +tmp = hash:create_index('primary', { type = 'hash', parts = {{1, 'string', collation = 'unicode_ci'}}, unique = true}) --- ... -tmp = hash:create_index('secondary', { type = 'hash', parts = {{2, 'scalar', collation = 'unicode_s1'}}, unique = true}) +tmp = hash:create_index('secondary', { type = 'hash', parts = {{2, 'scalar', collation = 'unicode_ci'}}, unique = true}) --- ... hash:insert{'Ðж', 'Hedgehog'} diff --git a/test/box/hash.test.lua b/test/box/hash.test.lua index 2e9fe34bba4d8979030bf770596574714370dba7..51192851b434b2199e2201c5abd120dffb80bbf6 100644 --- a/test/box/hash.test.lua +++ b/test/box/hash.test.lua @@ -214,8 +214,8 @@ hash:truncate() -- Collation test ------------------------------------------------------------------------------- hash.index['primary']:drop() -tmp = hash:create_index('primary', { type = 'hash', parts = {{1, 'string', collation = 'unicode_s1'}}, unique = true}) -tmp = hash:create_index('secondary', { type = 'hash', parts = {{2, 'scalar', collation = 'unicode_s1'}}, unique = true}) +tmp = hash:create_index('primary', { type = 'hash', parts = {{1, 'string', collation = 'unicode_ci'}}, unique = true}) +tmp = hash:create_index('secondary', { type = 'hash', parts = {{2, 'scalar', collation = 'unicode_ci'}}, unique = true}) hash:insert{'Ðж', 'Hedgehog'} hash:insert{'Ðлка', 'Spruce'} diff --git a/test/box/misc.result b/test/box/misc.result index 947aeff22067cba425af8adc68668e9e3757bb55..1472587de4e4a4e32c2505aeb272d7b5be5ad0b1 100644 --- a/test/box/misc.result +++ b/test/box/misc.result @@ -1037,7 +1037,7 @@ s:drop() s = box.schema.space.create('test') --- ... -not not s:create_index('test1', {parts = {{1, 'scalar', collation = 'unicode_s1'}}}) +not not s:create_index('test1', {parts = {{1, 'scalar', collation = 'unicode_ci'}}}) --- - true ... @@ -1074,22 +1074,22 @@ s:drop() s = box.schema.space.create('test') --- ... -not not s:create_index('test1', {parts = {{1, 'number', collation = 'unicode_s1'}}}) +not not s:create_index('test1', {parts = {{1, 'number', collation = 'unicode_ci'}}}) --- - error: 'Wrong index options (field 1): collation is reasonable only for string and scalar parts' ... -not not s:create_index('test2', {parts = {{2, 'unsigned', collation = 'unicode_s1'}}}) +not not s:create_index('test2', {parts = {{2, 'unsigned', collation = 'unicode_ci'}}}) --- - error: 'Wrong index options (field 1): collation is reasonable only for string and scalar parts' ... -not not s:create_index('test3', {parts = {{3, 'integer', collation = 'unicode_s1'}}}) +not not s:create_index('test3', {parts = {{3, 'integer', collation = 'unicode_ci'}}}) --- - error: 'Wrong index options (field 1): collation is reasonable only for string and scalar parts' ... -not not s:create_index('test4', {parts = {{4, 'boolean', collation = 'unicode_s1'}}}) +not not s:create_index('test4', {parts = {{4, 'boolean', collation = 'unicode_ci'}}}) --- - error: 'Wrong index options (field 1): collation is reasonable only for string and scalar parts' diff --git a/test/box/misc.test.lua b/test/box/misc.test.lua index 1cfc48d39846237f2788e2f11c7467f92473619d..96bdafd71e8aaabb848936d0797976c88ef4e0da 100644 --- a/test/box/misc.test.lua +++ b/test/box/misc.test.lua @@ -283,7 +283,7 @@ s:create_index('test5', {parts = {{5, 'string', collation = 'Unicode'}}}).parts s:drop() s = box.schema.space.create('test') -not not s:create_index('test1', {parts = {{1, 'scalar', collation = 'unicode_s1'}}}) +not not s:create_index('test1', {parts = {{1, 'scalar', collation = 'unicode_ci'}}}) s:replace{1} s:replace{1.1} s:replace{false} s:replace{'Блин'} s:replace{'Ðж'} s:replace{'ешь'} s:replace{'Же'} s:replace{'Уже'} s:replace{'drop'} s:replace{'table'} s:replace{'users'} @@ -292,8 +292,8 @@ s:select{'еж'} s:drop() s = box.schema.space.create('test') -not not s:create_index('test1', {parts = {{1, 'number', collation = 'unicode_s1'}}}) -not not s:create_index('test2', {parts = {{2, 'unsigned', collation = 'unicode_s1'}}}) -not not s:create_index('test3', {parts = {{3, 'integer', collation = 'unicode_s1'}}}) -not not s:create_index('test4', {parts = {{4, 'boolean', collation = 'unicode_s1'}}}) +not not s:create_index('test1', {parts = {{1, 'number', collation = 'unicode_ci'}}}) +not not s:create_index('test2', {parts = {{2, 'unsigned', collation = 'unicode_ci'}}}) +not not s:create_index('test3', {parts = {{3, 'integer', collation = 'unicode_ci'}}}) +not not s:create_index('test4', {parts = {{4, 'boolean', collation = 'unicode_ci'}}}) s:drop() diff --git a/test/engine/replica_join.result b/test/engine/replica_join.result index aab48022bcec40ec7ae2f2ada7c3132eccbc8b3f..a003c0d875827a3c04bc911f61d613eb05d407fe 100644 --- a/test/engine/replica_join.result +++ b/test/engine/replica_join.result @@ -34,7 +34,7 @@ _ = space2:create_index('primary', { parts = {1, 'unsigned', 2, 'string'}}) space3 = box.schema.space.create('test3', { id = 99997, engine = engine}) --- ... -_ = space3:create_index('primary', { parts = {{1, 'string', collation = 'unicode_s1'}}}) +_ = space3:create_index('primary', { parts = {{1, 'string', collation = 'unicode_ci'}}}) --- ... box.snapshot() diff --git a/test/engine/replica_join.test.lua b/test/engine/replica_join.test.lua index cf151cac1d653f043dd7c12970f9ee4ae6e491d0..5c6ed11a6e37a1a7f24e06aab10b1bbef19e95ee 100644 --- a/test/engine/replica_join.test.lua +++ b/test/engine/replica_join.test.lua @@ -10,7 +10,7 @@ _ = space:create_index('secondary', { type = index, unique = false, parts = {2, space2 = box.schema.space.create('test2', { id = 99998, engine = engine}) _ = space2:create_index('primary', { parts = {1, 'unsigned', 2, 'string'}}) space3 = box.schema.space.create('test3', { id = 99997, engine = engine}) -_ = space3:create_index('primary', { parts = {{1, 'string', collation = 'unicode_s1'}}}) +_ = space3:create_index('primary', { parts = {{1, 'string', collation = 'unicode_ci'}}}) box.snapshot() -- replica join diff --git a/test/vinyl/layout.result b/test/vinyl/layout.result index 0f274796bbc7c23906ad564dea7f538d6dee2c1a..f1a33ee2b9ddc9993474e8ad052dc1ea3bf47124 100644 --- a/test/vinyl/layout.result +++ b/test/vinyl/layout.result @@ -124,7 +124,7 @@ result - - HEADER: type: INSERT BODY: - tuple: [0, {0: 3, 7: [{'field': 0, 'collation': 0, 'type': 'string'}], 6: 512}] + tuple: [0, {0: 3, 7: [{'field': 0, 'collation': 1, 'type': 'string'}], 6: 512}] - HEADER: type: INSERT BODY: diff --git a/test/xlog/upgrade.result b/test/xlog/upgrade.result index d1cc579111eb52475791be0d65571bd1ebb770f0..891126728b8771f4e221b9c0ecafb5e0e530be1c 100644 --- a/test/xlog/upgrade.result +++ b/test/xlog/upgrade.result @@ -160,8 +160,8 @@ box.space._func:select() ... box.space._collation:select() --- -- - [0, 'unicode', 1, 'ICU', '', {}] - - [1, 'unicode_s1', 1, 'ICU', '', {'strength': 'primary'}] +- - [1, 'unicode', 1, 'ICU', '', {}] + - [2, 'unicode_ci', 1, 'ICU', '', {'strength': 'primary'}] ... box.space._priv:select() ---