Tarantool development patches archive
 help / color / mirror / Atom feed
From: imeevma@tarantool.org
To: korablev@tarantool.org
Cc: tarantool-patches@freelists.org
Subject: [tarantool-patches] [PATCH v2 0/5] sql: use diag_set() for errors in SQL
Date: Mon, 25 Feb 2019 20:14:19 +0300	[thread overview]
Message-ID: <cover.1551114402.git.imeevma@gmail.com> (raw)

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:
 - Patch-set was completely reworked.
 - Error "empty request" will be mentioned after issue 3965 will
   be closed due to refactoring nature of the issue 3965.

https://github.com/tarantool/tarantool/issues/3965
https://github.com/tarantool/tarantool/tree/imeevma/gh-3965-use-diag_set-to-describe-error

Mergen Imeev (5):
  sql: remove "syntax error after column name" error
  sql: rework syntax errors
  sql: save SQL parser errors in diag_set()
  sql: remove file zErrMsg of struct Parse
  sql: remove field nErr of struct Parse

 src/box/errcode.h                          |  8 +++
 src/box/sql.c                              | 13 ++---
 src/box/sql/alter.c                        |  1 -
 src/box/sql/analyze.c                      |  2 -
 src/box/sql/build.c                        | 79 +++++++++++-------------------
 src/box/sql/callback.c                     |  1 -
 src/box/sql/delete.c                       | 28 ++++-------
 src/box/sql/expr.c                         | 26 +++++-----
 src/box/sql/insert.c                       |  4 +-
 src/box/sql/parse.y                        | 63 ++++++++++++------------
 src/box/sql/pragma.c                       |  5 +-
 src/box/sql/prepare.c                      | 12 ++---
 src/box/sql/resolve.c                      | 22 ++++-----
 src/box/sql/select.c                       | 37 +++++++-------
 src/box/sql/sqlInt.h                       | 12 +----
 src/box/sql/tokenize.c                     | 46 +++++------------
 src/box/sql/trigger.c                      | 27 ++--------
 src/box/sql/update.c                       |  4 +-
 src/box/sql/util.c                         | 14 ++----
 src/box/sql/where.c                        |  3 +-
 src/box/sql/wherecode.c                    |  5 +-
 test/box/misc.result                       |  7 +++
 test/sql-tap/alter2.test.lua               |  4 +-
 test/sql-tap/blob.test.lua                 | 20 ++++----
 test/sql-tap/check.test.lua                | 16 +++---
 test/sql-tap/colname.test.lua              |  2 +-
 test/sql-tap/count.test.lua                |  2 +-
 test/sql-tap/default.test.lua              |  4 +-
 test/sql-tap/e_select1.test.lua            | 18 +++----
 test/sql-tap/gh-2367-pragma.test.lua       |  4 +-
 test/sql-tap/gh2168-temp-tables.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                 |  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                 |  8 +--
 test/sql-tap/select1.test.lua              | 20 ++++----
 test/sql-tap/select3.test.lua              |  6 +--
 test/sql-tap/select5.test.lua              | 10 ++--
 test/sql-tap/start-transaction.test.lua    | 14 +++---
 test/sql-tap/table.test.lua                | 10 ++--
 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/with1.test.lua                |  6 +--
 test/sql-tap/with2.test.lua                | 18 +++----
 test/sql/checks.result                     | 12 ++---
 test/sql/collation.result                  | 12 ++---
 test/sql/delete.result                     |  5 +-
 test/sql/foreign-keys.result               | 10 ++--
 test/sql/gh-3888-values-blob-assert.result |  8 +--
 test/sql/iproto.result                     | 10 ++--
 test/sql/misc.result                       | 14 +++---
 test/sql/on-conflict.result                | 19 ++++---
 test/sql/triggers.result                   |  4 +-
 test/sql/types.result                      | 13 +++--
 61 files changed, 340 insertions(+), 436 deletions(-)

-- 
2.7.4

             reply	other threads:[~2019-02-25 17:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-25 17:14 imeevma [this message]
2019-02-25 17:14 ` [tarantool-patches] [PATCH v2 1/5] sql: remove "syntax error after column name" error imeevma
2019-02-25 19:34   ` [tarantool-patches] " n.pettik
2019-02-27 11:32   ` Kirill Yukhin
2019-02-25 17:14 ` [tarantool-patches] [PATCH v2 2/5] sql: rework syntax errors imeevma
2019-02-25 20:02   ` [tarantool-patches] " n.pettik
2019-02-26  8:24     ` Konstantin Osipov
2019-02-26 12:59       ` n.pettik
2019-02-26 13:12         ` Konstantin Osipov
2019-02-26 15:59       ` Imeev Mergen
2019-02-25 17:14 ` [tarantool-patches] [PATCH v2 3/5] sql: save SQL parser errors in diag_set() imeevma
2019-02-25 23:01   ` [tarantool-patches] " n.pettik
2019-02-26  8:25     ` Konstantin Osipov
2019-02-26 15:29     ` Imeev Mergen
2019-02-25 17:14 ` [tarantool-patches] [PATCH v2 4/5] sql: remove file zErrMsg of struct Parse imeevma
2019-02-26 14:47   ` [tarantool-patches] " n.pettik
2019-02-26 15:36     ` Imeev Mergen
2019-02-26 18:17       ` n.pettik
2019-02-25 17:14 ` [tarantool-patches] [PATCH v2 5/5] sql: remove field nErr " imeevma
2019-02-26  8:27   ` [tarantool-patches] " Konstantin Osipov
2019-02-26 14:48   ` n.pettik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1551114402.git.imeevma@gmail.com \
    --to=imeevma@tarantool.org \
    --cc=korablev@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [tarantool-patches] [PATCH v2 0/5] sql: use diag_set() for errors in SQL' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox