Skip to content

Commit

Permalink
content-sqlite: drop unused dump prepared stmt
Browse files Browse the repository at this point in the history
Problem: The 'sql_dump' prepared statement is unused,
left over from code removed in #2786.

Remove unused prepared statement.
  • Loading branch information
garlick committed Mar 4, 2020
1 parent 2d24d85 commit fd987cd
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/modules/content-sqlite/content-sqlite.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,"
Expand All @@ -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;
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit fd987cd

Please sign in to comment.