Skip to content

Commit

Permalink
Merge pull request #896 from Microsoft/dev
Browse files Browse the repository at this point in the history
Release | Merge dev to master branch for 7.1.3 preview release
  • Loading branch information
ulvii authored Dec 1, 2018
2 parents 14d0139 + a338b31 commit cf535df
Show file tree
Hide file tree
Showing 42 changed files with 583 additions and 404 deletions.
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@ All notable changes to this project will be documented in this file.

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

## [7.1.3] Preview Release
### Added
- Added a new SQLServerMetaData constructor for string values of length greater than 4000 [#876](https://github.com/Microsoft/mssql-jdbc/pull/876)

### Fixed Issues
- Fixed an issue with Geography.point() having coordinates reversed [#853](https://github.com/Microsoft/mssql-jdbc/pull/853)
- Fixed intermittent test failures [#854](https://github.com/Microsoft/mssql-jdbc/pull/854) [#862](https://github.com/Microsoft/mssql-jdbc/pull/862) [#888](https://github.com/Microsoft/mssql-jdbc/pull/888)
- Fixed an issue with setAutoCommit() leaving a transaction open when running against Azure SQL Data Warehouse [#881](https://github.com/Microsoft/mssql-jdbc/pull/881)

### Changed
- Changed query timeout logic to use a single thread [#842](https://github.com/Microsoft/mssql-jdbc/pull/842)
- Code cleanup [#857](https://github.com/Microsoft/mssql-jdbc/pull/857) [#873](https://github.com/Microsoft/mssql-jdbc/pull/873)
- Removed populating Lobs when calling ResultSet.wasNull() [#875](https://github.com/Microsoft/mssql-jdbc/pull/875)
- Improved retry logic for intermittent TLS1.2 issue when establishing a connection [#882](https://github.com/Microsoft/mssql-jdbc/pull/882)

## [7.1.2] Preview Release
### Added
- Added support for JDK 11 [#824](https://github.com/Microsoft/mssql-jdbc/pull/824) [#837](https://github.com/Microsoft/mssql-jdbc/pull/837) [#807](https://github.com/Microsoft/mssql-jdbc/pull/807)
Expand Down Expand Up @@ -57,7 +72,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
- Added new test for validation of supported public APIs in request boundary declaration APIs [#746](https://github.com/Microsoft/mssql-jdbc/pull/746)

### Fixed Issues
- Fixed policheck issue with 'Country' keyword [#745](https://github.com/Microsoft/mssql-jdbc/pull/745)
- Fixed policheck issue with a keyword [#745](https://github.com/Microsoft/mssql-jdbc/pull/745)
- Fixed issues reported by static analysis tools (SonarQube, Fortify) [#747](https://github.com/Microsoft/mssql-jdbc/pull/747)

### Changed
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SQL Server Team

Let us know how you think we're doing.

<a href="https://aka.ms/mssqljdbcsurvey"><img style="float: right;" height="67" width="156" src="https://meetsstorenew.blob.core.windows.net/contianerhd/survey.png?st=2017-02-17T22%3A03%3A00Z&se=2100-02-18T22%3A03%3A00Z&sp=rl&sv=2015-12-11&sr=b&sig=DJSFoihBptSvO%2BjvWzwpHecf8o5yfAbJoD2qW5oB8tc%3D"></a>
<a href="https://aka.ms/mssqljdbcsurvey"><img style="float: right;" height="67" width="156" src="https://sqlchoice.blob.core.windows.net/sqlchoice/static/images/survey.png"></a>

## Status of Most Recent Builds
| AppVeyor (Windows) | Travis CI (Linux) |
Expand Down Expand Up @@ -90,7 +90,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.1.2.jre11-preview</version>
<version>7.1.3.jre11-preview</version>
</dependency>
```

Expand Down Expand Up @@ -123,7 +123,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.1.2.jre11-preview</version>
<version>7.1.3.jre11-preview</version>
<scope>compile</scope>
</dependency>

Expand All @@ -140,7 +140,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.1.2.jre11-preview</version>
<version>7.1.3.jre11-preview</version>
<scope>compile</scope>
</dependency>

Expand Down
14 changes: 7 additions & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ init:
- cmd: net start MSSQL$%SQL_Instance%

environment:
JAVA_HOME: C:\Program Files\Java\jdk10
JAVA_HOME: C:\Program Files\Java\jdk11
mssql_jdbc_test_connection_properties: jdbc:sqlserver://localhost:1433;instanceName=%SQL_Instance%;databaseName=master;username=sa;password=Password12!;
matrix:
- SQL_Instance: SQL2008R2SP2
Expand All @@ -31,9 +31,9 @@ cache:
build_script:
- keytool -importkeystore -srckeystore cert.pfx -srcstoretype pkcs12 -destkeystore clientcert.jks -deststoretype JKS -srcstorepass password -deststorepass password
- keytool -list -v -keystore clientcert.jks -storepass "password" > JavaKeyStore.txt
# - cd..
# - mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V -Pbuild43
# - mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V -Pbuild42
# test_script:
# - mvn test -B -Pbuild43
# - mvn test -B -Pbuild42
- cd..
- mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V -Pbuild43
- mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V -Pbuild42
test_script:
- mvn test -B -Pbuild43
- mvn test -B -Pbuild42
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

apply plugin: 'java'

version = '7.1.2'
version = '7.1.3'
def jreVersion = ""
def testOutputDir = file("build/classes/java/test")
def archivesBaseName = 'mssql-jdbc'
Expand Down
2 changes: 1 addition & 1 deletion 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.1.2</version>
<version>7.1.3</version>
<packaging>jar</packaging>

<name>Microsoft JDBC Driver for SQL Server</name>
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/microsoft/sqlserver/jdbc/Column.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ void updateValue(JDBCType jdbcType, Object value, JavaType javaType, StreamSette
if (JDBCType.TINYINT == cryptoMetadata.getBaseTypeInfo().getSSType().getJDBCType()
&& javaType == JavaType.SHORT) {
if (value instanceof Boolean) {
if (true == ((boolean) value)) {
if ((boolean) value) {
value = 1;
} else {
value = 0;
Expand Down Expand Up @@ -251,7 +251,7 @@ else if (jdbcType.isBinary()) {
}

if (Util.shouldHonorAEForParameters(stmtColumnEncriptionSetting, con)) {
if ((null == cryptoMetadata) && true == forceEncrypt) {
if ((null == cryptoMetadata) && forceEncrypt) {
MessageFormat form = new MessageFormat(
SQLServerException.getErrString("R_ForceEncryptionTrue_HonorAETrue_UnencryptedColumnRS"));
Object[] msgArgs = {parameterIndex};
Expand All @@ -273,7 +273,7 @@ else if (jdbcType.isBinary()) {
}
}
} else {
if (true == forceEncrypt) {
if (forceEncrypt) {
MessageFormat form = new MessageFormat(
SQLServerException.getErrString("R_ForceEncryptionTrue_HonorAEFalseRS"));
Object[] msgArgs = {parameterIndex};
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/com/microsoft/sqlserver/jdbc/DDC.java
Original file line number Diff line number Diff line change
Expand Up @@ -596,8 +596,14 @@ static final Object convertStreamToObject(BaseInputStream stream, TypeInfo typeI
if (JDBCType.GUID == jdbcType) {
return Util.readGUID(byteValue);
} else if (JDBCType.GEOMETRY == jdbcType) {
if (!typeInfo.getSSTypeName().equalsIgnoreCase(jdbcType.toString())) {
DataTypes.throwConversionError(typeInfo.getSSTypeName().toUpperCase(), jdbcType.toString());
}
return Geometry.STGeomFromWKB(byteValue);
} else if (JDBCType.GEOGRAPHY == jdbcType) {
if (!typeInfo.getSSTypeName().equalsIgnoreCase(jdbcType.toString())) {
DataTypes.throwConversionError(typeInfo.getSSTypeName().toUpperCase(), jdbcType.toString());
}
return Geography.STGeomFromWKB(byteValue);
} else {
String hexString = Util.bytesToHexString(byteValue, byteValue.length);
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/microsoft/sqlserver/jdbc/DataTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ else if (!sendStringParametersAsUnicode && fromJavaType == JavaType.BYTEARRAY
return false;
return setterConversionAEMap.get(fromJavaType).contains(toJDBCType);
}
};
}

}

Expand Down Expand Up @@ -799,7 +799,7 @@ private SetterConversion(JDBCType.Category from, EnumSet<JDBCType.Category> to)
static boolean converts(JDBCType fromJDBCType, JDBCType toJDBCType) {
return conversionMap.get(fromJDBCType.category).contains(toJDBCType.category);
}
};
}

boolean convertsTo(JDBCType jdbcType) {
return SetterConversion.converts(this, jdbcType);
Expand Down Expand Up @@ -898,7 +898,7 @@ private UpdaterConversion(JDBCType.Category from, EnumSet<SSType.Category> to) {
static boolean converts(JDBCType fromJDBCType, SSType toSSType) {
return conversionMap.get(fromJDBCType.category).contains(toSSType.category);
}
};
}

boolean convertsTo(SSType ssType) {
return UpdaterConversion.converts(this, ssType);
Expand Down Expand Up @@ -1076,7 +1076,7 @@ private NormalizationAE(JDBCType from, EnumSet<SSType> to) {
static boolean converts(JDBCType fromJDBCType, SSType toSSType) {
return normalizationMapAE.get(fromJDBCType).contains(toSSType);
}
};
}

boolean normalizationCheck(SSType ssType) {
return NormalizationAE.converts(this, ssType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private static String concatPrimaryDatabase(String primary, String instance, Str
static FailoverInfo getFailoverInfo(SQLServerConnection connection, String primaryServer, String instance,
String database) {
synchronized (FailoverMapSingleton.class) {
if (true == failoverMap.isEmpty()) {
if (failoverMap.isEmpty()) {
return null;
} else {
String mapKey = concatPrimaryDatabase(primaryServer, instance, database);
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/microsoft/sqlserver/jdbc/Geography.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public static Geography parse(String wkt) throws SQLServerException {
* if an exception occurs
*/
public static Geography point(double lat, double lon, int srid) throws SQLServerException {
return new Geography("POINT (" + lat + " " + lon + ")", srid);
return new Geography("POINT (" + lon + " " + lat + ")", srid);
}

/**
Expand Down Expand Up @@ -212,8 +212,8 @@ public boolean hasZ() {
* @return double value that represents the latitude.
*/
public Double getLatitude() {
if (null != internalType && internalType == InternalSpatialDatatype.POINT && xValues.length == 1) {
return xValues[0];
if (null != internalType && internalType == InternalSpatialDatatype.POINT && yValues.length == 1) {
return yValues[0];
}
return null;
}
Expand All @@ -224,8 +224,8 @@ public Double getLatitude() {
* @return double value that represents the longitude.
*/
public Double getLongitude() {
if (null != internalType && internalType == InternalSpatialDatatype.POINT && yValues.length == 1) {
return yValues[0];
if (null != internalType && internalType == InternalSpatialDatatype.POINT && xValues.length == 1) {
return xValues[0];
}
return null;
}
Expand Down
Loading

0 comments on commit cf535df

Please sign in to comment.