-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adds pre tds 7.1 compatibility #83
base: main
Are you sure you want to change the base?
Conversation
@microsoft-github-policy-service agree |
@@ -273,6 +273,10 @@ func readPreloginOption(buffer []byte, offset int) (*preloginOption, error) { | |||
rec_type := buffer[offset] | |||
if rec_type == preloginTERMINATOR { | |||
return &preloginOption{token: rec_type}, nil | |||
} else if rec_type == preloginTHREADID { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-tds/60f56408-0188-4cd5-8b90-25c6f2423868 there seems to be no constraint on the TDS-Version.
As I understand the documentation, the parameter is used for the client to communicate its thread-id for debugging-purposes. If sent by the server, it should be empty in any case.
thx for submitting a PR! -- FAIL: TestReturnStatusWithQuery (0.07s) |
@@ -119,7 +119,7 @@ type xmlInfo struct { | |||
XmlSchemaCollection string | |||
} | |||
|
|||
func readTypeInfo(r *tdsBuffer) (res typeInfo) { | |||
func readTypeInfo(sess *tdsSession, r *tdsBuffer) (res typeInfo) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about the code-style. I did not want to copy the whole readTypeInfo func for v7.1 compatibility as the version-info is needed in readVarLen
There still seems to be a problem with the transactions. |
This PR adds rough compatibility to older sql-servers (TDS <= 7.1)
Tested against our internal legacy mssql-server