Skip to content

Commit

Permalink
Merge branch 'microsoft:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
mobilebilly authored Mar 8, 2025
2 parents c8e872a + a0ea23a commit 02d7758
Show file tree
Hide file tree
Showing 26 changed files with 293 additions and 103 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,28 @@ All notable changes to this project will be documented in this file.

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

## [12.10.0] Stable Release
### Added
- Added provision to set SQLServerBulkCopy options in PreparedStatement [#2555](https://github.com/microsoft/mssql-jdbc/pull/2555)
### Changed
- Changed the scope of BULK_COPY_OPERATION_CACHE to connection [#2594](https://github.com/microsoft/mssql-jdbc/pull/2594)
- Added "requireSecret" exclude tag for tests which require adding a secret to app registration [#2596](https://github.com/microsoft/mssql-jdbc/pull/2596)
- Added com.ibm.security.auth.module and com.sun.security.auth.module as option import [#2609](https://github.com/microsoft/mssql-jdbc/pull/2609)
- Updated driver dependency versions [#2614](https://github.com/microsoft/mssql-jdbc/pull/2614)
### Fixed issues
- Introduced timeouts for MSAL calls [#2562](https://github.com/microsoft/mssql-jdbc/pull/2562)
- Fixed getGeneratedKeys functionality for execute API [#2554](https://github.com/microsoft/mssql-jdbc/pull/2554)
- Fixed ISQLServerConnection java doc reference [#2560](https://github.com/microsoft/mssql-jdbc/pull/2560)
- Fixed OffsetDateTime conversion for pre-Gregorian dates [#2568](https://github.com/microsoft/mssql-jdbc/pull/2568)
- Fix for driver cutting out the question mark from columns labels (aliases) [#2569](https://github.com/microsoft/mssql-jdbc/pull/2569)
- Fixed issue with SQLServerBulkCopy from CSV with setEscapeColumnDelimerts set to true [#2575](https://github.com/microsoft/mssql-jdbc/pull/2575)
- Fixed issue for finding `mssql-jdbc.properties` location in test environments [#2579](https://github.com/microsoft/mssql-jdbc/pull/2579)
- Fixed issue for IBM Semeru Runtime Certified Edition for z/OS and Kerberos [#2581](https://github.com/microsoft/mssql-jdbc/pull/2581)
- Set appropriate value to requestedEncryptionLevel for encrypt=STRICT [#2597](https://github.com/microsoft/mssql-jdbc/pull/2597)
- Add test for ManagedIdentityWithEncryptStrict [#2599](https://github.com/microsoft/mssql-jdbc/pull/2599)
- Check for null when getting DTV values (JDBC spec compliance - getBinaryStream /getAsciiStream will return null when the value is null) [#2600](https://github.com/microsoft/mssql-jdbc/pull/2600)
- Removed scheme from URI before fetching path for CRL path check [#2622](https://github.com/microsoft/mssql-jdbc/pull/2622)

## [12.9.0] Preview Release
### Added
- Added configurable retry logic feature, supporting both statement, and connection, retry [#2396](https://github.com/microsoft/mssql-jdbc/pull/2396)[#2519](https://github.com/microsoft/mssql-jdbc/pull/2519)
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,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>12.8.1.jre11</version>
<version>12.10.0.jre11</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 @@ -94,7 +94,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>12.8.1.jre11</version>
<version>12.10.0.jre11</version>
</dependency>
```

Expand Down Expand Up @@ -129,7 +129,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>12.8.1.jre11</version>
<version>12.10.0.jre11</version>
<scope>compile</scope>
</dependency>

Expand All @@ -147,7 +147,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>12.8.1.jre11</version>
<version>12.10.0.jre11</version>
<scope>compile</scope>
</dependency>

Expand All @@ -174,7 +174,7 @@ When setting 'useFmtOnly' property to 'true' for establishing a connection or cr
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>12.8.1.jre11</version>
<version>12.10.0.jre11</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 @@ -11,8 +11,8 @@

apply plugin: 'java'

version = '12.9.0'
def releaseExt = '-preview'
version = '12.10.0'
def releaseExt = ''
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 12.9.0 FOR SQL SERVER
MICROSOFT JDBC DRIVER 12.10.0 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>12.9.0</version>
<version>12.10.0</version>
<packaging>jar</packaging>
<name>Microsoft JDBC Driver for SQL Server</name>
<description>
Expand Down Expand Up @@ -51,7 +51,7 @@
Default testing enabled with SQL Server 2019 (SQLv15) -->
<excludedGroups>xSQLv12,xSQLv15,NTLM,MSI,reqExternalSetup,clientCertAuth,fedAuth,kerberos</excludedGroups>
<!-- Use -preview for preview release, leave empty for official release. -->
<releaseExt>-preview</releaseExt>
<releaseExt></releaseExt>
<!-- Driver Dependencies -->
<org.osgi.core.version>6.0.0</org.osgi.core.version>
<azure-security-keyvault-keys.version>4.9.2</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 = 12;
static final int MINOR = 9;
static final int MINOR = 10;
static final int PATCH = 0;
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 = "-preview";
static final String RELEASE_EXT = "";

private SQLJdbcVersion() {
throw new UnsupportedOperationException(SQLServerException.getErrString("R_notSupported"));
Expand Down
25 changes: 12 additions & 13 deletions src/main/java/com/microsoft/sqlserver/jdbc/SQLServerBulkCopy.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
import java.math.BigDecimal;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.sql.Connection;
import java.sql.Date;
import java.sql.ResultSet;
Expand Down Expand Up @@ -1859,16 +1857,16 @@ private void getDestinationMetadata() throws SQLServerException {
}

if (loggerExternal.isLoggable(Level.FINER)) {
loggerExternal.finer(this.toString() + " Acquiring existing destination column metadata " +
"from cache for bulk copy");
loggerExternal.finer(this.toString() + " Acquiring existing destination column metadata "
+ "from cache for bulk copy");
}

} else {
setDestinationColumnMetadata(escapedDestinationTableName);

if (loggerExternal.isLoggable(Level.FINER)) {
loggerExternal.finer(this.toString() + " cacheBulkCopyMetadata=false - Querying server " +
"for destination column metadata");
loggerExternal.finer(this.toString() + " cacheBulkCopyMetadata=false - Querying server "
+ "for destination column metadata");
}
}
}
Expand Down Expand Up @@ -2008,7 +2006,7 @@ private void validateColumnMappings() throws SQLServerException {

// Generate default column mappings
ColumnMapping cm;
for (int i = 1; i <= srcColumnCount; ++i) {
for (Integer i : destColumnMetadata.keySet()) {
// Only skip identity column mapping if KEEP IDENTITY OPTION is FALSE
if (!(destColumnMetadata.get(i).isIdentity && !copyOptions.isKeepIdentity())) {
cm = new ColumnMapping(i, i);
Expand Down Expand Up @@ -2062,7 +2060,7 @@ private void validateColumnMappings() throws SQLServerException {
if (-1 == cm.destinationColumnOrdinal) {
boolean foundColumn = false;

for (int j = 1; j <= destColumnCount; ++j) {
for (Integer j : destColumnMetadata.keySet()) {
if (destColumnMetadata.get(j).columnName.equals(cm.destinationColumnName)) {
foundColumn = true;
cm.destinationColumnOrdinal = j;
Expand Down Expand Up @@ -2223,7 +2221,8 @@ private void writeNullToTdsWriter(TDSWriter tdsWriter, int srcJdbcType,

private void writeColumnToTdsWriter(TDSWriter tdsWriter, int bulkPrecision, int bulkScale, int bulkJdbcType,
boolean bulkNullable, // should it be destNullable instead?
int srcColOrdinal, int destColOrdinal, boolean isStreaming, Object colValue, Calendar cal) throws SQLServerException {
int srcColOrdinal, int destColOrdinal, boolean isStreaming, Object colValue,
Calendar cal) throws SQLServerException {
SSType destSSType = destColumnMetadata.get(destColOrdinal).ssType;

bulkPrecision = validateSourcePrecision(bulkPrecision, bulkJdbcType,
Expand Down Expand Up @@ -3140,8 +3139,8 @@ private Object readColumnFromResultSet(int srcColOrdinal, int srcJdbcType, boole
/**
* Reads the given column from the result set current row and writes the data to tdsWriter.
*/
private void writeColumn(TDSWriter tdsWriter, int srcColOrdinal, int destColOrdinal,
Object colValue, Calendar cal) throws SQLServerException {
private void writeColumn(TDSWriter tdsWriter, int srcColOrdinal, int destColOrdinal, Object colValue,
Calendar cal) throws SQLServerException {
String destName = destColumnMetadata.get(destColOrdinal).columnName;
int srcPrecision, srcScale, destPrecision, srcJdbcType;
SSType destSSType = null;
Expand Down Expand Up @@ -3793,8 +3792,8 @@ private boolean writeBatchData(TDSWriter tdsWriter, TDSCommand command,
// Loop for each destination column. The mappings is a many to one mapping
// where multiple source columns can be mapped to one destination column.
for (ColumnMapping columnMapping : columnMappings) {
writeColumn(tdsWriter, columnMapping.sourceColumnOrdinal, columnMapping.destinationColumnOrdinal, null,
null // cell
writeColumn(tdsWriter, columnMapping.sourceColumnOrdinal, columnMapping.destinationColumnOrdinal,
null, null // cell
// value is
// retrieved
// inside
Expand Down
6 changes: 3 additions & 3 deletions 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>12.8.0.jre11</version>
<version>12.10.0.jre11</version>
</dependency>
</dependencies>
<profiles>
Expand Down Expand Up @@ -74,8 +74,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>22</source>
<target>22</target>
<source>23</source>
<target>23</target>
</configuration>
</plugin>
<plugin>
Expand Down
6 changes: 3 additions & 3 deletions 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>12.8.0.jre11</version>
<version>12.10.0.jre11</version>
</dependency>
</dependencies>
<profiles>
Expand All @@ -42,8 +42,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>22</source>
<target>22</target>
<source>23</source>
<target>23</target>
</configuration>
</plugin>
<plugin>
Expand Down
6 changes: 3 additions & 3 deletions 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>12.8.0.jre11</version>
<version>12.10.0.jre11</version>
</dependency>
</dependencies>
<profiles>
Expand Down Expand Up @@ -57,8 +57,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>22</source>
<target>22</target>
<source>23</source>
<target>23</target>
</configuration>
</plugin>
<plugin>
Expand Down
6 changes: 3 additions & 3 deletions 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>12.8.0.jre11</version>
<version>12.10.0.jre11</version>
</dependency>
</dependencies>
<profiles>
Expand Down Expand Up @@ -57,8 +57,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>22</source>
<target>22</target>
<source>23</source>
<target>23</target>
</configuration>
</plugin>
<plugin>
Expand Down
6 changes: 3 additions & 3 deletions 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>12.8.0.jre11</version>
<version>12.10.0.jre11</version>
</dependency>
</dependencies>
<profiles>
Expand Down Expand Up @@ -44,8 +44,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>22</source>
<target>22</target>
<source>23</source>
<target>23</target>
</configuration>
</plugin>
<plugin>
Expand Down
6 changes: 3 additions & 3 deletions 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>12.8.0.jre11</version>
<version>12.10.0.jre11</version>
</dependency>
</dependencies>
<profiles>
Expand Down Expand Up @@ -44,8 +44,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<source>22</source>
<target>22</target>
<source>23</source>
<target>23</target>
</configuration>
</plugin>
<plugin>
Expand Down
6 changes: 3 additions & 3 deletions 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>12.8.0.jre11</version>
<version>12.10.0.jre11</version>
</dependency>
</dependencies>
<profiles>
Expand Down Expand Up @@ -74,8 +74,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>22</source>
<target>22</target>
<source>23</source>
<target>23</target>
</configuration>
</plugin>
<plugin>
Expand Down
6 changes: 3 additions & 3 deletions 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>12.8.0.jre11</version>
<version>12.10.0.jre11</version>
</dependency>
</dependencies>
<profiles>
Expand Down Expand Up @@ -73,8 +73,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>22</source>
<target>22</target>
<source>23</source>
<target>23</target>
</configuration>
</plugin>
<plugin>
Expand Down
6 changes: 3 additions & 3 deletions 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>12.8.0.jre11</version>
<version>12.10.0.jre11</version>
</dependency>
</dependencies>
<profiles>
Expand All @@ -41,8 +41,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>22</source>
<target>22</target>
<source>23</source>
<target>23</target>
</configuration>
</plugin>
<plugin>
Expand Down
Loading

0 comments on commit 02d7758

Please sign in to comment.