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 971B4266C5 for ; Sat, 2 Mar 2019 08:07:48 -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 B3SgPcvpjjJQ for ; Sat, 2 Mar 2019 08:07:48 -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 4C91226208 for ; Sat, 2 Mar 2019 08:07:48 -0500 (EST) From: imeevma@tarantool.org Subject: [tarantool-patches] [PATCH v3 0/9] sql: use diag_set() for errors in SQL Date: Sat, 2 Mar 2019 16:07:46 +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: korablev@tarantool.org Cc: tarantool-patches@freelists.org The goal of this patch-set is to rework all SQL errors and make Tarantool ones from them. Currently this patch-set contains five pathes that rewords all parser errors. Only part of these errors were completely reworked. Difference from last version: - Added five more patches. - A bit changed position of patches in the set. https://github.com/tarantool/tarantool/issues/3965 https://github.com/tarantool/tarantool/tree/imeevma/gh-3965-use-diag_set-to-describe-error Mergen Imeev (9): sql: rework syntax errors sql: save SQL parser errors in diag_set() sql: remove field nErr of struct Parse sql: remove field rc of struct Parse sql: remove field zErrMsg of struct Parse sql: rework six syntax errors sql: rework four semantic errors sql: rework three errors of "unsupported" type sql: remove sqlErrorMsg() src/box/errcode.h | 16 ++ src/box/sql.c | 12 +- src/box/sql/alter.c | 3 +- src/box/sql/analyze.c | 13 +- src/box/sql/build.c | 215 +++++++++++---------- src/box/sql/callback.c | 3 +- src/box/sql/delete.c | 17 +- src/box/sql/expr.c | 141 ++++++++------ src/box/sql/insert.c | 48 +++-- src/box/sql/parse.y | 69 ++++--- src/box/sql/pragma.c | 11 +- src/box/sql/prepare.c | 20 +- src/box/sql/resolve.c | 215 ++++++++++++--------- src/box/sql/select.c | 212 +++++++++++--------- src/box/sql/sqlInt.h | 16 +- src/box/sql/tokenize.c | 67 +++---- src/box/sql/trigger.c | 37 +--- src/box/sql/update.c | 23 ++- src/box/sql/util.c | 39 ---- src/box/sql/vdbemem.c | 9 +- src/box/sql/where.c | 13 +- src/box/sql/wherecode.c | 2 +- src/box/sql/whereexpr.c | 8 +- test/box/misc.result | 15 ++ test/sql-tap/alter2.test.lua | 4 +- test/sql-tap/analyzeD.test.lua | 2 +- test/sql-tap/blob.test.lua | 20 +- test/sql-tap/check.test.lua | 16 +- test/sql-tap/colname.test.lua | 4 +- test/sql-tap/count.test.lua | 2 +- test/sql-tap/default.test.lua | 4 +- test/sql-tap/e_select1.test.lua | 38 ++-- test/sql-tap/gh-2549-many-columns.test.lua | 2 +- test/sql-tap/gh2168-temp-tables.test.lua | 4 +- test/sql-tap/gh2548-select-compound-limit.test.lua | 2 +- test/sql-tap/hexlit.test.lua | 4 +- test/sql-tap/identifier_case.test.lua | 2 +- test/sql-tap/index-info.test.lua | 2 +- test/sql-tap/index1.test.lua | 2 +- test/sql-tap/index7.test.lua | 2 +- test/sql-tap/join.test.lua | 22 +-- test/sql-tap/join3.test.lua | 2 +- test/sql-tap/keyword1.test.lua | 2 +- test/sql-tap/misc1.test.lua | 8 +- test/sql-tap/misc5.test.lua | 6 +- test/sql-tap/null.test.lua | 12 +- test/sql-tap/pragma.test.lua | 4 +- test/sql-tap/select1.test.lua | 26 +-- test/sql-tap/select3.test.lua | 8 +- test/sql-tap/select4.test.lua | 6 +- test/sql-tap/select7.test.lua | 2 +- test/sql-tap/start-transaction.test.lua | 14 +- test/sql-tap/table.test.lua | 10 +- test/sql-tap/tkt2822.test.lua | 30 +-- test/sql-tap/tkt3935.test.lua | 14 +- test/sql-tap/tokenize.test.lua | 26 +-- test/sql-tap/trigger1.test.lua | 14 +- test/sql-tap/view.test.lua | 4 +- test/sql-tap/where7.test.lua | 2 +- test/sql-tap/with1.test.lua | 10 +- test/sql-tap/with2.test.lua | 18 +- test/sql/checks.result | 12 +- test/sql/collation.result | 12 +- test/sql/foreign-keys.result | 10 +- test/sql/gh-2347-max-int-literals.result | 6 +- test/sql/gh-3888-values-blob-assert.result | 8 +- test/sql/integer-overflow.result | 9 +- test/sql/iproto.result | 15 +- test/sql/misc.result | 14 +- test/sql/on-conflict.result | 16 +- test/sql/triggers.result | 4 +- test/sql/types.result | 13 +- 72 files changed, 895 insertions(+), 798 deletions(-) -- 2.7.4