Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,109 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)

## [13.5.1] Preview Release

### Added

- **Add Enhanced Routing Support for Hyperscale Reader Endpoints** [#2935](https://github.com/microsoft/mssql-jdbc/pull/2935)
**What was added**: Implemented TDS FEATUREEXT 0x0F negotiation and ENVCHANGE 0x21 parsing to support Hyperscale reader endpoints that load balance connections across named replicas, including routed database name propagation in Login7.
**Who benefits**: Applications connecting to Azure SQL Hyperscale databases using reader endpoints for read scale-out.
**Impact**: Enables automatic connection routing to named replicas with correct database context, while maintaining backward compatibility with servers that do not support enhanced routing.

- **Add Support for JDK 26** [#2939](https://github.com/microsoft/mssql-jdbc/pull/2939)
**What was added**: New jre26 build profile for both Maven and Gradle, with updated compiler settings and test dependencies.
**Who benefits**: Applications running on JDK 26.
**Impact**: Enables building and testing the driver on JDK 26 without changing runtime behavior.

- **Add defaultTransactionIsolation Connection Property** [#2918](https://github.com/microsoft/mssql-jdbc/pull/2918)
**What was added**: New `defaultTransactionIsolation` connection property allowing users to specify the initial transaction isolation level via JDBC URL or SQLServerDataSource, with automatic execution of `SET TRANSACTION ISOLATION LEVEL` upon connection establishment.
**Who benefits**: Applications requiring a specific isolation level at connection time, especially in connection pool and third-party tool environments.
**Impact**: Simplifies configuration of isolation levels without requiring application code changes.

- **Add Defense-in-Depth XML Secure Processing to SAXSource and StAXSource Paths** [#2915](https://github.com/microsoft/mssql-jdbc/pull/2915)
**What was added**: Enabled FEATURE_SECURE_PROCESSING and DTD/external entity protections on SAXSource and StAXSource parser paths in SQLServerSQLXML, matching existing DOMSource hardening.
**Who benefits**: All users of the SQLXML API.
**Impact**: Uniformly hardens all three XML parser paths as defense-in-depth, complementing SQL Server's storage-layer DTD rejection.

- **Add XA State Machine Test with Randomized Transaction Testing** [#2923](https://github.com/microsoft/mssql-jdbc/pull/2923)
**What was added**: State-machine based randomized test coverage for XA transaction flows.
**Who benefits**: Driver maintainers and CI stability efforts.
**Impact**: Improves edge-case detection for XA transaction scenarios with reproducible failures.

- **[Retire FX] Port Functional Test Scenarios for TVP** [#2901](https://github.com/microsoft/mssql-jdbc/pull/2901)
**What was added**: Migrated legacy FX functional test scenarios for Table-Valued Parameters into JUnit 5.
**Who benefits**: Contributors and CI validation pipelines.
**Impact**: Advances FX test retirement with full behavioral parity.

- **Port FX ResultSet Tests to State-Machine Based JUnit 5 Tests** [#2912](https://github.com/microsoft/mssql-jdbc/pull/2912)
**What was added**: Migrated FX ResultSet regression tests to state-machine based JUnit 5 tests.
**Who benefits**: Contributors and CI validation pipelines.
**Impact**: Improves test reproducibility and edge-case detection for ResultSet operations.

- **Port FX Statement Execution Scenarios to State-Machine Based Tests** [#2908](https://github.com/microsoft/mssql-jdbc/pull/2908)
**What was added**: Migrated FX statement execution scenarios to state-machine based JUnit 5 tests.
**Who benefits**: Contributors and CI validation pipelines.
**Impact**: Completes state-machine coverage for statement execution paths.

- **Port Functional Test Scenarios for Sparse Columns to JUnit** [#2922](https://github.com/microsoft/mssql-jdbc/pull/2922)
**What was added**: Migrated legacy FX sparse column test scenarios into JUnit 5.
**Who benefits**: Contributors and CI validation pipelines.
**Impact**: Extends FX test retirement coverage to sparse column scenarios.

- **[Retire FX] Port Functional Test Scenarios for Globalization** [#2924](https://github.com/microsoft/mssql-jdbc/pull/2924)
**What was added**: Migrated legacy FX globalization test scenarios into JUnit 5.
**Who benefits**: Contributors and CI validation pipelines.
**Impact**: Extends FX test retirement coverage to globalization scenarios.

### Changed

- **Deprecate microsoft.sql.DateTimeOffset in Favor of java.time.OffsetDateTime** [#2920](https://github.com/microsoft/mssql-jdbc/pull/2920)
**What was changed**: Deprecated the proprietary `microsoft.sql.DateTimeOffset` type and added new `getOffsetDateTime()`, `setOffsetDateTime()`, and `updateOffsetDateTime()` methods to promote `java.time.OffsetDateTime` (JSR-310) as the canonical Java mapping for SQL Server `datetimeoffset` columns.
**Who benefits**: Applications seeking standards-based, vendor-neutral date/time handling.
**Impact**: Improves portability and ORM/middleware interoperability while preserving full backward compatibility with existing DateTimeOffset APIs.

- **Improve Class Validation in Util.newInstance() by Deferring Initialization** [#2914](https://github.com/microsoft/mssql-jdbc/pull/2914)
**What was changed**: Updated `Util.newInstance()` to use `Class.forName(className, false, classLoader)` to defer class initialization until after `isAssignableFrom()` validation completes, with a classloader fallback strategy.
**Who benefits**: Applications using connection properties such as `trustManagerClass`, `socketFactoryClass`, and `accessTokenCallbackClass`.
**Impact**: Strengthens validation of user-supplied class names by ensuring type checks occur before any static initialization side effects.

### Fixed

- **Fix Integer Overflow When Reading PLP Chunk Sizes from TDS Stream** [#2916](https://github.com/microsoft/mssql-jdbc/pull/2916)
**What was fixed**: Prevented CWE-190 integer overflow in `readBytesInternal()` when casting unsigned 32-bit PLP chunk sizes from long to int.
**Who benefits**: Applications processing large PLP data streams.
**Impact**: Ensures safe handling of chunk sizes exceeding Integer.MAX_VALUE in the TDS stream reader.

- **Fix Socket Hang When socketTimeout Not Set During Federated Auth Login** [#2927](https://github.com/microsoft/mssql-jdbc/pull/2927)
**What was fixed**: Corrected pre-connection socket timeout computation so that `loginTimeout` properly bounds socket I/O when `socketTimeout` defaults to 0 (unlimited).
**Who benefits**: Applications using federated authentication (Managed Identity, Azure AD) without an explicit `socketTimeout`.
**Impact**: Resolves indefinite connection hangs during federated auth login while preserving post-login unlimited socket timeout semantics.

- **Fix User Agent String in Case of an Exception** [#2926](https://github.com/microsoft/mssql-jdbc/pull/2926)
**What was fixed**: User agent string fields are now populated with "Unknown" when an exception occurs during collection, preventing malformed telemetry data.
**Who benefits**: All users of the driver's user agent telemetry feature.
**Impact**: Ensures robust user agent string generation regardless of runtime environment errors.

- **Fix getIndexInfo() Returning ORDINAL_POSITION=0 for INCLUDE Columns** [#2943](https://github.com/microsoft/mssql-jdbc/pull/2943)
**What was fixed**: Narrowed the supplemental columnstore index query to restrict results to columnstore index types only (`i.type IN (5, 6)`) and replaced `ic.key_ordinal` with `ic.index_column_id` for correct 1-based ordinal positions.
**Who benefits**: Applications querying index metadata on tables with INCLUDE columns or columnstore indexes.
**Impact**: Eliminates JDBC specification violations (ORDINAL_POSITION=0) and prevents downstream IndexOutOfBoundsException errors.

- **Fix Flaky Randomized Statement Test** [#2930](https://github.com/microsoft/mssql-jdbc/pull/2930)
**What was fixed**: Aligned getGeneratedKeys() with the FX framework pattern in randomized Statement tests.
**Who benefits**: Contributors and CI pipelines.
**Impact**: Improves test stability without affecting runtime behavior.

- **Fix XA Test Timeout Issue in testXAWithIsolationLevels** [#2933](https://github.com/microsoft/mssql-jdbc/pull/2933)
**What was fixed**: Resolved timeout issue in XA isolation level tests.
**Who benefits**: Contributors and CI pipelines.
**Impact**: Improves test reliability without affecting runtime behavior.

- **Add legacyFxXa Tag in Exclude Group for build.gradle** [#2937](https://github.com/microsoft/mssql-jdbc/pull/2937)
**What was fixed**: Added the legacyFxXa test tag to the Gradle exclude group to prevent test execution conflicts.
**Who benefits**: Contributors running tests via Gradle.
**Impact**: Ensures correct test filtering in the Gradle build.

## [13.4.0] Stable Release

### Added
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ We're now on the Maven Central Repository. Add the following to your POM file to
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>13.4.0.jre11</version>
<version>13.5.1.jre11-preview</version>
</dependency>
```
The driver can be downloaded from [Microsoft](https://aka.ms/downloadmssqljdbc). For driver version 12.1.0 and greater, please use the jre11 version when using Java 11 or greater, and the jre8 version when using Java 8.
Expand All @@ -96,7 +96,7 @@ To get the latest version of the driver, add the following to your POM file:
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>13.4.0.jre11</version>
<version>13.5.1.jre11-preview</version>
</dependency>
```

Expand Down Expand Up @@ -131,7 +131,7 @@ Projects that require either of the two features need to explicitly declare the
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>13.4.0.jre11</version>
<version>13.5.1.jre11-preview</version>
<scope>compile</scope>
</dependency>

Expand All @@ -149,7 +149,7 @@ Projects that require either of the two features need to explicitly declare the
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>13.4.0.jre11</version>
<version>13.5.1.jre11-preview</version>
<scope>compile</scope>
</dependency>

Expand All @@ -176,7 +176,7 @@ When setting 'useFmtOnly' property to 'true' for establishing a connection or cr
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>13.4.0.jre11</version>
<version>13.5.1.jre11-preview</version>
</dependency>

<dependency>
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ plugins {
id 'java'
}

version = '13.4.0'
def releaseExt = ''
version = '13.5.1'
def releaseExt = '-preview'
def jreVersion = ""
def testOutputDir = file("build/classes/java/test")
def archivesBaseName = 'mssql-jdbc'
Expand Down
2 changes: 1 addition & 1 deletion mssql-jdbc_auth_LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MICROSOFT SOFTWARE LICENSE TERMS
MICROSOFT JDBC DRIVER 13.4.0 FOR SQL SERVER
MICROSOFT JDBC DRIVER 13.5.1 FOR SQL SERVER

These license terms are an agreement between you and Microsoft Corporation (or one of its affiliates). They apply to the software named above and any Microsoft services or software updates (except to the extent such services or updates are accompanied by new or additional terms, in which case those different terms apply prospectively and do not alter your or Microsoft’s rights relating to pre-updated software or services). IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE RIGHTS BELOW. BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS.

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>13.4.0</version>
<version>13.5.1</version>
<packaging>jar</packaging>
<name>Microsoft JDBC Driver for SQL Server</name>
<description>
Expand Down Expand Up @@ -55,7 +55,7 @@
Default testing enabled with SQL Server 2019 (SQLv15) -->
<excludedGroups>xSQLv12,xSQLv15,NTLM,MSI,reqExternalSetup,clientCertAuth,fedAuth,kerberos,vectorTest,JSONTest,vectorFloat16Test</excludedGroups>
<!-- Use -preview for preview release, leave empty for official release. -->
<releaseExt></releaseExt>
<releaseExt>-preview</releaseExt>
<!-- Driver Dependencies -->
<org.osgi.core.version>6.0.0</org.osgi.core.version>
<azure-security-keyvault-keys.version>4.10.5</azure-security-keyvault-keys.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@

final class SQLJdbcVersion {
static final int MAJOR = 13;
static final int MINOR = 4;
static final int PATCH = 0;
static final int MINOR = 5;
static final int PATCH = 1;
static final int BUILD = 0;
/*
* Used to load mssql-jdbc_auth DLL.
* 1. Set to "-preview" for preview release.
* 2. Set to "" (empty String) for official release.
*/
static final String RELEASE_EXT = "";
static final String RELEASE_EXT = "-preview";

private SQLJdbcVersion() {
throw new UnsupportedOperationException(SQLServerException.getErrString("R_notSupported"));
Expand Down
2 changes: 1 addition & 1 deletion src/samples/adaptive/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>13.4.0.jre11</version>
<version>13.5.1.jre11-preview</version>
</dependency>
</dependencies>
<profiles>
Expand Down
2 changes: 1 addition & 1 deletion src/samples/alwaysencrypted/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>13.4.0.jre11</version>
<version>13.5.1.jre11-preview</version>
</dependency>
</dependencies>
<profiles>
Expand Down
2 changes: 1 addition & 1 deletion src/samples/azureactivedirectoryauthentication/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>13.4.0.jre11</version>
<version>13.5.1.jre11-preview</version>
</dependency>
</dependencies>
<profiles>
Expand Down
2 changes: 1 addition & 1 deletion src/samples/connections/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>13.4.0.jre11</version>
<version>13.5.1.jre11-preview</version>
</dependency>
</dependencies>
<profiles>
Expand Down
2 changes: 1 addition & 1 deletion src/samples/constrained/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>13.4.0.jre11</version>
<version>13.5.1.jre11-preview</version>
</dependency>
</dependencies>
<profiles>
Expand Down
2 changes: 1 addition & 1 deletion src/samples/dataclassification/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>13.4.0.jre11</version>
<version>13.5.1.jre11-preview</version>
</dependency>
</dependencies>
<profiles>
Expand Down
2 changes: 1 addition & 1 deletion src/samples/datatypes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>13.4.0.jre11</version>
<version>13.5.1.jre11-preview</version>
</dependency>
</dependencies>
<profiles>
Expand Down
2 changes: 1 addition & 1 deletion src/samples/resultsets/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>13.4.0.jre11</version>
<version>13.5.1.jre11-preview</version>
</dependency>
</dependencies>
<profiles>
Expand Down
2 changes: 1 addition & 1 deletion src/samples/sparse/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>13.4.0.jre11</version>
<version>13.5.1.jre11-preview</version>
</dependency>
</dependencies>
<profiles>
Expand Down
Loading