Skip to content

Commit

Permalink
version 1.4.6
Browse files Browse the repository at this point in the history
  • Loading branch information
rusher committed Jun 13, 2016
1 parent 90ddd2a commit 67aaeb1
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 25 deletions.
8 changes: 8 additions & 0 deletions documentation/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Changelog
* [1.4.6](#1.4.6) Released on 13 june 2016
* [1.4.5](#1.4.5) Released on 18 mai 2016
* [1.4.4](#1.4.4) Released on 04 mai 2016
* [1.4.3](#1.4.3) Released on 22 april 2016
Expand All @@ -7,6 +8,13 @@
* [1.4.0](#1.4.0) Released on 31 march 2016

---

## 1.4.6
* [CONJ-293] Permit named pipe connection without host
* [CONJ-309] Possible NPE on aurora when failover occur during connection initialisation
* [CONJ-312] NPE while loading a null from TIMESTAMP field using binary protocol
* [misc] batch with one parameter correction (using rewriteBatchedStatements option)

## 1.4.5
* [CONJ-297] Useless memory consumption when using Statement.setQueryTimeout
* [CONJ-294] PrepareStatement on master reconnection after a failover
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 @@
<artifactId>mariadb-java-client</artifactId>
<packaging>jar</packaging>
<name>mariadb-java-client</name>
<version>1.4.6-SNAPSHOT</version>
<version>1.4.6</version>
<description>JDBC driver for MariaDB and MySQL</description>
<url>https://mariadb.com/kb/en/mariadb/about-mariadb-connector-j/</url>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWIS
package org.mariadb.jdbc.internal.util.constant;

public final class Version {
public static final String version = "1.4.6-SNAPSHOT";
public static final String version = "1.4.6";
public static final int majorVersion = 1;
public static final int minorVersion = 4;
public static final int patchVersion = 6;
public static final String qualifier = "SNAPSHOT";
public static final String qualifier = "";

}
53 changes: 31 additions & 22 deletions src/test/java/org/mariadb/jdbc/DriverTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1089,18 +1089,22 @@ public void conj25() throws Exception {

@Test
public void namedPipe() throws Exception {
ResultSet rs = sharedConnection.createStatement().executeQuery("select @@named_pipe,@@socket");
rs.next();
if (rs.getBoolean(1)) {
String namedPipeName = rs.getString(2);
//skip test if no namedPipeName was obtained because then we do not use a socket connection
Assume.assumeTrue(namedPipeName != null);
try (Connection connection = setConnection("&pipe=" + namedPipeName)) {
Statement stmt = connection.createStatement();
rs = stmt.executeQuery("SELECT 1");
assertTrue(rs.next());
rs.close();
try {
ResultSet rs = sharedConnection.createStatement().executeQuery("select @@named_pipe,@@socket");
rs.next();
if (rs.getBoolean(1)) {
String namedPipeName = rs.getString(2);
//skip test if no namedPipeName was obtained because then we do not use a socket connection
Assume.assumeTrue(namedPipeName != null);
try (Connection connection = setConnection("&pipe=" + namedPipeName)) {
Statement stmt = connection.createStatement();
rs = stmt.executeQuery("SELECT 1");
assertTrue(rs.next());
rs.close();
}
}
} catch (SQLException e) {
//not on windows
}
}

Expand All @@ -1111,18 +1115,23 @@ public void namedPipe() throws Exception {
*/
@Test
public void namedPipeWithoutHost() throws Exception {
ResultSet rs = sharedConnection.createStatement().executeQuery("select @@named_pipe,@@socket");
rs.next();
if (rs.getBoolean(1)) {
String namedPipeName = rs.getString(2);
//skip test if no namedPipeName was obtained because then we do not use a socket connection
Assume.assumeTrue(namedPipeName != null);
try (Connection connection = DriverManager.getConnection("jdbc:mariadb://localhost/testj?user=" + username + "&pipe=" + namedPipeName)) {
Statement stmt = connection.createStatement();
rs = stmt.executeQuery("SELECT 1");
assertTrue(rs.next());
rs.close();
try {
ResultSet rs = sharedConnection.createStatement().executeQuery("select @@named_pipe,@@socket");
rs.next();
if (rs.getBoolean(1)) {
String namedPipeName = rs.getString(2);
//skip test if no namedPipeName was obtained because then we do not use a socket connection
Assume.assumeTrue(namedPipeName != null);
try (Connection connection = DriverManager.getConnection("jdbc:mariadb://localhost/testj?user="
+ username + "&pipe=" + namedPipeName)) {
Statement stmt = connection.createStatement();
rs = stmt.executeQuery("SELECT 1");
assertTrue(rs.next());
rs.close();
}
}
} catch (SQLException e) {
//not on windows
}
}

Expand Down

0 comments on commit 67aaeb1

Please sign in to comment.