sqlite3: consistently comment where we want to upgrade.
What changed, and why it matters
This commit only adds and rewords comments in the source code to make it easier to find places where the project would like to require a newer SQLite version in the future. It does not change any actual behavior, fix any bug, or alter any security-related logic.
No action needed; this is a non-functional documentation/comment-only change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff is purely cosmetic: it inserts one new ‘FIXME’ comment in db/db_sqlite3.c noting that SQLite 3.25.0 supports ALTER TABLE RENAME, and rewords two existing FIXME comments in plugins/sql.c and wallet/db.c to use the consistent phrase ‘sqlite3 version’. No code logic, function signatures, or runtime behavior is changed.
Changed components
db/db_sqlite3.cplugins/sql.cwallet/db.cInspect captured patch +5 / −4
diff --git a/db/db_sqlite3.c b/db/db_sqlite3.c
index 876049e..8ee380a 100644
--- a/db/db_sqlite3.c
+++ b/db/db_sqlite3.c
@@ -570,6 +570,7 @@ static bool complete_table_manip(struct db *db,
return true;
}
+/* FIXME: sqlite3 version 3.25.0 (2018-09-15) supports ALTER TABLE RENAME */
static bool db_sqlite3_rename_column(struct db *db,
const char *tablename,
const char *from, const char *to)
diff --git a/plugins/sql.c b/plugins/sql.c
index 1496d7e..9e4ca30 100644
--- a/plugins/sql.c
+++ b/plugins/sql.c
@@ -873,8 +873,8 @@ static struct command_result *channels_refresh(struct command *cmd,
plugin_log(cmd->plugin, LOG_DBG, "Refreshing channel: %s",
fmt_short_channel_id(tmpctx, scid));
- /* FIXME: sqlite 3.24.0 (2018-06-04) added UPSERT, but
- * we don't require it. */
+ /* FIXME: sqlite3 version 3.24.0 (2018-06-04) added
+ * UPSERT, but we don't require it. */
delete_channel_from_db(cmd, scid);
req = jsonrpc_request_start(cmd, "listchannels",
listchannels_one_done,
diff --git a/wallet/db.c b/wallet/db.c
index 569182d..93707eb 100644
--- a/wallet/db.c
+++ b/wallet/db.c
@@ -1631,8 +1631,8 @@ static void migrate_channels_scids_as_integers(struct lightningd *ld,
/* FIXME: We cannot use ->delete_columns to remove
* short_channel_id, as other tables reference the channels
* (and sqlite3 has them referencing a now-deleted table!).
- * When we can assume sqlite3 2021-04-19 (3.35.5), we can
- * simply use DROP COLUMN (yay!) */
+ * When we can assume sqlite3 version 3.35.5 (2021-04-19),
+ * we can simply use DROP COLUMN (yay!) */
/* So null-out the unused column, at least! */
stmt = db_prepare_v2(db, SQL("UPDATE channels"
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.