[tarantool-patches] [PATCH 2/3] sql: remove dead find DB functions.

Kirill Yukhin kyukhin at tarantool.org
Thu Mar 29 09:42:07 MSK 2018


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





More information about the Tarantool-patches mailing list