summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/mysql/mysqldb.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2016-07-04 15:54:29 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2017-04-05 12:18:36 -0400
commit86ef507cc73ee4a0a104b334d7ce08ad045e0c76 (patch)
treea077e8f2de416e7a2affb898a13982f8136ad8ba /lib/sqlalchemy/dialects/mysql/mysqldb.py
parent87b1404eda0f6d2e99b3b2a01ae1c641fbe91311 (diff)
downloadsqlalchemy-86ef507cc73ee4a0a104b334d7ce08ad045e0c76.tar.gz
Double percent signs based on paramstyle, not dialect
This patch moves the "doubling" of percent signs into the base compiler and makes it completely a product of whether or not the paramstyle is format/pyformat or not. Without this paramstyle, percent signs are not doubled across text(), literal_column(), and column(). Change-Id: Ie2f278ab1dbb94b5078f85c0096d74dbfa049197 Fixes: #3740
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql/mysqldb.py')
-rw-r--r--lib/sqlalchemy/dialects/mysql/mysqldb.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/mysqldb.py b/lib/sqlalchemy/dialects/mysql/mysqldb.py
index 6af860133..7941d4c41 100644
--- a/lib/sqlalchemy/dialects/mysql/mysqldb.py
+++ b/lib/sqlalchemy/dialects/mysql/mysqldb.py
@@ -64,19 +64,11 @@ class MySQLExecutionContext_mysqldb(MySQLExecutionContext):
class MySQLCompiler_mysqldb(MySQLCompiler):
- def visit_mod_binary(self, binary, operator, **kw):
- return self.process(binary.left, **kw) + " %% " + \
- self.process(binary.right, **kw)
-
- def post_process_text(self, text):
- return text.replace('%', '%%')
+ pass
class MySQLIdentifierPreparer_mysqldb(MySQLIdentifierPreparer):
-
- def _escape_identifier(self, value):
- value = value.replace(self.escape_quote, self.escape_to_quote)
- return value.replace("%", "%%")
+ pass
class MySQLDialect_mysqldb(MySQLDialect):