From: Stanislav Zudin <szudin@tarantool.org>
To: tarantool-patches@freelists.org, korablev@tarantool.org
Cc: Stanislav Zudin <szudin@tarantool.org>
Subject: [tarantool-patches] [PATCH v2 05/15] sql: removes redundant function.
Date: Mon, 1 Apr 2019 23:44:43 +0300 [thread overview]
Message-ID: <f40f6604a2a9c283b0c316d6b29f56457f07d56c.1554150265.git.szudin@tarantool.org> (raw)
In-Reply-To: <cover.1554150265.git.szudin@tarantool.org>
In-Reply-To: <cover.1554150265.git.szudin@tarantool.org>
Part of #3810
---
src/box/execute.c | 2 --
src/box/lua/sql.c | 2 --
src/box/sql/sqlInt.h | 3 ---
src/box/sql/vdbeapi.c | 8 --------
4 files changed, 15 deletions(-)
diff --git a/src/box/execute.c b/src/box/execute.c
index 31b89a75e..210b9a228 100644
--- a/src/box/execute.c
+++ b/src/box/execute.c
@@ -241,7 +241,6 @@ sql_column_to_messagepack(struct sql_stmt *stmt, int i,
int type = sql_column_type(stmt, i);
switch (type) {
case SQL_INTEGER: {
- assert(!sql_column_is_unsigned(stmt, i));
int64_t n = sql_column_int64(stmt, i);
if (n >= 0)
size = mp_sizeof_uint(n);
@@ -257,7 +256,6 @@ sql_column_to_messagepack(struct sql_stmt *stmt, int i,
break;
}
case SQL_UNSIGNED: {
- assert(sql_column_is_unsigned(stmt, i));
int64_t n = sql_column_int64(stmt, i);
size = mp_sizeof_uint(n);
char *pos = (char *) region_alloc(region, size);
diff --git a/src/box/lua/sql.c b/src/box/lua/sql.c
index 9a35c03aa..76bb44fa1 100644
--- a/src/box/lua/sql.c
+++ b/src/box/lua/sql.c
@@ -32,11 +32,9 @@ lua_push_row(struct lua_State *L, struct sql_stmt *stmt)
int type = sql_column_type(stmt, i);
switch (type) {
case SQL_INTEGER:
- assert(!sql_column_is_unsigned(stmt, i));
luaL_pushint64(L, sql_column_int64(stmt, i));
break;
case SQL_UNSIGNED:
- assert(sql_column_is_unsigned(stmt, i));
luaL_pushuint64(L, sql_column_int64(stmt, i));
break;
case SQL_FLOAT:
diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h
index 56aa7c681..9b1d7df9a 100644
--- a/src/box/sql/sqlInt.h
+++ b/src/box/sql/sqlInt.h
@@ -586,9 +586,6 @@ sql_column_text(sql_stmt *,
int
sql_column_type(sql_stmt *, int iCol);
-bool
-sql_column_is_unsigned(sql_stmt *, int iCol);
-
sql_value *
sql_column_value(sql_stmt *,
int iCol);
diff --git a/src/box/sql/vdbeapi.c b/src/box/sql/vdbeapi.c
index 2c486552e..c3bdb6f86 100644
--- a/src/box/sql/vdbeapi.c
+++ b/src/box/sql/vdbeapi.c
@@ -1085,14 +1085,6 @@ sql_column_type(sql_stmt * pStmt, int i)
return iType;
}
-bool sql_column_is_unsigned(sql_stmt * pStmt, int i)
-{
- const struct Mem* pMem = columnMem(pStmt, i);
- if (!pMem)
- return false;
- return (pMem->flags & MEM_Unsigned);
-}
-
enum sql_subtype
sql_column_subtype(struct sql_stmt *stmt, int i)
{
--
2.17.1
next prev parent reply other threads:[~2019-04-01 20:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-01 20:44 [tarantool-patches] [PATCH v2 00/15] sql: support -2^63 .. 2^64-1 integer type Stanislav Zudin
2019-04-01 20:44 ` [tarantool-patches] [PATCH v2 01/15] sql: Convert big integers from string Stanislav Zudin
2019-04-01 20:44 ` [tarantool-patches] [PATCH v2 02/15] sql: make VDBE recognize big integers Stanislav Zudin
2019-04-01 20:44 ` [tarantool-patches] [PATCH v2 03/15] sql: removes unused function Stanislav Zudin
2019-04-01 20:44 ` [tarantool-patches] [PATCH v2 04/15] sql: support big integers within sql binding Stanislav Zudin
2019-04-01 20:44 ` Stanislav Zudin [this message]
2019-04-01 20:44 ` [tarantool-patches] [PATCH v2 06/15] sql: arithmetic functions support big integers Stanislav Zudin
2019-04-01 20:44 ` [tarantool-patches] [PATCH v2 07/15] sql: aggregate sql functions support big int Stanislav Zudin
2019-04-01 20:44 ` [tarantool-patches] [PATCH v2 08/15] sql: fixes errors Stanislav Zudin
2019-04-01 20:44 ` [tarantool-patches] [PATCH v2 09/15] sql: support -2^63 .. 2^64-1 integer type Stanislav Zudin
2019-04-01 20:44 ` [tarantool-patches] [PATCH v2 10/15] " Stanislav Zudin
2019-04-01 20:44 ` [tarantool-patches] [PATCH v2 11/15] " Stanislav Zudin
2019-04-01 20:44 ` [tarantool-patches] [PATCH v2 12/15] " Stanislav Zudin
2019-04-01 20:44 ` [tarantool-patches] [PATCH v2 13/15] " Stanislav Zudin
2019-04-01 20:44 ` [tarantool-patches] [PATCH v2 14/15] " Stanislav Zudin
2019-04-01 20:44 ` [tarantool-patches] [PATCH v2 15/15] " Stanislav Zudin
2019-04-02 16:54 ` [tarantool-patches] Re: [PATCH v2 00/15] " 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=f40f6604a2a9c283b0c316d6b29f56457f07d56c.1554150265.git.szudin@tarantool.org \
--to=szudin@tarantool.org \
--cc=korablev@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='Re: [tarantool-patches] [PATCH v2 05/15] sql: removes redundant function.' \
/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