diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-08-07 11:02:59 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-08-07 12:13:57 -0400 |
commit | 9de57843a3a98555df21b5c5585f8af699d8ec2e (patch) | |
tree | caeb4640b6be9e05d0bdfbbf5bd99561cc5e9622 /lib/sqlalchemy/sql/compiler.py | |
parent | b75630cec9418ef087e7c6af0370ac6ba728a251 (diff) | |
download | sqlalchemy-9de57843a3a98555df21b5c5585f8af699d8ec2e.tar.gz |
dont qualify literal_binds with literal_execute
this appears to be unnecessary and prevents end-user
literal_binds case from working.
Fixed issue where the ``literal_binds`` compiler flag, as used externally
to render bound parameters inline, would fail to work when used with a
certain class of parameters known as "literal_execute", which covers things
like LIMIT and OFFSET values for dialects where the drivers don't allow a
bound parameter, such as SQL Server's "TOP" clause. The issue locally
seemed to affect only the MSSQL dialect.
Fixes: #6863
Change-Id: Ia74cff5b0107b129a11b9b965883552b2962e449
Diffstat (limited to 'lib/sqlalchemy/sql/compiler.py')
-rw-r--r-- | lib/sqlalchemy/sql/compiler.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/compiler.py b/lib/sqlalchemy/sql/compiler.py index a81507acb..af15de164 100644 --- a/lib/sqlalchemy/sql/compiler.py +++ b/lib/sqlalchemy/sql/compiler.py @@ -2297,7 +2297,7 @@ class SQLCompiler(Compiled): else: post_compile = False - if not literal_execute and (literal_binds): + if literal_binds: ret = self.render_literal_bindparam( bindparam, within_columns_clause=True, **kwargs ) |