From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 634BF2A48C for ; Mon, 1 Apr 2019 16:45:02 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uKhdrysMFF8G for ; Mon, 1 Apr 2019 16:45:02 -0400 (EDT) Received: from smtp18.mail.ru (smtp18.mail.ru [94.100.176.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id F0BA02A3F6 for ; Mon, 1 Apr 2019 16:45:01 -0400 (EDT) From: Stanislav Zudin Subject: [tarantool-patches] [PATCH v2 05/15] sql: removes redundant function. Date: Mon, 1 Apr 2019 23:44:43 +0300 Message-Id: In-Reply-To: References: In-Reply-To: References: Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org, korablev@tarantool.org Cc: Stanislav Zudin 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