From: Mike Bayer Date: Sun, 12 Feb 2006 06:29:57 +0000 (+0000) Subject: slight glitch when the same clause is compiled repeatedly and contains redundant... X-Git-Tag: rel_0_1_0~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=703908caadfc2cb763e2838e4886074aef32c294;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git slight glitch when the same clause is compiled repeatedly and contains redundant bind parameters...this fix prevents the binds from stepping on each other.... --- diff --git a/lib/sqlalchemy/ansisql.py b/lib/sqlalchemy/ansisql.py index 3eaed0bc1d..a300dc6392 100644 --- a/lib/sqlalchemy/ansisql.py +++ b/lib/sqlalchemy/ansisql.py @@ -222,7 +222,7 @@ class ANSICompiler(sql.Compiled): def visit_bindparam(self, bindparam): if bindparam.shortname != bindparam.key: - self.binds[bindparam.shortname] = bindparam + self.binds.setdefault(bindparam.shortname, bindparam) count = 1 key = bindparam.key