Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH 0/7] Expose ICU into Lua
@ 2018-04-25 23:29 Vladislav Shpilevoy
  2018-04-25 23:29 ` [tarantool-patches] [PATCH 1/7] lua: expose ICU upper/lower functions to Lua Vladislav Shpilevoy
                   ` (7 more replies)
  0 siblings, 8 replies; 14+ messages in thread
From: Vladislav Shpilevoy @ 2018-04-25 23:29 UTC (permalink / raw)
  To: tarantool-patches; +Cc: kostja

Branch: http://github.com/tarantool/tarantool/tree/gh-3290-lua-icu-ucasemap
Issue: https://github.com/tarantool/tarantool/issues/3290
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 (7):
  lua: expose ICU upper/lower functions to Lua
  lua: implement string.u_count
  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: expose u_compare/u_icompare into Lua

 cmake/module.cmake           |   4 +-
 extra/exports                |   3 +
 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               |   2 +-
 src/lua/string.lua           | 227 +++++++++++++++++++++++++++++++++++++++++++
 src/main.cc                  |   2 +-
 src/{box => }/opt_def.c      |   0
 src/{box => }/opt_def.h      |   0
 src/util.c                   |  79 ++++++++++++++-
 test/app-tap/string.test.lua |  70 ++++++++++++-
 test/box/ddl.result          |  25 +++++
 test/box/ddl.test.lua        |  11 +++
 test/unit/CMakeLists.txt     |   8 +-
 test/unit/coll.cpp           |   3 +-
 32 files changed, 585 insertions(+), 102 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%)
 rename src/{box => }/opt_def.c (100%)
 rename src/{box => }/opt_def.h (100%)

-- 
2.15.1 (Apple Git-101)

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

end of thread, other threads:[~2018-04-28  1:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-25 23:29 [tarantool-patches] [PATCH 0/7] Expose ICU into Lua Vladislav Shpilevoy
2018-04-25 23:29 ` [tarantool-patches] [PATCH 1/7] lua: expose ICU upper/lower functions to Lua Vladislav Shpilevoy
2018-04-28  0:56   ` [tarantool-patches] " Alexander Turenko
2018-04-25 23:29 ` [tarantool-patches] [PATCH 2/7] lua: implement string.u_count Vladislav Shpilevoy
2018-04-26 10:36   ` [tarantool-patches] " Vladislav Shpilevoy
2018-04-26 16:07   ` Vladislav Shpilevoy
2018-04-26 23:57   ` Vladislav Shpilevoy
2018-04-28  1:10   ` Alexander Turenko
2018-04-25 23:29 ` [tarantool-patches] [PATCH 3/7] alter: fix assertion in collations alter Vladislav Shpilevoy
2018-04-25 23:29 ` [tarantool-patches] [PATCH 4/7] Move struct on_access_denied_ctx into error.h Vladislav Shpilevoy
2018-04-25 23:29 ` [tarantool-patches] [PATCH 5/7] Merge box_error, stat and collations into core library Vladislav Shpilevoy
2018-04-25 23:29 ` [tarantool-patches] [PATCH 6/7] Always store built-in collations in the cache Vladislav Shpilevoy
2018-04-25 23:29 ` [tarantool-patches] [PATCH 7/7] lua: expose u_compare/u_icompare into Lua Vladislav Shpilevoy
2018-04-28  1:55 ` [tarantool-patches] Re: [PATCH 0/7] Expose ICU " Alexander Turenko

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