From: imeevma@tarantool.org
To: v.shpilevoy@tarantool.org, tarantool-patches@freelists.org
Subject: [tarantool-patches] [PATCH v2 0/7] Remove box.sql.execute
Date: Thu, 22 Nov 2018 22:10:45 +0300 [thread overview]
Message-ID: <cover.1542910674.git.imeevma@gmail.com> (raw)
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 second 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:
- Three patches from last version were moved to different branch.
- The order in which the patches were arranged was slightly
changed.
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.
Review fixes were made.
Patch 2 creates method for port which will allow us to dump port
directly to Lua stack. This was moved here from position 8.
Patch 3 makes function sql_response_dump() a bit more universal by
removing IPROTO functions from there. The main change from last
version is that xrow_decode_sql() was returned to execute.c.
Patch 4 allows us to design vstream by wrapping mpstream
functions. Nothing was changed for now.
Patch 5 creates interface vstream and its mpstream implementation.
Difference from previous version:
- vstream now is inherited from mpstream.
- vstream.c removed, msgpack implementation moved to mpstream.c
- Implementation of some methods were replaced by mpstream
functions that were implicitly casted.
- encode_reply_* methods were removed. Their functionality is now
performed by encode_enum() + encode_... + encode_map_commit().
- Flag is_flatted was moved to sql_response.
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:
- Added parameters binding for box.sql.new_execute().
- Lua implementation of vstream methods was moved to lua/sql.c.
- Changed the way errors was pushed to Lua stack.
Patch 10 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
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/execute.c | 260 +++++++++++++++++++++++++++++++++++--------------
src/box/execute.h | 39 +++++---
src/box/iproto.cc | 31 +++++-
src/box/lua/call.c | 1 +
src/box/lua/schema.lua | 23 +++++
src/box/lua/sql.c | 211 +++++++++++++++++++++++----------------
src/box/port.c | 22 +++++
src/box/port.h | 12 +++
src/box/vstream.h | 167 +++++++++++++++++++++++++++++++
src/box/xrow.c | 45 ---------
src/box/xrow.h | 19 ----
src/mpstream.c | 78 +++++++++++++++
12 files changed, 673 insertions(+), 235 deletions(-)
create mode 100644 src/box/vstream.h
--
2.7.4
next reply other threads:[~2018-11-22 19:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-22 19:10 imeevma [this message]
2018-11-22 19:10 ` [tarantool-patches] [PATCH v2 1/7] box: store sql text and length in sql_request imeevma
2018-11-22 19:10 ` [tarantool-patches] [PATCH v2 2/7] box: add method dump_lua to port imeevma
2018-11-22 21:49 ` [tarantool-patches] " Vladislav Shpilevoy
2018-11-27 19:25 ` Imeev Mergen
2018-11-22 19:10 ` [tarantool-patches] [PATCH v2 3/7] iproto: remove iproto functions from execute.c imeevma
2018-11-22 19:10 ` [tarantool-patches] [PATCH v2 4/7] iproto: replace obuf by mpstream in execute.c imeevma
2018-11-22 19:11 ` [tarantool-patches] [PATCH v2 5/7] sql: create interface vstream imeevma
2018-11-22 21:49 ` [tarantool-patches] " Vladislav Shpilevoy
2018-11-27 19:25 ` Imeev Mergen
2018-11-22 19:11 ` [tarantool-patches] [PATCH v2 6/7] lua: create vstream implementation for Lua imeevma
2018-11-22 21:49 ` [tarantool-patches] " Vladislav Shpilevoy
2018-11-27 19:25 ` Imeev Mergen
2018-11-22 19:11 ` [tarantool-patches] [PATCH v2 7/7] sql: check new box.sql.execute() imeevma
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.1542910674.git.imeevma@gmail.com \
--to=imeevma@tarantool.org \
--cc=tarantool-patches@freelists.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [tarantool-patches] [PATCH v2 0/7] Remove box.sql.execute' \
/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