[tarantool-patches] [PATCH v2 0/2] sql: rework error handling in box.execute()

imeevma at tarantool.org imeevma at tarantool.org
Wed Jul 31 13:32:19 MSK 2019


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





More information about the Tarantool-patches mailing list