mirror of
https://git.sr.ht/~cismonx/bookmarkfs
synced 2025-06-07 19:58:50 +00:00
backend_firefox: fix sqlite version compatibility
In commit 348f13df02
, we replaced
`length(url)` with `octet_length(url)`.
However, `octet_length` was added in SQLite 3.43, while we claim to
support SQLite 3.35 and later.
Stable GNU/Linux distros like Debian may still be using pre-3.43
releases of SQLite, so don't bump that version too soon.
Instead, use `length(CAST(url AS BLOB))`, which is a bit less
efficient than `octet_length(url)`, but O(1) nonetheless.
This commit is contained in:
parent
1bbe928e50
commit
63d8b8e213
1 changed files with 2 additions and 2 deletions
|
@ -2146,7 +2146,7 @@ bookmark_do_list (
|
|||
// Type: 1 -> bookmark; 2 -> folder; 3 -> separator.
|
||||
#define BOOKMARK_LIST_NOJOIN_(col) BOOKMARK_LIST_(col ", 1 - `b`.`type` ", )
|
||||
#define BOOKMARK_LIST_EX_COLS_ \
|
||||
"ifnull(octet_length(`p`.`url`), -1), `b`.`lastModified`, " \
|
||||
"ifnull(length(CAST(`p`.`url` AS BLOB)), -1), `b`.`lastModified`, " \
|
||||
"`p`.`last_visit_date`"
|
||||
#define BOOKMARK_LIST_EX_(col) \
|
||||
BOOKMARK_LIST_(col ", " BOOKMARK_LIST_EX_COLS_ " ", \
|
||||
|
@ -2237,7 +2237,7 @@ bookmark_do_lookup (
|
|||
) {
|
||||
#define BOOKMARK_LOOKUP_(join, where) \
|
||||
"SELECT `b`.`id`, `b`.`lastModified`, " \
|
||||
"`p`.`last_visit_date`, octet_length(`p`.`url`) " \
|
||||
"`p`.`last_visit_date`, length(CAST(`p`.`url` AS BLOB)) " \
|
||||
"FROM `moz_bookmarks` `b` " \
|
||||
join "JOIN `moz_places` `p` ON `b`.`fk` = `p`.`id` WHERE " where
|
||||
#define BOOKMARK_LOOKUP_ASSOC_(col) \
|
||||
|
|
Loading…
Add table
Reference in a new issue