Do not lock table on SQLite when checking unsupported constraint
It is not needed as SQLite does not have an explicit lock mechanism but such call restart the transaction anyway. (grafted from 4cc5987a3b800121007968cebb5976a5cac2384b) --HG-- branch : 7.0
This commit is contained in:
1 parent
27ad4351b2
commit
5432222efb
1 file changed
+2
-1
@@ -2135,7 +2135,8 @@ class ModelSQL(ModelStorage):
|
||||
continue
|
||||
table = sql.table
|
||||
if isinstance(sql, (Unique, Exclude)):
|
||||
lock(connection, cls._table)
|
||||
if backend.name != 'sqlite':
|
||||
lock(connection, cls._table)
|
||||
columns = list(sql.columns)
|
||||
columns.insert(0, table.id)
|
||||
in_max = transaction.database.IN_MAX // (len(columns) + 1)
|
||||
|
||||
Reference in new issue
Block a user