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 7D6012647A for ; Sat, 19 Jan 2019 08:21: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 XYfEiDsN5IMJ for ; Sat, 19 Jan 2019 08:20:18 -0500 (EST) Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (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 900B026706 for ; Sat, 19 Jan 2019 08:20:18 -0500 (EST) From: imeevma@tarantool.org Subject: [tarantool-patches] [PATCH v8 0/6] sql: remove box.sql.execute Date: Sat, 19 Jan 2019 16:20:16 +0300 Message-Id: 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, v.shpilevoy@tarantool.org 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 eighth 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. For now this patch-set blocked by #3832. Small temporary fix added to temporary patch of patch-set. https://github.com/tarantool/tarantool/issues/3505 https://github.com/tarantool/tarantool/tree/imeevma/gh-3505-no-sql-execute General information of difference from previous version of patch-set: - Added new commit that removes lua_error() from luaL_tofield(). - Added new and fixed old comments and descriptions. - Fixed some bugs. - Refactoring. A bit about patches of the patch-set: Patch 1 removes lua_error() from luaL_tofield(). Patch 2 moves map creation from xrow functions to sql_response_dump(). It allows us to use sql_response_dump() as method of port. Patch 3 creates port_sql and two its methods: dump_msgpack() and destroy(). Patch 4 creates dump_lua() method for port_sql. Patch 5 adds binding to new_execute(). Patch 6 is temporary patch. It was created to check that new_execute() is able to pass through tests created for execute(). 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 v3: https://www.freelists.org/post/tarantool-patches/PATCH-v3-07-Remove-boxsqlexecute v4: https://www.freelists.org/post/tarantool-patches/PATCH-v4-05-Remove-boxsqlexecute v5: https://www.freelists.org/post/tarantool-patches/PATCH-v5-05-sql-remove-boxsqlexecute v6: https://www.freelists.org/post/tarantool-patches/PATCH-v6-05-sql-remove-boxsqlexecute v7: https://www.freelists.org/post/tarantool-patches/PATCH-v7-06-sql-remove-boxsqlexecute Mergen Imeev (6): lua: remove exceptions from function luaL_tofield() iproto: move map creation to sql_response_dump() iproto: create port_sql lua: create method dump_lua for port_sql lua: parameter binding for new execute() sql: check new box.sql.execute() src/box/execute.c | 507 +++++++++++++++++++++++++++++++++++++++++-------- src/box/execute.h | 63 ++---- src/box/iproto.cc | 18 +- src/box/lua/call.c | 9 +- src/box/lua/schema.lua | 23 +++ src/box/lua/sql.c | 37 +++- src/box/lua/tuple.c | 3 +- src/box/port.h | 1 - src/box/xrow.c | 8 +- src/box/xrow.h | 9 +- src/lua/msgpack.c | 12 +- src/lua/utils.c | 97 +++++----- src/lua/utils.h | 8 +- 13 files changed, 589 insertions(+), 206 deletions(-) -- 2.7.4