summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2015-07-30 10:34:36 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2015-07-30 10:34:36 -0400
commitdd6110eed335154e0ae14b2dba13e44af76c4f2b (patch)
tree14090663623b65008e49d5eb5d428003e7ea19f5 /lib/sqlalchemy
parentd8efa2257ec650b345ec6e840984387263a957a6 (diff)
downloadsqlalchemy-dd6110eed335154e0ae14b2dba13e44af76c4f2b.tar.gz
- Fixed issue where the SQL Server dialect would reflect a string-
or other variable-length column type with unbounded length by assigning the token ``"max"`` to the length attribute of the string. While using the ``"max"`` token explicitly is supported by the SQL Server dialect, it isn't part of the normal contract of the base string types, and instead the length should just be left as None. The dialect now assigns the length to None on reflection of the type so that the type behaves normally in other contexts. fixes #3504
Diffstat (limited to 'lib/sqlalchemy')
-rw-r--r--lib/sqlalchemy/dialects/mssql/base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/mssql/base.py b/lib/sqlalchemy/dialects/mssql/base.py
index bd41c19bf..6670a28bd 100644
--- a/lib/sqlalchemy/dialects/mssql/base.py
+++ b/lib/sqlalchemy/dialects/mssql/base.py
@@ -1772,7 +1772,7 @@ class MSDialect(default.DefaultDialect):
MSNText, MSBinary, MSVarBinary,
sqltypes.LargeBinary):
if charlen == -1:
- charlen = 'max'
+ charlen = None
kwargs['length'] = charlen
if collation:
kwargs['collation'] = collation