summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-07-02 18:24:58 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-07-02 18:25:35 -0400
commit9c5a13f0495c0f175b6c0fbd1124b6bedf232b2f (patch)
treef12eefb45021ef48a28fe1762a2f5b7d647b4991 /lib/sqlalchemy/sql
parent2180cf44e5856bc4be6cf5b125b8672b2158ffa2 (diff)
downloadsqlalchemy-9c5a13f0495c0f175b6c0fbd1124b6bedf232b2f.tar.gz
Fixed bug when using multi-table UPDATE where a supplemental
table is a SELECT with its own bound parameters, where the positioning of the bound parameters would be reversed versus the statement itself when using MySQL's special syntax. [ticket:2768]
Diffstat (limited to 'lib/sqlalchemy/sql')
-rw-r--r--lib/sqlalchemy/sql/compiler.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py
index 3de59ca90..ef935cfa6 100644
--- a/lib/sqlalchemy/sql/compiler.py
+++ b/lib/sqlalchemy/sql/compiler.py
@@ -1461,8 +1461,6 @@ class SQLCompiler(engine.Compiled):
extra_froms = update_stmt._extra_froms
- colparams = self._get_colparams(update_stmt, extra_froms)
-
text = "UPDATE "
if update_stmt._prefixes:
@@ -1472,6 +1470,8 @@ class SQLCompiler(engine.Compiled):
table_text = self.update_tables_clause(update_stmt, update_stmt.table,
extra_froms, **kw)
+ colparams = self._get_colparams(update_stmt, extra_froms)
+
if update_stmt._hints:
dialect_hints = dict([
(table, hint_text)