mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-26 20:39:22 -05:00
Fix maria engine to correctly recognize deadlocks
This commit is contained in:
parent
d5e7e6b9b6
commit
24d8134ac1
@ -42,6 +42,6 @@ class MariaEngine(object):
|
|||||||
prepare_database(db_conn, self)
|
prepare_database(db_conn, self)
|
||||||
|
|
||||||
def is_deadlock(self, error):
|
def is_deadlock(self, error):
|
||||||
if isinstance(error, self.module.InternalError):
|
if isinstance(error, self.module.DatabaseError):
|
||||||
return error.sqlstate == 40001 and error.errno == 1213
|
return error.sqlstate == "40001" and error.errno == 1213
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user