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 DC66B2630A for ; Wed, 31 Jul 2019 06:32:22 -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 uhGzA-62tRiO for ; Wed, 31 Jul 2019 06:32:22 -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 97C3E26309 for ; Wed, 31 Jul 2019 06:32:22 -0400 (EDT) From: imeevma@tarantool.org Subject: [tarantool-patches] [PATCH v2 0/2] sql: rework error handling in box.execute() Date: Wed, 31 Jul 2019 13:32:19 +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: kostja@tarantool.org, tarantool-patches@freelists.org This patch-set reworks the error handling of box.execute(). After this patch-set, box.execute() will return nil as the first return value, and error as the second. https://github.com/tarantool/tarantool/issues/4390 https://github.com/tarantool/tarantool/tree/imeevma/gh-4390-box_execute-should-not-throw Changes in v2: - Added function, that pushes nil and error in Lua stack. Mergen Imeev (2): lua: new function luaT_return_error() sql: rework error handling in box.execute() src/box/lua/execute.c | 4 +- src/box/lua/session.c | 12 +- src/lua/error.c | 10 ++ src/lua/error.h | 9 + src/lua/fio.c | 74 +++------ src/lua/swim.c | 7 +- test/sql-tap/gh2548-select-compound-limit.test.lua | 10 +- test/sql-tap/lua/sqltester.lua | 5 +- test/sql/bind.result | 14 +- test/sql/bind.test.lua | 8 +- test/sql/checks.result | 52 ++++-- test/sql/clear.result | 9 +- test/sql/collation.result | 63 ++++--- test/sql/delete.result | 19 ++- test/sql/drop-table.result | 16 +- test/sql/errinj.result | 54 ++++-- test/sql/foreign-keys.result | 27 +-- test/sql/gh-2929-primary-key.result | 15 +- test/sql/gh-2981-check-autoinc.result | 12 +- test/sql/gh-3613-idx-alter-update.result | 3 +- test/sql/gh-3888-values-blob-assert.result | 18 +- test/sql/icu-upper-lower.result | 9 +- test/sql/insert-unique.result | 6 +- test/sql/integer-overflow.result | 28 ++-- test/sql/message-func-indexes.result | 12 +- test/sql/misc.result | 31 ++-- test/sql/no-pk-space.result | 15 +- test/sql/on-conflict.result | 38 +++-- test/sql/persistency.result | 12 +- test/sql/row-count.result | 3 +- test/sql/savepoints.result | 16 +- test/sql/savepoints.test.lua | 5 +- test/sql/transition.result | 10 +- test/sql/transitive-transactions.result | 14 +- test/sql/transitive-transactions.test.lua | 10 +- test/sql/triggers.result | 19 ++- test/sql/types.result | 183 ++++++++++++++------- test/sql/view.result | 25 ++- 38 files changed, 547 insertions(+), 330 deletions(-) -- 2.7.4