diff options
author | Anssi Kääriäinen <akaariai@gmail.com> | 2013-05-27 14:59:16 +0300 |
---|---|---|
committer | Anssi Kääriäinen <akaariai@gmail.com> | 2013-05-27 15:05:03 +0300 |
commit | 37ea9f9c03b8ec4305ac978e85db653b432b9921 (patch) | |
tree | 1a099d695c021971b4d6aceb3f3b2e0c71ac825e /django/db/backends/mysql/compiler.py | |
parent | 7a923128278e9e07cd8e7ca50400ba24617825dd (diff) | |
download | django-37ea9f9c03b8ec4305ac978e85db653b432b9921.tar.gz |
Fixed #20507 -- SubqueryConstraint alias handling
MySQL should work now, too.
Diffstat (limited to 'django/db/backends/mysql/compiler.py')
-rw-r--r-- | django/db/backends/mysql/compiler.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/django/db/backends/mysql/compiler.py b/django/db/backends/mysql/compiler.py index 50a085212b..4e033e3d93 100644 --- a/django/db/backends/mysql/compiler.py +++ b/django/db/backends/mysql/compiler.py @@ -17,8 +17,7 @@ class SQLCompiler(compiler.SQLCompiler): values.append(value) return row[:index_extra_select] + tuple(values) - def as_subquery_condition(self, alias, columns): - qn = self.quote_name_unless_alias + def as_subquery_condition(self, alias, columns, qn): qn2 = self.connection.ops.quote_name sql, params = self.as_sql() return '(%s) IN (%s)' % (', '.join(['%s.%s' % (qn(alias), qn2(column)) for column in columns]), sql), params |