Skip to content
Browse files

Fixed #20507 -- SubqueryConstraint alias handling

MySQL should work now, too.
  • Loading branch information...
1 parent 7a92312 commit 37ea9f9c03b8ec4305ac978e85db653b432b9921 @akaariai akaariai committed
Showing with 1 addition and 2 deletions.
  1. +1 −2 django/db/backends/mysql/compiler.py
View
3 django/db/backends/mysql/compiler.py
@@ -17,8 +17,7 @@ def resolve_columns(self, row, fields=()):
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

0 comments on commit 37ea9f9

Please sign in to comment.
Something went wrong with that request. Please try again.