Tarantool development patches archive
 help / color / mirror / Atom feed
* [tarantool-patches] [PATCH v3 0/7] Remove box.sql.execute
@ 2018-11-27 19:25 imeevma
  2018-11-27 19:25 ` [tarantool-patches] [PATCH v3 1/7] box: store sql text and length in sql_request imeevma
                   ` (6 more replies)
  0 siblings, 7 replies; 19+ messages in thread
From: imeevma @ 2018-11-27 19:25 UTC (permalink / raw)
  To: v.shpilevoy, tarantool-patches

The goal of this patch-set is to make functions from execute.c
the only way to execute SQL statements. This goal includes
similar output for executed SQL statements no matter how they
were executed: through net.box or through box.

This is the third version of patch-set. It is not complete. It
still has no last part, which is replacing box.sql.execute by
box.execute, because it will lead to massive test editing.

The main goal of this version of patch-set is to try new design of
box.sql.execute() and decide to leave it as it is or modify it for
better performance.

https://github.com/tarantool/tarantool/issues/3505
https://github.com/tarantool/tarantool/tree/imeevma/gh-3505-replace-box_sql_execute-by-box_execute

General information of difference from previous version of
patch-set:
- Some refactoring has been done.
- Some design decisions were fixed.

A bit about patches of patch-set with comments about changes in
this version:

Patch 1 allows to use SQL query as plain text in sql_request.
Nothing changes.

Patch 2 creates method for port which will allow us to dump port
directly to Lua stack. In this version this method creates new
table and dump into it instead of dump into already created one.

Patch 3 makes function sql_response_dump() a bit more universal by
removing IPROTO functions from there. Some deprecated due to this
patch code was removed.

Patch 4 allows us to design vstream by wrapping mpstream
functions. Now function sql_response_dump() uses function
port_dump_msgpack() instead of port_dump_msgpack_16(). It allows
us to wrap port_dump_* by vstream methods.

Patch 5 creates interface vstream and its mpstream implementation.
Difference from previous version:
- vstream do not contain "struct lua_State" and "struct mpstream"
  now. Now it has inheritance_padding() which allows it to be
  inherited from mpstream and luastream, that will be intoduced in
  next patch.
- Some refactoring has been done.

Patch 6 creates vstream implementation for Lua and defines new
box.sql.new_execute() function that will become box.execute() in
next vesions.
Difference from previous version:
- Luastream created. It has the same encode_* methods as mpstream.
- Lua implementation of vstream methods was moved to luastream.c.
- Some refactoring has been done.

Patch 7 is created to check that box.sql.new_execute() is able to
pass through tests created for box.sql.execute(). Almost nothing
changes from previous version.

v1: https://www.freelists.org/post/tarantool-patches/PATCH-v1-0010-sql-remove-boxsqlexecute
v2: https://www.freelists.org/post/tarantool-patches/PATCH-v2-07-Remove-boxsqlexecute

Kirill Shcherbatov (1):
  box: store sql text and length in sql_request

Mergen Imeev (6):
  box: add method dump_lua to port
  iproto: remove iproto functions from execute.c
  iproto: replace obuf by mpstream in execute.c
  sql: create interface vstream
  lua: create vstream implementation for Lua
  sql: check new box.sql.execute()

 src/box/CMakeLists.txt  |   1 +
 src/box/execute.c       | 318 +++++++++++++++++++++++++++++++++++++-----------
 src/box/execute.h       |  51 +++++---
 src/box/iproto.cc       |  32 ++++-
 src/box/lua/call.c      |   1 +
 src/box/lua/luastream.c | 151 +++++++++++++++++++++++
 src/box/lua/misc.cc     |  29 +++--
 src/box/lua/schema.lua  |  23 ++++
 src/box/lua/sql.c       | 109 ++++-------------
 src/box/lua/sql.h       |   4 +
 src/box/port.c          |  10 ++
 src/box/port.h          |   6 +
 src/box/vstream.h       | 177 +++++++++++++++++++++++++++
 src/box/xrow.c          |  45 -------
 src/box/xrow.h          |  19 ---
 src/mpstream.c          |  53 ++++++++
 16 files changed, 777 insertions(+), 252 deletions(-)
 create mode 100644 src/box/lua/luastream.c
 create mode 100644 src/box/vstream.h

-- 
2.7.4

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

end of thread, other threads:[~2018-11-30 10:55 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-27 19:25 [tarantool-patches] [PATCH v3 0/7] Remove box.sql.execute imeevma
2018-11-27 19:25 ` [tarantool-patches] [PATCH v3 1/7] box: store sql text and length in sql_request imeevma
2018-11-29 10:45   ` Vladimir Davydov
2018-11-27 19:25 ` [tarantool-patches] [PATCH v3 3/7] iproto: remove iproto functions from execute.c imeevma
2018-11-29 10:51   ` Vladimir Davydov
2018-11-27 19:25 ` [tarantool-patches] [PATCH v3 4/7] iproto: replace obuf by mpstream in execute.c imeevma
2018-11-28 13:10   ` Vladislav Shpilevoy
2018-11-29 10:53   ` Vladimir Davydov
2018-11-29 14:04     ` [tarantool-patches] " Vladislav Shpilevoy
2018-11-30 10:19       ` Vladimir Davydov
2018-11-30 10:45         ` Vladislav Shpilevoy
2018-11-30 10:55           ` Vladimir Davydov
2018-11-27 19:25 ` [tarantool-patches] [PATCH v3 7/7] sql: check new box.sql.execute() imeevma
2018-11-28 13:33 ` [tarantool-patches] [PATCH v3 2/7] box: add method dump_lua to port imeevma
2018-11-29 10:48   ` Vladimir Davydov
2018-11-28 13:45 ` [tarantool-patches] [PATCH v3 5/7] sql: create interface vstream imeevma
2018-11-28 18:25   ` [tarantool-patches] " Vladislav Shpilevoy
2018-11-28 13:50 ` [tarantool-patches] [PATCH v3 6/7] lua: create vstream implementation for Lua imeevma
2018-11-28 18:25   ` [tarantool-patches] " Vladislav Shpilevoy

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