From 6270cc0ee41c811f2718d37d3fc055c4734c625c Mon Sep 17 00:00:00 2001 From: Scott Lamb Date: Thu, 19 Aug 2021 10:57:00 -0700 Subject: [PATCH] adjust minimum SQLite version "without rowid" was introduced in 3.8.2, not 3.14.0. The latter was just "without rowid" virtual tables, a more obscure feature. --- guide/build.md | 2 +- server/db/db.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/guide/build.md b/guide/build.md index 861510b..229a55f 100644 --- a/guide/build.md +++ b/guide/build.md @@ -177,7 +177,7 @@ To build the server, you will need the following C libraries installed: timeouts for RTSP. For reliable reconnections on error, it's strongly recommended to use ffmpeg library versions >= 55.1.101. -* [SQLite3](https://www.sqlite.org/), at least version 3.14.0. +* [SQLite3](https://www.sqlite.org/), at least version 3.8.2. (You can skip this if you compile with `--features=bundled` and don't mind the `moonfire-nvr sql` command not working.) diff --git a/server/db/db.rs b/server/db/db.rs index 7459d75..49d7049 100644 --- a/server/db/db.rs +++ b/server/db/db.rs @@ -2118,11 +2118,11 @@ pub(crate) fn set_integrity_pragmas(conn: &mut rusqlite::Connection) -> Result<( } pub(crate) fn check_sqlite_version() -> Result<(), Error> { - // SQLite version 3.14.0 introduced the "without rowid" syntax used in the schema. - // https://www.sqlite.org/vtab.html#worid - if rusqlite::version_number() < 3014000 { + // SQLite version 3.8.2 introduced the "without rowid" syntax used in the schema. + // https://www.sqlite.org/withoutrowid.html + if rusqlite::version_number() < 3008002 { bail!( - "SQLite version {} is too old; need at least 3.14.0", + "SQLite version {} is too old; need at least 3.8.2", rusqlite::version() ); }