From: imeevma@tarantool.org
To: v.shpilevoy@tarantool.org
Cc: tarantool-patches@freelists.org
Subject: [tarantool-patches] [PATCH v1 02/28] sql: remove field pErr from struct sql
Date: Mon, 10 Jun 2019 16:56:28 +0300 [thread overview]
Message-ID: <2b9a4b3ba4726818c268e3d8db6c135ecbfcb75b.1560174553.git.imeevma@gmail.com> (raw)
In-Reply-To: <cover.1560174553.git.imeevma@gmail.com>
This field has become unused and should be removed.
---
src/box/sql/malloc.c | 3 +--
src/box/sql/sqlInt.h | 1 -
src/box/sql/util.c | 14 ++------------
src/box/sql/vdbeapi.c | 3 ---
4 files changed, 3 insertions(+), 18 deletions(-)
diff --git a/src/box/sql/malloc.c b/src/box/sql/malloc.c
index dbc6846..72a1fb9 100644
--- a/src/box/sql/malloc.c
+++ b/src/box/sql/malloc.c
@@ -939,8 +939,7 @@ apiOomError(sql * db)
* function. However, if a malloc() failure has occurred since the previous
* invocation SQL_NOMEM is returned instead.
*
- * If an OOM as occurred, then the connection error-code (the value
- * returned by sql_errcode()) is set to SQL_NOMEM.
+ * If an OOM as occurred, SQL_NOMEM is returned.
*/
int
sqlApiExit(sql * db, int rc)
diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h
index a7487c7..fe5e64c 100644
--- a/src/box/sql/sqlInt.h
+++ b/src/box/sql/sqlInt.h
@@ -1471,7 +1471,6 @@ struct sql {
void *pUpdateArg;
void (*xUpdateCallback) (void *, int, const char *, const char *,
sql_int64);
- sql_value *pErr; /* Most recent error message */
Lookaside lookaside; /* Lookaside malloc configuration */
Hash aFunc; /* Hash table of connection functions */
int *pnBytesFreed; /* If not NULL, increment this in DbFree() */
diff --git a/src/box/sql/util.c b/src/box/sql/util.c
index d5c93f8..62c29ce 100644
--- a/src/box/sql/util.c
+++ b/src/box/sql/util.c
@@ -138,8 +138,6 @@ sqlStrlen30(const char *z)
static SQL_NOINLINE void
sqlErrorFinish(sql * db, int err_code)
{
- if (db->pErr)
- sqlValueSetNull(db->pErr);
sqlSystemError(db, err_code);
}
@@ -153,7 +151,7 @@ sqlError(sql * db, int err_code)
{
assert(db != 0);
db->errCode = err_code;
- if (err_code || db->pErr)
+ if (err_code)
sqlErrorFinish(db, err_code);
}
@@ -199,16 +197,8 @@ sqlErrorWithMsg(sql * db, int err_code, const char *zFormat, ...)
assert(db != 0);
db->errCode = err_code;
sqlSystemError(db, err_code);
- if (zFormat == 0) {
+ if (zFormat == 0)
sqlError(db, err_code);
- } else if (db->pErr || (db->pErr = sqlValueNew(db)) != 0) {
- char *z;
- va_list ap;
- va_start(ap, zFormat);
- z = sqlVMPrintf(db, zFormat, ap);
- va_end(ap);
- sqlValueSetStr(db->pErr, -1, z, SQL_DYNAMIC);
- }
}
/*
diff --git a/src/box/sql/vdbeapi.c b/src/box/sql/vdbeapi.c
index 85059ed..81ee36b 100644
--- a/src/box/sql/vdbeapi.c
+++ b/src/box/sql/vdbeapi.c
@@ -107,9 +107,6 @@ invokeProfileCallback(sql * db, Vdbe * p)
* the sql_compile() routine. The integer returned is an SQL_
* success/failure code that describes the result of executing the virtual
* machine.
- *
- * This routine sets the error code and string returned by
- * sql_errcode(), sql_errmsg() and sql_errmsg16().
*/
int
sql_finalize(sql_stmt * pStmt)
--
2.7.4
next prev parent reply other threads:[~2019-06-10 13:56 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-10 13:56 [tarantool-patches] [PATCH v1 00/28] sql: Remove SQL error system imeevma
2019-06-10 13:56 ` [tarantool-patches] [PATCH v1 01/28] sql: remove field zErrMsg from struct Vdbe imeevma
2019-06-10 13:56 ` imeevma [this message]
2019-06-10 13:56 ` [tarantool-patches] [PATCH v1 03/28] sql: remove field errCode from struct sql imeevma
2019-06-10 13:56 ` [tarantool-patches] [PATCH v1 04/28] sql: remove sqlError() and remove sqlErrorWithMsg() imeevma
2019-06-13 22:25 ` [tarantool-patches] " Vladislav Shpilevoy
2019-06-15 9:45 ` Mergen Imeev
2019-06-10 13:56 ` [tarantool-patches] [PATCH v1 05/28] sql: remove unused functions of SQL error system imeevma
2019-06-10 13:56 ` [tarantool-patches] [PATCH v1 06/28] sql: disable lookaside system imeevma
2019-06-13 22:25 ` [tarantool-patches] " Vladislav Shpilevoy
2019-06-15 9:47 ` Mergen Imeev
2019-06-10 13:56 ` [tarantool-patches] [PATCH v1 07/28] sql: remove SQL_OK error/status code imeevma
2019-06-13 22:24 ` [tarantool-patches] " Vladislav Shpilevoy
2019-06-15 9:52 ` Mergen Imeev
2019-06-10 13:56 ` [tarantool-patches] [PATCH v1 08/28] sql: remove SQL_PERM, SQL_WARNING, SQL_ABORT errcodes imeevma
2019-06-10 13:56 ` [tarantool-patches] [PATCH v1 09/28] sql: remove SQL_CANTOPEN errcode imeevma
2019-06-10 13:56 ` [tarantool-patches] [PATCH v1 10/28] sql: remove SQL_NOTFOUND error/status code imeevma
2019-06-10 13:56 ` [tarantool-patches] [PATCH v1 11/28] sql: remove SQL_LOCKED errcode imeevma
2019-06-10 13:56 ` [tarantool-patches] [PATCH v1 12/28] sql: remove SQL_FULL errcode imeevma
2019-06-10 13:56 ` [tarantool-patches] [PATCH v1 13/28] sql: remove SQL_MISUSE errcode imeevma
2019-06-10 13:56 ` [tarantool-patches] [PATCH v1 14/28] sql: remove SQL_RANGE errcode imeevma
2019-06-10 13:56 ` [tarantool-patches] [PATCH v1 15/28] sql: remove SQL_SCHEMA errcode imeevma
2019-06-13 22:24 ` [tarantool-patches] " Vladislav Shpilevoy
2019-06-15 9:55 ` Mergen Imeev
2019-06-10 13:56 ` [tarantool-patches] [PATCH v1 16/28] sql: remove SQL_TOOBIG errcode imeevma
2019-06-13 22:24 ` [tarantool-patches] " Vladislav Shpilevoy
2019-06-15 9:57 ` Mergen Imeev
2019-06-10 13:56 ` [tarantool-patches] [PATCH v1 17/28] sql: remove SQL_BUSY errcode imeevma
2019-06-10 13:56 ` [tarantool-patches] [PATCH v1 18/28] sql: remove SQL_CONSTRAINT errcode imeevma
2019-06-13 22:24 ` [tarantool-patches] " Vladislav Shpilevoy
2019-06-15 10:00 ` Mergen Imeev
2019-06-18 20:40 ` Vladislav Shpilevoy
2019-06-19 8:02 ` Mergen Imeev
2019-06-10 13:56 ` [tarantool-patches] [PATCH v1 19/28] sql: remove SQL_ERROR errcode imeevma
2019-06-10 13:56 ` [tarantool-patches] [PATCH v1 20/28] sql: remove SQL_NOMEM errcode imeevma
2019-06-13 22:24 ` [tarantool-patches] " Vladislav Shpilevoy
2019-06-15 10:01 ` Mergen Imeev
2019-06-10 13:57 ` [tarantool-patches] [PATCH v1 21/28] sql: remove SQL_IOERR errcode imeevma
2019-06-10 13:57 ` [tarantool-patches] [PATCH v1 22/28] sql: remove SQL_TARANTOOL_ERROR errcode imeevma
2019-06-10 13:57 ` [tarantool-patches] [PATCH v1 23/28] sql: remove field errMask from struct sql imeevma
2019-06-10 13:57 ` [tarantool-patches] [PATCH v1 24/28] sql: replace rc by is_aborted in struct VDBE imeevma
2019-06-10 13:57 ` [tarantool-patches] [PATCH v1 25/28] sql: remove sql_log() imeevma
2019-06-13 22:24 ` [tarantool-patches] " Vladislav Shpilevoy
2019-06-15 10:02 ` Mergen Imeev
2019-06-10 13:57 ` [tarantool-patches] [PATCH v1 26/28] sql: cleanup of legacy memory management system imeevma
2019-06-13 22:24 ` [tarantool-patches] " Vladislav Shpilevoy
2019-06-15 10:04 ` Mergen Imeev
2019-06-18 20:40 ` Vladislav Shpilevoy
2019-06-19 8:04 ` Mergen Imeev
2019-06-10 13:57 ` [tarantool-patches] [PATCH v1 27/28] sql: make function return void instead of int imeevma
2019-06-10 13:57 ` [tarantool-patches] [PATCH v1 28/28] sql: remove function sqlApiExit() imeevma
2019-06-11 10:00 ` [tarantool-patches] Re: [PATCH v1 00/28] sql: Remove SQL error system Imeev Mergen
2019-06-13 22:24 ` Vladislav Shpilevoy
2019-06-15 10:08 ` Mergen Imeev
2019-06-19 19:11 ` Vladislav Shpilevoy
2019-06-20 16:08 ` Kirill Yukhin
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=2b9a4b3ba4726818c268e3d8db6c135ecbfcb75b.1560174553.git.imeevma@gmail.com \
--to=imeevma@tarantool.org \
--cc=tarantool-patches@freelists.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [tarantool-patches] [PATCH v1 02/28] sql: remove field pErr from struct 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