From 1692dc019d803287047b16beda92fec4f1934622 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 5 May 2015 15:00:30 +0100 Subject: [PATCH] Don't call 'encode_parameter' no-op --- synapse/storage/_base.py | 4 ---- synapse/storage/engines/postgres.py | 3 --- synapse/storage/engines/sqlite3.py | 3 --- 3 files changed, 10 deletions(-) diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index c328b5274..e01c61d08 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -167,10 +167,6 @@ class LoggingTransaction(object): sql = self.database_engine.convert_param_style(sql) if args and args[0]: - args = list(args) - args[0] = [ - self.database_engine.encode_parameter(a) for a in args[0] - ] try: sql_logger.debug( "[SQL values] {%s} " + ", ".join(("<%r>",) * len(args[0])), diff --git a/synapse/storage/engines/postgres.py b/synapse/storage/engines/postgres.py index 64e34265f..a32302854 100644 --- a/synapse/storage/engines/postgres.py +++ b/synapse/storage/engines/postgres.py @@ -36,9 +36,6 @@ class PostgresEngine(object): def convert_param_style(self, sql): return sql.replace("?", "%s") - def encode_parameter(self, param): - return param - def on_new_connection(self, db_conn): db_conn.set_isolation_level( self.module.extensions.ISOLATION_LEVEL_REPEATABLE_READ diff --git a/synapse/storage/engines/sqlite3.py b/synapse/storage/engines/sqlite3.py index 7b49157cb..ff13d8006 100644 --- a/synapse/storage/engines/sqlite3.py +++ b/synapse/storage/engines/sqlite3.py @@ -26,9 +26,6 @@ class Sqlite3Engine(object): def convert_param_style(self, sql): return sql - def encode_parameter(self, param): - return param - def on_new_connection(self, db_conn): self.prepare_database(db_conn)