Skip to content

Commit

Permalink
Send the driver version to the database during prelogin (#1583)
Browse files Browse the repository at this point in the history
  • Loading branch information
David Engel committed May 20, 2021
1 parent 1f550f1 commit a5e9ca7
Showing 1 changed file with 9 additions and 3 deletions.
Expand Up @@ -3046,9 +3046,15 @@ void Prelogin(String serverName, int portNumber) throws SQLServerException {

// PL_OPTION_DATA
byte[] preloginOptionData = {
// - Server version -
// (out param, filled in by the server in the prelogin response).
0, 0, 0, 0, 0, 0,
// Driver major and minor version, 1 byte each
(byte) SQLJdbcVersion.major,
(byte) SQLJdbcVersion.minor,
// Revision (Big Endian), 2 bytes
(byte) ((SQLJdbcVersion.patch & 0xff00) >> 8),
(byte) (SQLJdbcVersion.patch & 0xff),
// Build (Little Endian), 2 bytes
(byte) (SQLJdbcVersion.build & 0xff),
(byte) ((SQLJdbcVersion.build & 0xff00) >> 8),

// - Encryption -
(null == clientCertificate) ? requestedEncryptionLevel
Expand Down

0 comments on commit a5e9ca7

Please sign in to comment.