From fd987cda0e8e54f9aa2e118c56fc35e96b8bd07d Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Wed, 4 Mar 2020 07:11:24 -0800 Subject: [PATCH] content-sqlite: drop unused dump prepared stmt Problem: The 'sql_dump' prepared statement is unused, left over from code removed in #2786. Remove unused prepared statement. --- src/modules/content-sqlite/content-sqlite.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/modules/content-sqlite/content-sqlite.c b/src/modules/content-sqlite/content-sqlite.c index f1c736051abe..919c80e5978c 100644 --- a/src/modules/content-sqlite/content-sqlite.c +++ b/src/modules/content-sqlite/content-sqlite.c @@ -35,7 +35,6 @@ const char *sql_load = "SELECT object,size FROM objects" " WHERE hash = ?1 LIMIT 1"; const char *sql_store = "INSERT INTO objects (hash,size,object) " " values (?1, ?2, ?3)"; -const char *sql_dump = "SELECT object,size FROM objects"; const char *sql_create_table_checkpt = "CREATE TABLE if not exists checkpt(" " key TEXT UNIQUE," @@ -52,7 +51,6 @@ struct content_sqlite { sqlite3 *db; sqlite3_stmt *load_stmt; sqlite3_stmt *store_stmt; - sqlite3_stmt *dump_stmt; sqlite3_stmt *checkpt_get_stmt; sqlite3_stmt *checkpt_put_stmt; flux_t *h; @@ -479,10 +477,6 @@ static void content_sqlite_closedb (struct content_sqlite *ctx) if (sqlite3_finalize (ctx->store_stmt) != SQLITE_OK) log_sqlite_error (ctx, "sqlite_finalize store_stmt"); } - if (ctx->dump_stmt) { - if (sqlite3_finalize (ctx->dump_stmt) != SQLITE_OK) - log_sqlite_error (ctx, "sqlite_finalize dump_stmt"); - } if (ctx->load_stmt) { if (sqlite3_finalize (ctx->load_stmt) != SQLITE_OK) log_sqlite_error (ctx, "sqlite_finalize load_stmt"); @@ -569,14 +563,6 @@ static int content_sqlite_opendb (struct content_sqlite *ctx) log_sqlite_error (ctx, "preparing store stmt"); goto error; } - if (sqlite3_prepare_v2 (ctx->db, - sql_dump, - -1, - &ctx->dump_stmt, - NULL) != SQLITE_OK) { - log_sqlite_error (ctx, "preparing dump stmt"); - goto error; - } if (sqlite3_prepare_v2 (ctx->db, sql_checkpt_get, -1,