diff --git a/src/relstorage/adapters/mysql/mover.py b/src/relstorage/adapters/mysql/mover.py index 9e967f17..2f7106c9 100644 --- a/src/relstorage/adapters/mysql/mover.py +++ b/src/relstorage/adapters/mysql/mover.py @@ -96,15 +96,17 @@ def restore(self, cursor, batcher, oid, tid, data): Used for copying transactions into this database. """ if self.version_detector.requires_values_upsert_alias(cursor): + alias = 'AS NEW' def VALUES(col): return 'NEW.' + col else: + alias = '' def VALUES(col): return f'VALUES({col})' if self.keep_history: suffix = f""" - AS NEW + {alias} ON DUPLICATE KEY UPDATE tid = {VALUES('tid')}, prev_tid = {VALUES('prev_tid')}, @@ -114,7 +116,7 @@ def VALUES(col): """ else: suffix = f""" - AS NEW + {alias} ON DUPLICATE KEY UPDATE tid = {VALUES('tid')}, state_size = {VALUES('state_size')}, diff --git a/src/relstorage/tests/blob/blob_cache.py b/src/relstorage/tests/blob/blob_cache.py index f4e07925..8b30da77 100644 --- a/src/relstorage/tests/blob/blob_cache.py +++ b/src/relstorage/tests/blob/blob_cache.py @@ -184,7 +184,7 @@ def client(client_num): threads = [threading.Thread(target=client, args=(i,)) for i in range(self.CLIENT_COUNT)] for thread in threads: - thread.setDaemon(True) + thread.daemon = True thread.start() for thread in threads: