diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-07-30 10:34:36 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-07-30 10:34:36 -0400 |
| commit | dd6110eed335154e0ae14b2dba13e44af76c4f2b (patch) | |
| tree | 14090663623b65008e49d5eb5d428003e7ea19f5 /lib/sqlalchemy | |
| parent | d8efa2257ec650b345ec6e840984387263a957a6 (diff) | |
| download | sqlalchemy-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.py | 2 |
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 |
