From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: tarantool-patches@freelists.org, AlexeyIvushkin <ivushkinalex@gmail.com>
Subject: [tarantool-patches] Re: [PATCH 0/2] First part of SQLite error codes refactoring
Date: Wed, 3 Oct 2018 23:04:12 +0300 [thread overview]
Message-ID: <b545a611-1e7a-5b87-09ba-4ef40fd37382@tarantool.org> (raw)
In-Reply-To: <cover.1538511704.git.ivushkinalex@gmail.com>
Hi! Thanks for the patchset!
Unfortunately, SQLITE_IOERR and CONSTRAINT are not the only
error codes. Please, look at enum sql_ret_code in sqliteInt.h
All of these codes are errors too and should be refactored
alongside with this patch - I mean SQLITE_OK, SQLITE_ERROR,
SQLITE_PERM etc. Strictly speaking, I think SQLITE_OK should
be removed and be replaced with inlined 0 as it is done in
other parts of Tarantool.
On 02/10/2018 23:50, AlexeyIvushkin wrote:
> From: Morgan-iv <ivushkinalex@gmail.com>
>
> These 2 patches are the beginning of SQLite error codes refactoring.
> Both of them change implementation of affected error codes from
> define macro to enum statement, and remove codes that aren't returned
> anywhere, but first also remove related function that aren't called
> anywhere too. First patch affects SQLITE_IOERR_ codes, second -
> SQLITE_CONSTRAINT_ codes.
> Final rename of all error codes affected in these 2 patches and
> the next several patches in this branch will be applied after removing
> all unused error codes and removing all found unused functions related
> to affected SQLite error codes
>
> Issue: https://github.com/tarantool/tarantool/issues/3315
> Branch: https://github.com/tarantool/tarantool/tree/Morgan-iv/gh-3315
>
> Morgan-iv (2):
> sql: refactor SQLITE_IOERR_ error codes
> sql: remove unused SQLITE_CONSTRAINT_ error codes
>
> src/box/sql/main.c | 51 ----------------------------
> src/box/sql/os_unix.c | 88 -------------------------------------------------
> src/box/sql/sqliteInt.h | 56 ++++++++++++-------------------
> 3 files changed, 21 insertions(+), 174 deletions(-)
>
prev parent reply other threads:[~2018-10-03 20:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-02 20:50 [tarantool-patches] " AlexeyIvushkin
2018-10-02 20:50 ` [tarantool-patches] [PATCH] box: add tuple:size function AlexeyIvushkin
2018-10-02 20:50 ` [tarantool-patches] [PATCH 1/2] sql: refactor SQLITE_IOERR_ error codes AlexeyIvushkin
2018-10-03 20:06 ` [tarantool-patches] " Vladislav Shpilevoy
2018-10-02 20:50 ` [tarantool-patches] [PATCH 2/2] sql: remove unused SQLITE_CONSTRAINT_ " AlexeyIvushkin
2018-10-03 20:07 ` [tarantool-patches] " Vladislav Shpilevoy
2018-10-03 20:04 ` Vladislav Shpilevoy [this message]
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=b545a611-1e7a-5b87-09ba-4ef40fd37382@tarantool.org \
--to=v.shpilevoy@tarantool.org \
--cc=ivushkinalex@gmail.com \
--cc=tarantool-patches@freelists.org \
--subject='[tarantool-patches] Re: [PATCH 0/2] First part of SQLite error codes refactoring' \
/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