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 041D62A516 for ; Mon, 1 Apr 2019 16:45:09 -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 Mq-n_zpeYE9p for ; Mon, 1 Apr 2019 16:45:08 -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 A360E2A4E7 for ; Mon, 1 Apr 2019 16:45:08 -0400 (EDT) From: Stanislav Zudin Subject: [tarantool-patches] [PATCH v2 11/15] sql: support -2^63 .. 2^64-1 integer type Date: Mon, 1 Apr 2019 23:44:49 +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 Removes unused code. Part of #3810 --- src/box/sql/main.c | 11 ----------- src/box/sql/os_unix.c | 5 ----- src/box/sql/sqlInt.h | 9 --------- src/box/sql/util.c | 35 ----------------------------------- 4 files changed, 60 deletions(-) diff --git a/src/box/sql/main.c b/src/box/sql/main.c index a3c59b126..03dbaf842 100644 --- a/src/box/sql/main.c +++ b/src/box/sql/main.c @@ -1899,17 +1899,6 @@ sql_uri_parameter(const char *zFilename, const char *zParam) return 0; } -/* - * Return a boolean value for a query parameter. - */ -int -sql_uri_boolean(const char *zFilename, const char *zParam, int bDflt) -{ - const char *z = sql_uri_parameter(zFilename, zParam); - bDflt = bDflt != 0; - return z ? sqlGetBoolean(z, bDflt) : bDflt; -} - #ifdef SQL_ENABLE_SNAPSHOT /* * Obtain a snapshot handle for the snapshot of database zDb currently diff --git a/src/box/sql/os_unix.c b/src/box/sql/os_unix.c index b6599852a..615d539b5 100644 --- a/src/box/sql/os_unix.c +++ b/src/box/sql/os_unix.c @@ -1693,11 +1693,6 @@ getFileMode(const char *zFile, /* File name */ * corresponding database file and sets *pMode to this value. Whenever * possible, journal files are created using the same permissions * as the associated database file. - * - * If the SQL_ENABLE_8_3_NAMES option is enabled, then the - * original filename is unavailable. But 8_3_NAMES is only used for - * FAT filesystems and permissions do not matter there, so just use - * the default permissions. */ static int findCreateFileMode(const char *zPath, /* Path of file (possibly) being created */ diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h index c43d8c193..df051a32b 100644 --- a/src/box/sql/sqlInt.h +++ b/src/box/sql/sqlInt.h @@ -847,10 +847,6 @@ sql_limit(sql *, int id, int newVal); #define SQL_SYNC_FULL 0x00003 #define SQL_SYNC_DATAONLY 0x00010 -int -sql_uri_boolean(const char *zFile, - const char *zParam, int bDefault); - extern char * sql_temp_directory; @@ -4407,11 +4403,6 @@ enum arithmetic_result sqlDivInt64(i64 *, bool, i64, bool); enum arithmetic_result sqlRemInt64(i64 *, bool, i64, bool); int sqlAbsInt32(int); -#ifdef SQL_ENABLE_8_3_NAMES -void sqlFileSuffix3(const char *, char *); -#else -#define sqlFileSuffix3(X,Y) -#endif u8 sqlGetBoolean(const char *z, u8); const void *sqlValueText(sql_value *); diff --git a/src/box/sql/util.c b/src/box/sql/util.c index 1f3f92a04..62c43c555 100644 --- a/src/box/sql/util.c +++ b/src/box/sql/util.c @@ -1467,41 +1467,6 @@ sqlAbsInt32(int x) return -x; } -#ifdef SQL_ENABLE_8_3_NAMES -/* - * If SQL_ENABLE_8_3_NAMES is set at compile-time and if the database - * filename in zBaseFilename is a URI with the "8_3_names=1" parameter and - * if filename in z[] has a suffix (a.k.a. "extension") that is longer than - * three characters, then shorten the suffix on z[] to be the last three - * characters of the original suffix. - * - * If SQL_ENABLE_8_3_NAMES is set to 2 at compile-time, then always - * do the suffix shortening regardless of URI parameter. - * - * Examples: - * - * test.db-journal => test.nal - * test.db-wal => test.wal - * test.db-shm => test.shm - * test.db-mj7f3319fa => test.9fa - */ -void -sqlFileSuffix3(const char *zBaseFilename, char *z) -{ -#if SQL_ENABLE_8_3_NAMES<2 - if (sql_uri_boolean(zBaseFilename, "8_3_names", 0)) -#endif - { - int i, sz; - sz = sqlStrlen30(z); - for (i = sz - 1; i > 0 && z[i] != '/' && z[i] != '.'; i--) { - } - if (z[i] == '.' && ALWAYS(sz > i + 4)) - memmove(&z[i + 1], &z[sz - 3], 4); - } -} -#endif - /* * Find (an approximate) sum of two LogEst values. This computation is * not a simple "+" operator because LogEst is stored as a logarithmic -- 2.17.1