From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id EAAD42CC10 for ; Mon, 19 Nov 2018 07:54:45 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s_tgDifYqUJi for ; Mon, 19 Nov 2018 07:54:45 -0500 (EST) Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id A9B492C910 for ; Mon, 19 Nov 2018 07:54:45 -0500 (EST) Subject: [tarantool-patches] Re: [PATCH v1 00/10] sql: remove box.sql.execute References: From: Vladislav Shpilevoy Message-ID: <784d1777-578d-5387-0e14-e7da6b94bf3f@tarantool.org> Date: Mon, 19 Nov 2018 15:54:43 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org, imeevma@tarantool.org https://github.com/tarantool/tarantool/tree/imeevma/gh-3505-replace-box_sql_execute-by-box_execute https://github.com/tarantool/tarantool/issues/3505 On 17/11/2018 17:03, imeevma@tarantool.org wrote: > 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 >