summary refs log tree commit diff
path: root/synapse/storage/engines/sqlite.py
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2019-01-28 15:43:32 +0000
committerGitHub <noreply@github.com>2019-01-28 15:43:32 +0000
commit7072fe30846c47849c3cb142acef03ef3825a892 (patch)
treec8dcbbdd3752011871c1714c20f5264d60c81b68 /synapse/storage/engines/sqlite.py
parentMerge pull request #4412 from matrix-org/anoa/dm_room_upgrade (diff)
downloadsynapse-7072fe30846c47849c3cb142acef03ef3825a892.tar.xz
Fix UPSERTs on SQLite 3.24+ (#4477)
Diffstat (limited to 'synapse/storage/engines/sqlite.py')
-rw-r--r--synapse/storage/engines/sqlite.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/synapse/storage/engines/sqlite.py b/synapse/storage/engines/sqlite.py
index 31b8449ca1..059ab81055 100644
--- a/synapse/storage/engines/sqlite.py
+++ b/synapse/storage/engines/sqlite.py
@@ -33,14 +33,10 @@ class Sqlite3Engine(object):
     @property
     def can_native_upsert(self):
         """
-        Do we support native UPSERTs?
+        Do we support native UPSERTs? This requires SQLite3 3.24+, plus some
+        more work we haven't done yet to tell what was inserted vs updated.
         """
-        # SQLite3 3.24+ supports them, but empirically the unit tests don't work
-        # when its enabled.
-        # FIXME: Figure out what is wrong so we can re-enable native upserts
-
-        # return self.module.sqlite_version_info >= (3, 24, 0)
-        return False
+        return self.module.sqlite_version_info >= (3, 24, 0)
 
     def check_database(self, txn):
         pass