From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Stanislav Zudin Subject: [PATCH 05/13] sql: removes redundant function. Date: Fri, 15 Mar 2019 18:45:34 +0300 Message-Id: <5080d8b28aed2d2ae14bcf709ddcf65d43be797b.1552663061.git.szudin@tarantool.org> In-Reply-To: References: In-Reply-To: References: To: tarantool-patches@freelists.org, vdavydov.dev@gmail.com Cc: Stanislav Zudin List-ID: --- 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