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 5837328A69 for ; Fri, 22 Mar 2019 06:50:35 -0400 (EDT) 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 R2DZ2jaAHZa8 for ; Fri, 22 Mar 2019 06:50:35 -0400 (EDT) Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (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 CDE2928A31 for ; Fri, 22 Mar 2019 06:50:34 -0400 (EDT) From: imeevma@tarantool.org Subject: [tarantool-patches] [PATCH v9 0/7] sql: remove box.sql.execute Date: Fri, 22 Mar 2019 13:50:31 +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: v.shpilevoy@tarantool.org Cc: tarantool-patches@freelists.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. 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: - Function box.sql.new_execute() was changed to box.execute(). - Removed box.sql.execute(), fixed all tests. - Removed box.debug(). all indo were moved to box.info. - Added additional check for lua_field_inspect_table(). - Fixed bug with absent type of pragma count_changes. - Refactoring. 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 v8: https://www.freelists.org/post/tarantool-patches/PATCH-v8-06-sql-remove-boxsqlexecute Mergen Imeev (7): sql: add column name to SQL change counter sql: fix error code for SQL errors in execute.c sql: remove box.sql.debug() lua: remove exceptions from function luaL_tofield() iproto: create port_sql sql: create box.execute() sql: remove box.sql.execute() src/box/CMakeLists.txt | 1 - src/box/errcode.h | 1 + src/box/execute.c | 334 +++++++-- src/box/execute.h | 49 +- src/box/iproto.cc | 12 +- src/box/lua/call.c | 9 +- src/box/lua/console.lua | 2 +- src/box/lua/info.c | 11 + src/box/lua/init.c | 25 +- src/box/lua/load_cfg.lua | 13 +- src/box/lua/sql.c | 139 ---- src/box/lua/sql.h | 46 -- src/box/lua/tuple.c | 3 +- src/box/port.h | 1 - src/box/sql/delete.c | 2 + src/box/sql/insert.c | 2 + src/box/sql/update.c | 2 + src/lua/msgpack.c | 12 +- src/lua/utils.c | 112 +-- src/lua/utils.h | 8 +- test/box/cfg.result | 17 - test/box/cfg.test.lua | 10 - test/box/info.result | 1 + test/box/misc.result | 3 +- test/box/sql-update-with-nested-select.result | 25 +- test/box/sql-update-with-nested-select.test.lua | 14 +- test/sql-tap/alter.test.lua | 8 +- test/sql-tap/alter2.test.lua | 12 +- test/sql-tap/analyze1.test.lua | 6 +- test/sql-tap/analyze3.test.lua | 9 - test/sql-tap/analyze9.test.lua | 2 +- test/sql-tap/autoinc.test.lua | 4 +- test/sql-tap/between.test.lua | 6 +- test/sql-tap/check.test.lua | 30 +- test/sql-tap/delete1.test.lua | 4 +- test/sql-tap/distinct.test.lua | 6 +- test/sql-tap/fkey1.test.lua | 4 +- test/sql-tap/fkey2.test.lua | 92 +-- test/sql-tap/fkey3.test.lua | 18 +- test/sql-tap/fkey4.test.lua | 10 +- test/sql-tap/func.test.lua | 12 +- test/sql-tap/gh-2723-concurrency.test.lua | 36 +- test/sql-tap/gh-2931-savepoints.test.lua | 6 +- .../gh-3083-ephemeral-unref-tuples.test.lua | 4 +- .../gh-3251-string-pattern-comparison.test.lua | 6 +- .../gh-3307-xfer-optimization-issue.test.lua | 14 +- test/sql-tap/gh-3332-tuple-format-leak.test.lua | 12 +- test/sql-tap/gh2140-trans.test.lua | 26 +- test/sql-tap/gh2250-trigger-chain-limit.test.lua | 21 +- test/sql-tap/gh2259-in-stmt-trans.test.lua | 42 +- test/sql-tap/gh2548-select-compound-limit.test.lua | 14 +- test/sql-tap/gh2964-abort.test.lua | 2 +- test/sql-tap/index1.test.lua | 2 +- test/sql-tap/intpkey.test.lua | 2 +- test/sql-tap/limit.test.lua | 12 +- test/sql-tap/lua/sqltester.lua | 47 +- test/sql-tap/minmax2.test.lua | 36 +- test/sql-tap/minmax3.test.lua | 4 +- test/sql-tap/misc1.test.lua | 2 +- test/sql-tap/orderby9.test.lua | 2 + test/sql-tap/pragma.test.lua | 8 +- test/sql-tap/select1.test.lua | 20 +- test/sql-tap/select9.test.lua | 5 +- test/sql-tap/selectB.test.lua | 4 +- test/sql-tap/table.test.lua | 20 +- test/sql-tap/tkt-4a03edc4c8.test.lua | 2 +- test/sql-tap/trigger1.test.lua | 12 +- test/sql-tap/triggerC.test.lua | 14 +- test/sql-tap/unique.test.lua | 10 +- test/sql-tap/where2.test.lua | 14 +- test/sql-tap/whereA.test.lua | 4 +- test/sql-tap/whereD.test.lua | 4 +- test/sql-tap/with2.test.lua | 4 +- test/sql/check-clear-ephemeral.result | 22 +- test/sql/check-clear-ephemeral.test.lua | 12 +- test/sql/checks.result | 9 +- test/sql/checks.test.lua | 8 +- test/sql/clear.result | 49 +- test/sql/clear.test.lua | 20 +- test/sql/collation.result | 819 +++++++++++++++------ test/sql/collation.test.lua | 350 ++++----- test/sql/delete-multiple-idx.result | 44 +- test/sql/delete-multiple-idx.test.lua | 24 +- test/sql/delete.result | 114 ++- test/sql/delete.test.lua | 68 +- test/sql/drop-index.result | 35 +- test/sql/drop-index.test.lua | 24 +- test/sql/drop-table.result | 44 +- test/sql/drop-table.test.lua | 32 +- test/sql/engine.result | 24 +- test/sql/engine.test.lua | 16 +- test/sql/errinj.result | 156 ++-- test/sql/errinj.test.lua | 86 +-- test/sql/foreign-keys.result | 58 +- test/sql/foreign-keys.test.lua | 40 +- test/sql/func-recreate.result | 11 +- test/sql/func-recreate.test.lua | 4 +- test/sql/gh-2347-max-int-literals.result | 23 +- test/sql/gh-2347-max-int-literals.test.lua | 10 +- test/sql/gh-2362-select-access-rights.result | 45 +- test/sql/gh-2362-select-access-rights.test.lua | 22 +- test/sql/gh-2929-primary-key.result | 19 +- test/sql/gh-2929-primary-key.test.lua | 16 +- test/sql/gh-2981-check-autoinc.result | 49 +- test/sql/gh-2981-check-autoinc.test.lua | 30 +- test/sql/gh-3199-no-mem-leaks.result | 188 +++-- test/sql/gh-3199-no-mem-leaks.test.lua | 40 +- test/sql/gh-3613-idx-alter-update-2.result | 18 +- test/sql/gh-3613-idx-alter-update-2.test.lua | 12 +- test/sql/gh-3613-idx-alter-update.result | 26 +- test/sql/gh-3613-idx-alter-update.test.lua | 18 +- test/sql/gh-3888-values-blob-assert.result | 47 +- test/sql/gh-3888-values-blob-assert.test.lua | 22 +- test/sql/gh2141-delete-trigger-drop-table.result | 46 +- test/sql/gh2141-delete-trigger-drop-table.test.lua | 22 +- test/sql/gh2251-multiple-update.result | 49 +- test/sql/gh2251-multiple-update.test.lua | 26 +- test/sql/gh2483-remote-persistency-check.result | 24 +- test/sql/gh2483-remote-persistency-check.test.lua | 12 +- .../gh2808-inline-unique-persistency-check.result | 37 +- ...gh2808-inline-unique-persistency-check.test.lua | 14 +- test/sql/icu-upper-lower.result | 161 +++- test/sql/icu-upper-lower.test.lua | 10 +- test/sql/insert-unique.result | 30 +- test/sql/insert-unique.test.lua | 18 +- test/sql/integer-overflow.result | 26 +- test/sql/integer-overflow.test.lua | 24 +- test/sql/iproto.result | 118 ++- test/sql/iproto.test.lua | 34 +- test/sql/max-on-index.result | 62 +- test/sql/max-on-index.test.lua | 32 +- test/sql/message-func-indexes.result | 29 +- test/sql/message-func-indexes.test.lua | 22 +- test/sql/min-on-index.result | 59 -- test/sql/misc.result | 23 +- test/sql/misc.test.lua | 16 +- test/sql/no-pk-space.result | 19 +- test/sql/no-pk-space.test.lua | 16 +- test/sql/on-conflict.result | 130 +++- test/sql/on-conflict.test.lua | 70 +- test/sql/persistency.result | 425 ++++++++--- test/sql/persistency.test.lua | 102 +-- test/sql/row-count.result | 290 ++++++-- test/sql/row-count.test.lua | 112 +-- test/sql/savepoints.result | 31 +- test/sql/savepoints.test.lua | 28 +- test/sql/select-null.result | 31 +- test/sql/select-null.test.lua | 14 +- test/sql/sql-debug.result | 26 +- test/sql/sql-debug.test.lua | 10 +- test/sql/sql-statN-index-drop.result | 197 +++-- test/sql/sql-statN-index-drop.test.lua | 58 +- test/sql/tokenizer.result | 3 +- test/sql/tokenizer.test.lua | 2 +- test/sql/transition.result | 387 +++++++--- test/sql/transition.test.lua | 88 +-- test/sql/transitive-transactions.result | 48 +- test/sql/transitive-transactions.test.lua | 42 +- test/sql/triggers.result | 245 ++++-- test/sql/triggers.test.lua | 144 ++-- test/sql/types.result | 104 ++- test/sql/types.test.lua | 66 +- test/sql/update-with-nested-select.result | 28 +- test/sql/update-with-nested-select.test.lua | 16 +- test/sql/upgrade.result | 40 +- test/sql/upgrade.test.lua | 20 +- test/sql/view.result | 131 ++-- test/sql/view.test.lua | 94 +-- test/sql/view_delayed_wal.result | 14 +- test/sql/view_delayed_wal.test.lua | 10 +- test/sql/vinyl-opts.result | 9 +- test/sql/vinyl-opts.test.lua | 6 +- 172 files changed, 4987 insertions(+), 3105 deletions(-) delete mode 100644 src/box/lua/sql.c delete mode 100644 src/box/lua/sql.h delete mode 100644 test/sql/min-on-index.result -- 2.7.4