From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> To: tarantool-patches@freelists.org Cc: alexander.turenko@tarantool.org Subject: [tarantool-patches] [PATCH v2 0/5] Expose ICU into Lua Date: Sun, 29 Apr 2018 01:45:08 +0300 [thread overview] Message-ID: <cover.1524955403.git.v.shpilevoy@tarantool.org> (raw) Branch: http://github.com/tarantool/tarantool/tree/gh-3290-lua-icu Issue: https://github.com/tarantool/tarantool/issues/3290 Issue: https://github.com/tarantool/tarantool/issues/3385 Issue: https://github.com/tarantool/tarantool/issues/3081 Lua can not work with unicode - in Lua it is enterpreted as a binary. On such string built-in upper/lower functions, '#' (length) and comparison operators do not work. But Tarantool links with ICU and has comparators with collations, that can solve the problems. But there is another issue - string methods must be available before box.cfg, so the ICU and collations must be built out of main 'box' static library. To do this the collation related files are moved from 'box' into 'core' library. A second issue is that when box.cfg is called, it inserts built-in collations into _collation space, and these insertions can conflict with built-in collations, created before box.cfg. Delete from _collation can break the collations cache as well. The patchset solves this by checking collations deletions and insertions, and if they tries to operate on built-in collations, then they are ignored - a user sees changes in _collation, but the cache is unchanged. Vladislav Shpilevoy (5): alter: fix assertion in collations alter Move struct on_access_denied_ctx into error.h Merge box_error, stat and collations into core library Always store built-in collations in the cache lua: introduce utf8 built-in globaly visible module cmake/module.cmake | 4 +- src/CMakeLists.txt | 17 +- src/box/CMakeLists.txt | 18 +- src/box/alter.cc | 129 +++++++------ src/box/lua/call.c | 2 +- src/box/lua/error.cc | 2 +- src/box/lua/net_box.c | 2 +- src/box/lua/tuple.c | 2 +- src/box/lua/xlog.c | 2 +- src/box/schema.h | 12 -- src/{box => }/coll.c | 0 src/{box => }/coll.h | 0 src/{box => }/coll_cache.c | 34 ++++ src/{box => }/coll_cache.h | 0 src/{box => }/coll_def.c | 7 + src/{box => }/coll_def.h | 13 ++ src/{box => }/errcode.c | 0 src/{box => }/errcode.h | 0 src/{box => }/error.cc | 1 - src/{box => }/error.h | 12 ++ src/lua/init.c | 3 + src/lua/utf8.c | 451 +++++++++++++++++++++++++++++++++++++++++++ src/lua/utf8.h | 42 ++++ src/main.cc | 2 +- src/{box => }/opt_def.c | 0 src/{box => }/opt_def.h | 0 test/app-tap/string.test.lua | 160 ++++++++++++++- test/box/ddl.result | 25 +++ test/box/ddl.test.lua | 11 ++ test/unit/CMakeLists.txt | 8 +- test/unit/coll.cpp | 3 +- 31 files changed, 862 insertions(+), 100 deletions(-) rename src/{box => }/coll.c (100%) rename src/{box => }/coll.h (100%) rename src/{box => }/coll_cache.c (75%) rename src/{box => }/coll_cache.h (100%) rename src/{box => }/coll_def.c (96%) rename src/{box => }/coll_def.h (94%) rename src/{box => }/errcode.c (100%) rename src/{box => }/errcode.h (100%) rename src/{box => }/error.cc (99%) rename src/{box => }/error.h (95%) create mode 100644 src/lua/utf8.c create mode 100644 src/lua/utf8.h rename src/{box => }/opt_def.c (100%) rename src/{box => }/opt_def.h (100%) -- 2.15.1 (Apple Git-101)
next reply other threads:[~2018-04-28 22:45 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-04-28 22:45 Vladislav Shpilevoy [this message] 2018-04-28 22:45 ` [tarantool-patches] [PATCH v2 1/5] alter: fix assertion in collations alter Vladislav Shpilevoy 2018-04-28 22:45 ` [tarantool-patches] [PATCH v2 2/5] Move struct on_access_denied_ctx into error.h Vladislav Shpilevoy 2018-05-04 11:06 ` [tarantool-patches] " Alexander Turenko 2018-05-04 12:05 ` Vladislav Shpilevoy 2018-04-28 22:45 ` [tarantool-patches] [PATCH v2 3/5] Merge box_error, stat and collations into core library Vladislav Shpilevoy 2018-05-04 11:36 ` [tarantool-patches] " Alexander Turenko 2018-05-04 12:05 ` Vladislav Shpilevoy 2018-05-08 13:18 ` Konstantin Osipov 2018-05-10 21:06 ` Vladislav Shpilevoy 2018-04-28 22:45 ` [tarantool-patches] [PATCH v2 4/5] Always store built-in collations in the cache Vladislav Shpilevoy 2018-05-08 13:20 ` [tarantool-patches] " Konstantin Osipov 2018-04-28 22:45 ` [tarantool-patches] [PATCH v2 5/5] lua: introduce utf8 built-in globaly visible module Vladislav Shpilevoy 2018-05-04 22:33 ` [tarantool-patches] " Alexander Turenko 2018-05-04 23:32 ` Vladislav Shpilevoy 2018-05-05 0:18 ` Alexander Turenko 2018-05-05 0:24 ` Vladislav Shpilevoy 2018-05-05 0:38 ` Alexander Turenko 2018-05-05 0:45 ` Vladislav Shpilevoy 2018-05-08 13:21 ` Konstantin Osipov 2018-05-05 0:19 ` [tarantool-patches] Re: [PATCH v2 0/5] Expose ICU into Lua Alexander Turenko
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=cover.1524955403.git.v.shpilevoy@tarantool.org \ --to=v.shpilevoy@tarantool.org \ --cc=alexander.turenko@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='Re: [tarantool-patches] [PATCH v2 0/5] Expose ICU into Lua' \ /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