]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
MSSQL: only compile ORDER BY if it will be rendered
authorMatt Lewellyn <guruofgentoo@gmail.com>
Wed, 3 Apr 2019 22:39:15 +0000 (18:39 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 4 Apr 2019 14:52:29 +0000 (10:52 -0400)
commit97d4d15fde7999eba29c9708b65e11d82623f686
treea9195f899a63bfddd631452d50ea09d471162350
parentb90f9b5f367b16ddc1a2d5b06b12649c3fa9efdd
MSSQL: only compile ORDER BY if it will be rendered

Fixed issue in SQL Server dialect where if a bound parameter were present in
an ORDER BY expression that would ultimately not be rendered in the SQL
Server version of the statement, the parameters would still be part of the
execution parameters, leading to DBAPI-level errors.  Pull request courtesy
Matt Lewellyn.

Fixes: #4587
Closes: #4588
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/4588
Pull-request-sha: 2992a473e0f6d4fc27794cfd949ba20a81fad2ca

Change-Id: Ie709aefdb1babf810bb81526289448f8cc7a4cb1
doc/build/changelog/unreleased_13/4587.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mssql/base.py
test/dialect/mssql/test_compiler.py