Skip to content

Commit

Permalink
Release | Merge dev to master for v8.1.0-preview (#1161)
Browse files Browse the repository at this point in the history
* Release | Update SNAPSHOT for 7.5.0-preview release (#1129)

* Release | Update driver version

* Release| Add pom and gradle files

* Fix | Remove extra spaces in SQLServerDatabaseMetaData.getNumericFunctions()/SQLServerDatabaseMetaData.getStringFunctions() return values (#1117)

* Tests | Improve assertions in ComparisonUtil (#1100)

* ComparisonUtil : replace assertTrue with assertEquals

Failure message should include the actual/expected values and that is what assertEquals does.

* Corrected BigDecimal comparison

Scale difference should be ignored.

* Fix | Add list of trusted endpoints for AKV (#1130)

* added list of trusted endpoints

* rename

* Update issue templates (#1148)

* Fix getImportedKeys() returning duplicate rows if multiple FKs have the same name  (#1092)

* fixed for github #1091 dup rows

* Fix STAsBinary returning null for a single point (#1074)

* populate wkb for point

* fix stasbinary issue

* change variable name

* apply same variable name change

* Performance | Improved performance of column name string lookups (#1066)

* Fix | Made column name lookup more performant

* Fix | Spacing

* Fix | Changed arraylist to maps

* Fix | Add newline

* Add | Caching for previously retrieved columns

* Fix | Formatting

* Fix | Variable issue

* Fix | null order

* Fix | part 2

* Revert | Integer changes

* Fix | Trim retrieved column name

* Fix | Clear column names whenever ResultSet cursor is moved

* Revert "Fix | Clear column names whenever ResultSet cursor is moved"

This reverts commit db42d44.

* Add | Implement hashCode() and equals() APIs for SQLServerDataTable and SQLServerDataColumn (#1146)

* Add | Add hashCode()/equals() methods to SQLServerDataColumn and SQLServerDataTable

* Fix issue with truststore password being removed too early for XA transaction (#1133)

Fix | Fix issue with truststore password being removed too early for XA transaction

* Fix | SQLServerDatabaseMetada.getColumns not escaping wildcard (#1138)

* Feature | Introduce JAVA 13 Support (#1151)

* JDK 13 | Remove jre12 from pom file

* JDK 13 | Update Gradle build file

* JDK 13 | Update Azure-pipelines

* Test | Updated SQL Server from 2008R2 to 2012 in CI (#1153)

* Performance | Disabled pattern matching when using CallableStatements and SQLServerParameterMetaData (#1149)

* Fix | Added ISQLServerBulkData to remove implementation details from ISQLServerBulkRecord (#1099)

* Feature | Added support for Always Encrypted with Secure Enclaves (#1155)

* Release | 8.1.0-preview release changes (#1158)
  • Loading branch information
ulvii authored Oct 16, 2019
1 parent 7f28e9c commit e88884c
Show file tree
Hide file tree
Showing 65 changed files with 3,353 additions and 1,741 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
name: Bug report
about: Report a bug to help us improve
title: "[BUG]"
labels: bug
name: Incident report
about: Report an incident
title: ''
labels: ''
assignees: ''

---
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Question
about: Discuss an idea to see if it would be an appropriate Issue.
about: Ask a question
title: "[QUESTION]"
labels: question
assignees: ''
Expand Down
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/)

## [8.1.0] Preview Release
### Added
- Added ISQLServerBulkData to remove implementation details from ISQLServerBulkRecord [#1099](https://github.com/microsoft/mssql-jdbc/pull/1099)
- Added support for Azure national clouds when using Azure Key Vault [#1130](https://github.com/microsoft/mssql-jdbc/pull/1130)
- Implemented hashCode() and equals() APIs for SQLServerDataTable and SQLServerDataColumn [#1146](https://github.com/Microsoft/mssql-jdbc/pull/1146)
- Added support for JAVA 13 [#1151](https://github.com/Microsoft/mssql-jdbc/pull/1151)
- Added support for Always Encrypted with Secure Enclaves [#1155](https://github.com/Microsoft/mssql-jdbc/pull/1155)

### Fixed Issues
- Fixed Geography.STAsBinary() returning null for a single point [#1074](https://github.com/microsoft/mssql-jdbc/pull/1074)
- Fixed DatabaseMetaData.getImportedKeys() returning duplicate rows [#1092](https://github.com/microsoft/mssql-jdbc/pull/1092)
- Fixed issue with truststore password being removed too early for XA connections [#1133](https://github.com/microsoft/mssql-jdbc/pull/1133)
- Fixed issue with SQLServerDatabaseMetada.getColumns() not escaping wildcard characters [#1138](https://github.com/microsoft/mssql-jdbc/pull/1138)
- Removed extra spaces in SQLServerDatabaseMetaData.getNumericFunctions() and SQLServerDatabaseMetaData.getStringFunctions() return values [#1117](https://github.com/microsoft/mssql-jdbc/pull/1117)

### Changed
- Improved performance of column name lookups [#1066](https://github.com/microsoft/mssql-jdbc/pull/1066)
- Test improvements [#1100](https://github.com/microsoft/mssql-jdbc/pull/1100)
- Updated issue templates [#1148](https://github.com/microsoft/mssql-jdbc/pull/1148)
- Improved performance of CallableStatement and ParameterMetaData when using procedure names that contain wildcard characters [#1149](https://github.com/microsoft/mssql-jdbc/pull/1149)
- Updated CI to use SQL Server 2012 instead of 2008R2 [#1153](https://github.com/microsoft/mssql-jdbc/pull/1153)

## [7.4.1] HotFix & Stable Release
### Fixed Issues
- Reverted [#1025](https://github.com/Microsoft/mssql-jdbc/pull/1025) as it contains breaking changes. This removes `hashCode()` and `equals()` APIs from `SQLServerDataTable` and `SQLServerDataColumn`.
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ To build the jar files, you must use minimum version of Java 11 with Maven. You
* Maven:
1. If you have not already done so, add the environment variable `mssql_jdbc_test_connection_properties` in your system with the connection properties for your SQL Server or SQL DB instance.
2. Run one of the commands below to build a JRE 11 and newer versions compatible jar or JRE 8 compatible jar in the `\target` directory.
* Run `mvn install -Pjre12`. This creates JRE 12 compatible jar in `\target` directory which is JDBC 4.3 compliant (Build with JDK 12+).
* Run `mvn install -Pjre11`. This creates JRE 11 compatible jar in `\target` directory which is JDBC 4.3 compliant (Build with JDK 11+).
* Run `mvn install -Pjre8`. This creates JRE 8 compatible jar in `\target` directory which is JDBC 4.2 compliant (Build with JDK 11+).
* Run `mvn install -Pjre13`. This creates JRE 13 compatible jar in `\target` directory which is JDBC 4.3 compliant (Build with JDK 13+).
* Run `mvn install -Pjre11`. This creates JRE 11 compatible jar in `\target` directory which is JDBC 4.3 compliant (Build with JDK 11+).
* Run `mvn install -Pjre8`. This creates JRE 8 compatible jar in `\target` directory which is JDBC 4.2 compliant (Build with JDK 11+).

* Gradle:
1. If you have not already done so, add the environment variable `mssql_jdbc_test_connection_properties` in your system with the connection properties for your SQL Server or SQL DB instance.
2. Run one of the commands below to build a JRE 11 and newer versions compatible jar or JRE 8 compatible jar in the `\build\libs` directory.
* Run `gradle build -PbuildProfile=jre12`. This creates JRE 12 compatible jar in `\build\libs` directory which is JDBC 4.3 compliant (Build with JDK 12+).
* Run `gradle build -PbuildProfile=jre11`. This creates JRE 11 compatible jar in `\build\libs` directory which is JDBC 4.3 compliant (Build with JDK 11+).
* Run `gradle build -PbuildProfile=jre8`. This creates JRE 8 compatible jar in `\build\libs` directory which is JDBC 4.2 compliant (Build with JDK 11+).
* Run `gradle build -PbuildProfile=jre13`. This creates JRE 13 compatible jar in `\build\libs` directory which is JDBC 4.3 compliant (Build with JDK 13+).
* Run `gradle build -PbuildProfile=jre11`. This creates JRE 11 compatible jar in `\build\libs` directory which is JDBC 4.3 compliant (Build with JDK 11+).
* Run `gradle build -PbuildProfile=jre8`. This creates JRE 8 compatible jar in `\build\libs` directory which is JDBC 4.2 compliant (Build with JDK 11+).

## Resources

Expand Down Expand Up @@ -92,7 +92,7 @@ To get the latest preview version of the driver, add the following to your POM f
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>7.3.1.jre12-preview</version>
<version>8.1.0.jre13-preview</version>
</dependency>
```

Expand Down Expand Up @@ -127,7 +127,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>7.4.1.jre12</version>
<version>8.1.0.jre13-preview</version>
<scope>compile</scope>
</dependency>

Expand All @@ -150,7 +150,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>7.4.1.jre12</version>
<version>8.1.0.jre13-preview</version>
<scope>compile</scope>
</dependency>

Expand Down Expand Up @@ -183,7 +183,7 @@ When setting 'useFmtOnly' property to 'true' for establishing a connection or cr
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>7.4.1.jre12</version>
<version>8.1.0.jre13-preview</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -223,7 +223,7 @@ Preview releases happen approximately monthly between stable releases. This give
You can see what is going into a future release by monitoring [Milestones](https://github.com/Microsoft/mssql-jdbc/milestones) in the repository.

### Version conventions
Starting with 6.0, stable versions have an even minor version. For example, 6.0, 6.2, 6.4, 7.0, 7.2, 7.4. Preview versions have an odd minor version. For example, 6.1, 6.3, 6.5, 7.1, 7.3, and so on
Starting with 6.0, stable versions have an even minor version. For example, 6.0, 6.2, 6.4, 7.0, 7.2, 7.4. Preview versions have an odd minor version. For example, 6.1, 6.3, 6.5, 7.1, 7.3, 8.1 and so on

## Contributors
Special thanks to everyone who has contributed to the project.
Expand Down
29 changes: 17 additions & 12 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Microsoft JDBC Driver for SQL Server CI Build triggers tests against below SQL Servers:
# Microsoft JDBC Driver for SQL Server CI build triggers tests against below SQL Servers:
# - SQL Server 2019
# - SQL Server 2008 R2
# - SQL Server 2012
jobs:
- job: "CI_Build"
pool:
Expand All @@ -11,8 +11,8 @@ jobs:
SQL-2019:
Target_SQL: 'SQL-2k19-01'
Ex_Groups: 'xSQLv15'
SQL-2008R2:
Target_SQL: 'SQL-2k8R2-SP3-1'
SQL-2012:
Target_SQL: 'SQL-2K12-SP3-1'
Ex_Groups: 'xSQLv12'
maxParallel: 2
steps:
Expand All @@ -29,30 +29,35 @@ jobs:
Get-Content .\JavaKeyStoreBase.txt | Set-Content -Encoding utf8 JavaKeyStore.txt
Remove-Item –path .\JavaKeyStoreBase.txt
displayName: 'PowerShell Script'
- task: DownloadSecureFile@1
name: pkcs12_truststore
displayName: 'Download PKCS12 truststore file'
inputs:
secureFile: 'pkcs12_truststore'
- task: Maven@3
displayName: 'Maven build jre12'
displayName: 'Maven build jre13'
inputs:
mavenPomFile: 'pom.xml'
goals: 'clean -Dmssql_jdbc_test_connection_properties=jdbc:sqlserver://$(Target_SQL)$(server_domain);$(database);$(user);$(password); install -Pjre12 -DuserNTLM=$(userNTLM) -DpasswordNTLM=$(passwordNTLM) -DdomainNTLM=$(domainNTLM) -DexcludedGroups=$(Ex_Groups)'
goals: 'clean -Dmssql_jdbc_test_connection_properties=jdbc:sqlserver://$(Target_SQL)$(server_domain);$(database);$(user);$(password); install -Pjre13 -DuserNTLM=$(userNTLM) -DpasswordNTLM=$(passwordNTLM) -DdomainNTLM=$(domainNTLM) -DexcludedGroups=$(Ex_Groups) -Dpkcs12_truststore_password=$(pkcs12_truststore_password) -Dpkcs12_truststore=$(pkcs12_truststore.secureFilePath)'
testResultsFiles: '**/TEST-*.xml'
testRunTitle: 'Maven build jre12'
testRunTitle: 'Maven build jre13'
javaHomeOption: Path
jdkDirectory: $(JDK12)
jdkDirectory: $(JDK13)
- task: Maven@3
displayName: 'Maven build jre11'
inputs:
mavenPomFile: 'pom.xml'
goals: 'clean -Dmssql_jdbc_test_connection_properties=jdbc:sqlserver://$(Target_SQL)$(server_domain);$(database);$(user);$(password); install -Pjre11 -DuserNTLM=$(userNTLM) -DpasswordNTLM=$(passwordNTLM) -DdomainNTLM=$(domainNTLM) -DexcludedGroups=$(Ex_Groups)'
goals: 'clean -Dmssql_jdbc_test_connection_properties=jdbc:sqlserver://$(Target_SQL)$(server_domain);$(database);$(user);$(password); install -Pjre11 -DuserNTLM=$(userNTLM) -DpasswordNTLM=$(passwordNTLM) -DdomainNTLM=$(domainNTLM) -DexcludedGroups=$(Ex_Groups) -Dpkcs12_truststore_password=$(pkcs12_truststore_password) -Dpkcs12_truststore=$(pkcs12_truststore.secureFilePath)'
testResultsFiles: '**/TEST-*.xml'
testRunTitle: 'Maven build jre11'
javaHomeOption: Path
jdkDirectory: $(JDK12)
jdkDirectory: $(JDK13)
- task: Maven@3
displayName: 'Maven build jre8'
inputs:
mavenPomFile: 'pom.xml'
goals: 'clean -Dmssql_jdbc_test_connection_properties=jdbc:sqlserver://$(Target_SQL)$(server_domain);$(database);$(user);$(password); install -Pjre8 -DuserNTLM=$(userNTLM) -DpasswordNTLM=$(passwordNTLM) -DdomainNTLM=$(domainNTLM) -DexcludedGroups=$(Ex_Groups)'
goals: 'clean -Dmssql_jdbc_test_connection_properties=jdbc:sqlserver://$(Target_SQL)$(server_domain);$(database);$(user);$(password); install -Pjre8 -DuserNTLM=$(userNTLM) -DpasswordNTLM=$(passwordNTLM) -DdomainNTLM=$(domainNTLM) -DexcludedGroups=$(Ex_Groups) -Dpkcs12_truststore_password=$(pkcs12_truststore_password) -Dpkcs12_truststore=$(pkcs12_truststore.secureFilePath)'
testResultsFiles: '**/TEST-*.xml'
testRunTitle: 'Maven build jre8'
javaHomeOption: Path
jdkDirectory: $(JDK12)
jdkDirectory: $(JDK13)
20 changes: 10 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
****************************************************************
* Instruction for Building JDBC Driver:
* For building particular version of the driver, use commands:
* jre12 - - PS> gradle build
PS> gradle build -PbuildProfile=jre12
* jre13 - - PS> gradle build
PS> gradle build -PbuildProfile=jre13
* jre11 - - PS> gradle build -PbuildProfile=jre11
* jre8 - - PS> gradle build -PbuildProfile=jre8
*
Expand All @@ -14,7 +14,7 @@

apply plugin: 'java'

version = '7.4.1'
version = '8.1.0'
def jreVersion = ""
def testOutputDir = file("build/classes/java/test")
def archivesBaseName = 'mssql-jdbc'
Expand All @@ -31,21 +31,21 @@ allprojects {

test {
useJUnitPlatform {
excludeTags (hasProperty('excludedGroups') ? excludedGroups : 'xSQLv15','xGradle','NTLM')
excludeTags (hasProperty('excludedGroups') ? excludedGroups : 'xSQLv15','xGradle','reqExternalSetup','NTLM')
}
}

if (!hasProperty('buildProfile') || (hasProperty('buildProfile') && buildProfile == "jre12")){
if (!hasProperty('buildProfile') || (hasProperty('buildProfile') && buildProfile == "jre13")){

jreVersion = "jre12"
jreVersion = "jre13"
excludedFile = 'com/microsoft/sqlserver/jdbc/SQLServerJdbc42.java'
jar {
manifest {
attributes 'Automatic-Module-Name': 'com.microsoft.sqlserver.jdbc'
}
}
sourceCompatibility = 12
targetCompatibility = 12
sourceCompatibility = 13
targetCompatibility = 13
}

if (hasProperty('buildProfile') && buildProfile == "jre11"){
Expand All @@ -70,12 +70,12 @@ if(hasProperty('buildProfile') && buildProfile == "jre8") {
targetCompatibility = 1.8
test {
useJUnitPlatform {
excludeTags (hasProperty('excludedGroups') ? excludedGroups : 'xSQLv15','xGradle','NTLM','xJDBC42')
excludeTags (hasProperty('excludedGroups') ? excludedGroups : 'xSQLv15','xGradle','NTLM','reqExternalSetup','xJDBC42')
}
}
}

jar.archiveName = "${archivesBaseName}-${version}.${jreVersion}.jar"
jar.archiveName = "${archivesBaseName}-${version}.${jreVersion}-preview.jar"
jar {
manifest {
attributes 'Title': "Microsoft JDBC Driver ${version} for SQL Server",
Expand Down
19 changes: 10 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>7.4.1</version>
<version>8.1.0</version>
<packaging>jar</packaging>

<name>Microsoft JDBC Driver for SQL Server</name>
Expand Down Expand Up @@ -49,10 +49,11 @@
xAzureSQLDB - - - - For tests not compatible with Azure SQL Database - -
xAzureSQLDW - - - - For tests not compatible with Azure Data Warehouse -
xAzureSQLMI - - - - For tests not compatible with Azure SQL Managed Instance
NTLM - - - - - - For tests using NTLM Authentication mode (excluded by default)
NTLM - - - - - - - For tests using NTLM Authentication mode (excluded by default)
reqExternalSetup - For tests requiring external setup (excluded by default)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Default testing enabled with SQL Server 2019 (SQLv14) -->
<excludedGroups>xSQLv15, NTLM</excludedGroups>
<excludedGroups>xSQLv15, NTLM, reqExternalSetup</excludedGroups>

<!-- Driver Dependencies -->
<azure.keyvault.version>1.2.1</azure.keyvault.version>
Expand Down Expand Up @@ -196,7 +197,7 @@
<profile>
<id>jre8</id>
<build>
<finalName>${project.artifactId}-${project.version}.jre8</finalName>
<finalName>${project.artifactId}-${project.version}.jre8-preview</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -242,7 +243,7 @@
<profile>
<id>jre11</id>
<build>
<finalName>${project.artifactId}-${project.version}.jre11</finalName>
<finalName>${project.artifactId}-${project.version}.jre11-preview</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -273,12 +274,12 @@
</build>
</profile>
<profile>
<id>jre12</id>
<id>jre13</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<finalName>${project.artifactId}-${project.version}.jre12</finalName>
<finalName>${project.artifactId}-${project.version}.jre13-preview</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -288,8 +289,8 @@
<excludes>
<exclude>**/com/microsoft/sqlserver/jdbc/SQLServerJdbc42.java</exclude>
</excludes>
<source>12</source>
<target>12</target>
<source>13</source>
<target>13</target>
</configuration>
</plugin>
<plugin>
Expand Down
14 changes: 13 additions & 1 deletion src/main/java/com/microsoft/sqlserver/jdbc/AE.java
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ enum DescribeParameterEncryptionResultSet1 {
EncryptedKey,
ProviderName,
KeyPath,
KeyEncryptionAlgorithm;
KeyEncryptionAlgorithm,
IsRequestedByEnclave,
EnclaveCMKSignature;

int value() {
// Column indexing starts from 1;
Expand All @@ -266,5 +268,15 @@ int value() {
// Column indexing starts from 1;
return ordinal() + 1;
}
}

enum ColumnEncryptionVersion {
AE_NotSupported,
AE_v1,
AE_v2;

int value() {
// Column indexing starts from 1;
return ordinal() + 1;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,7 @@ private static native FedAuthDllInfo ADALGetAccessTokenForWindowsIntegrated(Stri

static native byte[] DecryptColumnEncryptionKey(String masterKeyPath, String encryptionAlgorithm,
byte[] encryptedColumnEncryptionKey) throws DLLException;

static native boolean VerifyColumnMasterKeyMetadata(String keyPath, boolean allowEnclaveComputations,
byte[] signature) throws DLLException;
}
Loading

0 comments on commit e88884c

Please sign in to comment.