Require SQLite3 version 3.15 or above

This is primarily to allow tuple comparisons in queries, though a better
query optimiser and other improvements mean that using newer versions of
sqlite is highly recommended anyway.
This commit is contained in:
Erik Johnston 2018-05-08 10:11:45 +01:00
parent 966686c845
commit 790328a93c
2 changed files with 7 additions and 1 deletions

View file

@ -15,7 +15,7 @@
from ._base import IncorrectDatabaseSetup
from .postgres import PostgresEngine
from .sqlite3 import Sqlite3Engine
from .sqlite3_engine import Sqlite3Engine
import importlib
import platform

View file

@ -15,6 +15,7 @@
from synapse.storage.prepare_database import prepare_database
import sqlite3
import struct
import threading
@ -25,6 +26,11 @@ class Sqlite3Engine(object):
def __init__(self, database_module, database_config):
self.module = database_module
if sqlite3.sqlite_version_info < (3, 15, 0):
raise RuntimeError(
"SQLite3 version is too old, Synapse requires 3.15 or later",
)
# The current max state_group, or None if we haven't looked
# in the DB yet.
self._current_state_group_id = None