summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/mysql
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-10-12 20:04:55 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-10-12 20:04:55 -0400
commit9bc9d5c1068be878118202259add3c2e1bcec0cb (patch)
tree9e611c162b83debad6c70b5436c61630546c2872 /lib/sqlalchemy/dialects/mysql
parenteabf41b392ac042228765c9b95138522e44365e7 (diff)
downloadsqlalchemy-9bc9d5c1068be878118202259add3c2e1bcec0cb.tar.gz
- Fixed bug in default compiler plus those of postgresql, mysql, and
mssql to ensure that any literal SQL expression values are rendered directly as literals, instead of as bound parameters, within a CREATE INDEX statement. [ticket:2742] - don't need expression_as_ddl(); literal_binds and include_table take care of this functionality.
Diffstat (limited to 'lib/sqlalchemy/dialects/mysql')
-rw-r--r--lib/sqlalchemy/dialects/mysql/base.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py
index fd6a47a10..3bbd88d52 100644
--- a/lib/sqlalchemy/dialects/mysql/base.py
+++ b/lib/sqlalchemy/dialects/mysql/base.py
@@ -1523,7 +1523,8 @@ class MySQLDDLCompiler(compiler.DDLCompiler):
self._verify_index_table(index)
preparer = self.preparer
table = preparer.format_table(index.table)
- columns = [self.sql_compiler.process(expr, include_table=False)
+ columns = [self.sql_compiler.process(expr, include_table=False,
+ literal_binds=True)
for expr in index.expressions]
name = self._prepared_index_name(index)