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 BE27230C2B for ; Thu, 13 Jun 2019 18:24:49 -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 00wb4m1pG-kl for ; Thu, 13 Jun 2019 18:24:49 -0400 (EDT) Received: from smtp53.i.mail.ru (smtp53.i.mail.ru [94.100.177.113]) (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 80B0D308B2 for ; Thu, 13 Jun 2019 18:24:49 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v1 04/28] sql: remove sqlError() and remove sqlErrorWithMsg() References: From: Vladislav Shpilevoy Message-ID: Date: Fri, 14 Jun 2019 00:25:06 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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, imeevma@tarantool.org Thanks for the patch! Consider my review fixes below and on the branch in a separate commit. ====================================================== diff --git a/src/box/sql/os.c b/src/box/sql/os.c index eb7450b23..a06067583 100644 --- a/src/box/sql/os.c +++ b/src/box/sql/os.c @@ -128,12 +128,6 @@ sqlOsRandomness(sql_vfs * pVfs, int nByte, char *zBufOut) return pVfs->xRandomness(pVfs, nByte, zBufOut); } -int -sqlOsGetLastError(sql_vfs * pVfs) -{ - return pVfs->xGetLastError ? pVfs->xGetLastError(pVfs, 0, 0) : 0; -} - int sqlOsCurrentTimeInt64(sql_vfs * pVfs, sql_int64 * pTimeOut) { diff --git a/src/box/sql/os.h b/src/box/sql/os.h index 1514f0d8a..9122e9cb7 100644 --- a/src/box/sql/os.h +++ b/src/box/sql/os.h @@ -146,7 +146,6 @@ int sqlOsUnfetch(sql_file *, i64, void *); */ int sqlOsOpen(sql_vfs *, const char *, sql_file *, int, int *); int sqlOsRandomness(sql_vfs *, int, char *); -int sqlOsGetLastError(sql_vfs *); int sqlOsCurrentTimeInt64(sql_vfs *, sql_int64 *); /* diff --git a/src/box/sql/os_unix.c b/src/box/sql/os_unix.c index 615d539b5..486f9ce7c 100644 --- a/src/box/sql/os_unix.c +++ b/src/box/sql/os_unix.c @@ -2018,21 +2018,6 @@ unixCurrentTimeInt64(sql_vfs * NotUsed, sql_int64 * piNow) return rc; } -/* - * The xGetLastError() method is designed to return a better - * low-level error message when operating-system problems come up - * during sql operation. Only the integer return code is currently - * used. - */ -static int -unixGetLastError(sql_vfs * NotUsed, int NotUsed2, char *NotUsed3) -{ - UNUSED_PARAMETER(NotUsed); - UNUSED_PARAMETER(NotUsed2); - UNUSED_PARAMETER(NotUsed3); - return errno; -} - /* *********************** End of sql_vfs methods *************************** *****************************************************************************/ @@ -2057,7 +2042,6 @@ unixGetLastError(sql_vfs * NotUsed, int NotUsed2, char *NotUsed3) unixDelete, /* xDelete */ \ unixRandomness, /* xRandomness */ \ NULL, /* xCurrentTime */ \ - unixGetLastError, /* xGetLastError */ \ unixCurrentTimeInt64, /* xCurrentTimeInt64 */ \ } diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h index 2b7aa8bc8..a87c5748d 100644 --- a/src/box/sql/sqlInt.h +++ b/src/box/sql/sqlInt.h @@ -330,7 +330,6 @@ struct sql_vfs { int (*xDelete) (sql_vfs *, const char *zName, int syncDir); int (*xRandomness) (sql_vfs *, int nByte, char *zOut); int (*xCurrentTime) (sql_vfs *, double *); - int (*xGetLastError) (sql_vfs *, int, char *); /* ** The methods above are in version 1 of the sql_vfs object ** definition. Those that follow are added in version 2 or later