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 56AEC294FB for ; Thu, 29 Mar 2018 02:42:20 -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 TbbsTEGk9A57 for ; Thu, 29 Mar 2018 02:42:20 -0400 (EDT) Received: from smtp40.i.mail.ru (smtp40.i.mail.ru [94.100.177.100]) (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 963E928D6E for ; Thu, 29 Mar 2018 02:42:19 -0400 (EDT) From: Kirill Yukhin Subject: [tarantool-patches] [PATCH 2/3] sql: remove dead find DB functions. Date: Thu, 29 Mar 2018 09:42:07 +0300 Message-Id: <5683bd2d41273210169cb57e8c440180b3f062b7.1522303843.git.kyukhin@tarantool.org> 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: v.shpilevoy@tarantool.org Cc: tarantool-patches@freelists.org, Kirill Yukhin Remove functions to find DB by name. Not used anymore, was used by SQL legacy code. --- src/box/sql/build.c | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/src/box/sql/build.c b/src/box/sql/build.c index 0efd5a6..05a7cc9 100644 --- a/src/box/sql/build.c +++ b/src/box/sql/build.c @@ -523,36 +523,6 @@ sqlite3NameFromToken(sqlite3 * db, Token * pName) } /* - * Parameter zName points to a nul-terminated buffer containing the name - * of a database ("main", "temp" or the name of an attached db). This - * function returns the index of the named database in db->aDb[], or - * -1 if the named db cannot be found. - */ -int -sqlite3FindDbName(const char *zName MAYBE_UNUSED) -{ - assert(0 == sqlite3_stricmp("main", zName)); - return 0; -} - -/* - * The token *pName contains the name of a database (either "main" or - * "temp" or the name of an attached db). This routine returns the - * index of the named database in db->aDb[], or -1 if the named db - * does not exist. - */ -int -sqlite3FindDb(sqlite3 * db, Token * pName) -{ - int i; /* Database number */ - char *zName; /* Name we are searching for */ - zName = sqlite3NameFromToken(db, pName); - i = sqlite3FindDbName(zName); - sqlite3DbFree(db, zName); - return i; -} - -/* * This routine is used to check if the UTF-8 string zName is a legal * unqualified name for an identifier. * Some objects may not be checked, because they are validated in Tarantool. -- 2.11.0