Closed Bug 1513320 Opened Last year Closed Last year

SQLite in some Docker images doesn't support common table expressions


(Firefox Build System :: Task Configuration, task)

Not set


(firefox-esr60 fixed, firefox66 fixed)

Tracking Status
firefox-esr60 --- fixed
firefox66 --- fixed


(Reporter: gps, Assigned: gps)


(Blocks 1 open bug)



(1 file)

Mercurial's new SQLite backend uses common table expressions (CTEs) for a query (specifically WITH RECURSIVE).

SQLite doesn't support this feature until version 3.8.3. Apparently some of our Docker images are running an older SQLite version because tasks like fail with an error related to WITH not being supported.

We'll need to upgrade to a modern SQLite before we can use the modern Mercurial feature.
According to Python, sqlite3.sqlite_version reports 3.7.13.

We'll want to build a backported SQLite for the debian 7 based images. I'll get on that.
Assignee: nobody → gps
The SQLite in Debian 7 (3.7.13) lacks support for common table
expressions (the WITH keyword), which was introduced in SQLite
3.8.3. The Mercurial SQLite storage backend currently relies on
CTEs. Even if a future Mercurial doesn't require CTE, it is likely
that it will still use CTE if available for performance reasons.
So, it is in our best interest to give Mercurial access to a
modern SQLite. Plus, using a modern SQLite and avoiding potential
bugs in old versions seems prudent.

This commit introduces a SQLite package backport for Debian 7
so we can use the new SQLite feature. We had to minimally patch
the build to work with an older version of TCL that isn't using

I observed libsqlite3 being installed in various other packages.
So I added the package dependency. I doubt this matters too much
since SQLite should be dynamically linked. But I don't think it
will hurt. And for the case of Python, I wouldn't be surprised if
Python is detecting SQLite features at build time, so having the
modern SQLite installed then makes sense.
I've gone ahead and scheduled this to autoland
Pushed by
SQLite package backport for Debian 7; r=glandium
Closed: Last year
Resolution: --- → FIXED
Pushed by
Port bug 1513320 - SQLite package backport for Debian 7. rs=bustage-fix
You need to log in before you can comment on or make changes to this bug.