Skip to content

Commit 97ed87d

Browse files
committed
Finish addition of TDS protver 7.3 ID support.
1 parent 4b5d5f6 commit 97ed87d

4 files changed

Lines changed: 18 additions & 1 deletion

File tree

ChangeLog

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ TBA
1212
Bug fixes
1313
---------
1414

15-
TBA
15+
- Finish implementation of TDS protocol version 7.3 support by actually
16+
accepting ``"7.3"`` as TDS protocol version when establishing a connection.
1617

1718
Version 2.1.3 - 2016-06-22 - Ramiro Morales
1819
===========================================

_mssql.pyx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ DEF EXCOMM = 9
3434
# Provide constants missing in FreeTDS 0.82 so that we can build against it
3535
DEF DBVERSION_71 = 5
3636
DEF DBVERSION_72 = 6
37+
# Provide constant missing from FreeTDS 0.91 so that we can build against it
38+
DEF DBVERSION_73 = 7
3739

3840
ROW_FORMAT_TUPLE = 1
3941
ROW_FORMAT_DICT = 2
@@ -1701,6 +1703,8 @@ cdef int _tds_ver_str_to_constant(verstr) except -1:
17011703
return DBVERSION_71
17021704
if verstr == u'7.2':
17031705
return DBVERSION_72
1706+
if verstr == u'7.3':
1707+
return DBVERSION_73
17041708
raise MSSQLException('unrecognized tds version: %s' % verstr)
17051709

17061710
#######################

docs/ref/_mssql.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,12 @@ Functions
126126
<http://www.freetds.org/userguide/freetdsconf.htm#TAB.FREETDS.CONF>`_
127127
`and here <http://www.freetds.org/userguide/envvar.htm>`_)
128128

129+
.. warning::
130+
FreeTDS added support for TDS protocol version 7.3 in version 0.95. You
131+
need to be careful of not asking for TDS 7.3 if you know the undelying
132+
FreeTDS used by pymssql is older as it won't raise any error nor keep you
133+
from passing such an invalid value.
134+
129135
``MSSQLConnection`` object properties
130136
-------------------------------------
131137

docs/ref/pymssql.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ Functions
110110
<http://www.freetds.org/userguide/freetdsconf.htm#TAB.FREETDS.CONF>`_
111111
`and here <http://www.freetds.org/userguide/envvar.htm>`_)
112112

113+
.. warning::
114+
FreeTDS added support for TDS protocol version 7.3 in version 0.95. You
115+
need to be careful of not asking for TDS 7.3 if you know the undelying
116+
FreeTDS used by pymssql is older as it won't raise any error nor keep you
117+
from passing such an invalid value.
118+
113119
.. function:: get_dbversion()
114120

115121
TBD

0 commit comments

Comments
 (0)