Skip to content

Commit

Permalink
Merge pull request #1164 from microsoft/dev
Browse files Browse the repository at this point in the history
Release | Update master for v8.1.0 release
  • Loading branch information
ulvii authored Oct 16, 2019
2 parents 060c657 + ac53a61 commit 4484449
Showing 64 changed files with 3,297 additions and 1,732 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: ''

---
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: ''
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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`.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

@@ -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>
```

@@ -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>

@@ -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>

@@ -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>
@@ -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.
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:
@@ -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:
@@ -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
@@ -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
*
@@ -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'
@@ -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"){
@@ -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",
19 changes: 10 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
@@ -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>
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
@@ -242,7 +242,9 @@ enum DescribeParameterEncryptionResultSet1 {
EncryptedKey,
ProviderName,
KeyPath,
KeyEncryptionAlgorithm;
KeyEncryptionAlgorithm,
IsRequestedByEnclave,
EnclaveCMKSignature;

int value() {
// Column indexing starts from 1;
@@ -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
@@ -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 4484449

Please sign in to comment.