Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
19fe828
Merge pull request #870 from Microsoft/master
lilgreenbird Oct 30, 2018
7357c40
Update snapshot for 7.1.3 (#871)
lilgreenbird Oct 30, 2018
55cf2a3
removed obsolete comment (#866)
lilgreenbird Oct 30, 2018
392bf1c
Remove "country" from changelog (#868)
peterbae Oct 30, 2018
001b413
Improvement | Replace string concatenation with StringBuilder (#861)
simon04 Oct 30, 2018
0e405b1
Improvements | Remove unnecessary semicolons (#856)
simon04 Oct 30, 2018
d01e90a
Improvements | Remove unnecessary code where variable 'typeDefinition…
simon04 Oct 30, 2018
044f7fa
Update survey image link
Nov 14, 2018
eb64bfe
Merge pull request #880 from Microsoft/David-Engel-patch-1
David-Engel Nov 14, 2018
4a0b18f
Enable Appveyor with Java 11 updates (#886)
cheenamalhotra Nov 21, 2018
2048aae
Simplify boolean expressions (#857)
simon04 Nov 21, 2018
597319f
Change scope of Connection/Statement in TVPAllTypesTest to prevent ra…
cheenamalhotra Nov 21, 2018
161b0bb
Fix | Fix issue with setAutoCommit leaving an open transaction behind…
peterbae Nov 22, 2018
46a5107
Enhancement | one thread for timers
shayaantx Nov 23, 2018
218e736
Fix | Fix random issues for SQLFloat type and improved TVPAllTypesTes…
cheenamalhotra Nov 26, 2018
bee1dbe
Fix | Removed populating Lobs when calling wasNull()
rene-ye Nov 27, 2018
1fe2515
Improved retry logic for intermittent TLS1.2 issue (#882)
ulvii Nov 27, 2018
d968294
Fix Geography.point method (#853)
peterbae Nov 28, 2018
25028fb
removed redundant check of logger level (#883)
lilgreenbird Nov 28, 2018
195ea92
Address TODOs in tests (#873)
lilgreenbird Nov 28, 2018
87e69d4
Fix | Intermittent BulkCopyResultSetCursorTest error (#854)
rene-ye Nov 28, 2018
bd89a10
Add SQLServerMetadata constructor to set precision for string types (…
lilgreenbird Nov 29, 2018
47d6eb4
Revert "removed redundant check of logger level (#883)" (#891)
rene-ye Nov 29, 2018
a338b31
Release | Changes for 7.1.3preview release (#893)
ulvii Nov 29, 2018
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
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