[tarantool-patches] [PATCH v1 00/10] sql: remove box.sql.execute

imeevma at tarantool.org imeevma at tarantool.org
Sat Nov 17 17:03:48 MSK 2018


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

This version of patch-set is not complete. It doesn't have 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 get comments
about design of vstream and general comments about this patch-set.

A bit about patches in this patch-set:

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

Patch 2 makes execute.c a bit more universal by removing
IPROTO functions from there.

Patch 3 allows us to design vstream by wrapping mpstream
functions.

Patch 4 creates interface vstream and its mpstream implementation.

Patch 5 fixes bug with EXPLAIN being executed through net.box
throws SEGMENTATION FAULT.

Patch 6 fixes bug with SELECT from system spaces returns some
columns as unpacked msgpack.

Patch 7 fixes bug with region being cleared twice during execution
of VDBE.

Patch 8 creates method for port which will allow us to dump port
directly to Lua stack.

Patch 9 creates vstream implementation for Lua and defines new
box.sql.new_execute() function that will become box.execute() in
next vesions.

Patch 10 is created to check that box.sql.new_execute() is able to
pass through test created for box.sql.execute(). Created new
implementation of box.sql.execute() that transforms output of
box.sql.new_execute() to format of old box.sql.execute().

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

Mergen Imeev (9):
  iproto: remove iproto functions from execute.c
  iproto: replace obuf by mpstream in execute.c
  sql: create interface vstream
  sql: EXPLAIN through net.box leads to SEGFAULT
  sql: SELECT from system spaces returns unpacked msgpack.
  sql: too many autogenerated ids leads to SEGFAULT
  box: add method dump_lua to port
  lua: create vstream implementation for Lua
  sql: check new box.sql.execute()

 src/box/CMakeLists.txt   |   1 +
 src/box/execute.c        | 218 ++++++++++-------------------
 src/box/execute.h        |  43 +++---
 src/box/iproto.cc        |  93 ++++++++++++-
 src/box/lua/call.c       |   1 +
 src/box/lua/net_box.c    |  15 +-
 src/box/lua/schema.lua   |  23 ++++
 src/box/lua/sql.c        | 107 +++------------
 src/box/port.c           |  22 +++
 src/box/port.h           |  12 ++
 src/box/sql/vdbe.c       |   8 +-
 src/box/sql/vdbeaux.c    |   6 -
 src/box/vstream.c        | 348 +++++++++++++++++++++++++++++++++++++++++++++++
 src/box/vstream.h        | 194 ++++++++++++++++++++++++++
 src/box/xrow.c           |  39 ------
 src/box/xrow.h           |  14 --
 test/sql/iproto.result   |  36 +++++
 test/sql/iproto.test.lua |  20 ++-
 18 files changed, 870 insertions(+), 330 deletions(-)
 create mode 100644 src/box/vstream.c
 create mode 100644 src/box/vstream.h

-- 
2.7.4





More information about the Tarantool-patches mailing list