Skip to content

Commit

Permalink
bump 2.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rusher committed Jun 17, 2019
1 parent fc4a288 commit c9a86cf
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -24,7 +24,7 @@ Tracker link <a href="https://jira.mariadb.org/projects/CONJ/issues/">https://ji
|:------------:|:-------------------------:|
| 6 | 1.7.4 |
| 7 | 1.7.4 |
| 8+ | 2.4.1 |
| 8+ | 2.4.2 |

The driver (jar) can be downloaded from [mariadb connector download](https://mariadb.com/products/connectors-plugins)
or maven :
Expand Down
15 changes: 15 additions & 0 deletions documentation/changelog.creole
@@ -1,4 +1,19 @@

== 2.4.2 - Released on 17 Jun. 2019

Security
* [CONJ-679] parse Query when receiving LOAD LOCAL INFILE
Bugs
* [CONJ-703] ClassNotFoundException when trying to connect using two-authentication in an OSGI environment.
* [CONJ-711] Xid format id is unsigned integer, currently sending as signed value.
* [CONJ-700] autoReconnect=true on Basic Failover doesn't reconnect
* [CONJ-707] failover might throw an unexpected exception with using "failover"/"sequential" configuration on socket error
* [CONJ-709] includeThreadDumpInDeadlockExceptions is thrown only if option includeInnodbStatusInDeadlockExceptions is set
* [CONJ-710] Throw complete stackTrace when having an exception on XA Commands
* [CONJ-714] Error on connection on galera server when in detached mode.
* [CONJ-701] typo in error message in SelectResultSet.java
== 2.4.1 - Released on 15 Mar. 2019

Evolutions
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Expand Up @@ -58,7 +58,7 @@
<artifactId>mariadb-java-client</artifactId>
<packaging>jar</packaging>
<name>mariadb-java-client</name>
<version>2.4.2-SNAPSHOT</version>
<version>2.4.2</version>
<description>JDBC driver for MariaDB and MySQL</description>
<url>https://mariadb.com/kb/en/mariadb/about-mariadb-connector-j/</url>

Expand All @@ -72,7 +72,7 @@
<driver.version.major>2</driver.version.major>
<driver.version.minor>4</driver.version.minor>
<driver.version.patch>2</driver.version.patch>
<driver.version.qualifier>-SNAPSHOT</driver.version.qualifier>
<driver.version.qualifier></driver.version.qualifier>
</properties>

<licenses>
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/org/mariadb/jdbc/UrlParser.java
Expand Up @@ -283,7 +283,9 @@ private static HaMode parseHaMode(String url, int separator) {

try {
String haModeString = url.substring(secondColonPos + 1, thirdColonPos).toUpperCase(Locale.ROOT);
if ("FAILOVER".equals(haModeString)) haModeString = "LOADBALANCE";
if ("FAILOVER".equals(haModeString)) {
haModeString = "LOADBALANCE";
}
return HaMode.valueOf(haModeString);
} catch (IllegalArgumentException i) {
throw new IllegalArgumentException(
Expand Down
Expand Up @@ -53,9 +53,9 @@
package org.mariadb.jdbc.internal.util.constant;

public final class Version {
public static final String version = "2.4.2-SNAPSHOT";
public static final String version = "2.4.2";
public static final int majorVersion = 2;
public static final int minorVersion = 4;
public static final int patchVersion = 2;
public static final String qualifier = "-SNAPSHOT";
public static final String qualifier = "";
}
2 changes: 1 addition & 1 deletion src/test/java/org/mariadb/jdbc/DriverTest.java
Expand Up @@ -1447,7 +1447,7 @@ public void localSocket() throws Exception {
rs = connection.createStatement().executeQuery("select 1");
assertTrue(rs.next());
}
st.execute("DROP user testSocket@'" + ((hostname == null) ? "localhost" : hostname) +"'");
st.execute("DROP user testSocket@'" + ((hostname == null) ? "localhost" : hostname) + "'");
}

@Test
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/mariadb/jdbc/LocalInfileDisableTest.java
Expand Up @@ -77,7 +77,7 @@ public static void initClass() throws SQLException {
@Test
public void testLocalInfileWithoutInputStream() throws SQLException {
Assume.assumeFalse(
(isMariadbServer() && minVersion(10, 4, 0) )
(isMariadbServer() && minVersion(10, 4, 0))
|| (!isMariadbServer() && minVersion(8, 0, 3)));
try (Connection connection = setConnection("&allowLocalInfile=false")) {
Exception ex = null;
Expand Down
16 changes: 8 additions & 8 deletions src/test/java/org/mariadb/jdbc/LocalInfileInputStreamTest.java
Expand Up @@ -93,7 +93,7 @@ public static void initClass() throws SQLException {
@Test
public void testLocalInfileInputStream() throws SQLException {
Assume.assumeFalse(
(isMariadbServer() && minVersion(10, 4, 0) )
(isMariadbServer() && minVersion(10, 4, 0))
|| (!isMariadbServer() && minVersion(8, 0, 3)));
try (Connection connection = setConnection("&allowLocalInfile=true")) {
try (Statement st = connection.createStatement()) {
Expand Down Expand Up @@ -124,7 +124,7 @@ public void testLocalInfileInputStream() throws SQLException {
@Test
public void testLocalInfileValidInterceptor() throws Exception {
Assume.assumeFalse(
(isMariadbServer() && minVersion(10, 4, 0) )
(isMariadbServer() && minVersion(10, 4, 0))
|| (!isMariadbServer() && minVersion(8, 0, 3)));
File temp = File.createTempFile("validateInfile", ".txt");
StringBuilder builder = new StringBuilder();
Expand All @@ -141,7 +141,7 @@ public void testLocalInfileValidInterceptor() throws Exception {
@Test
public void testLocalInfileUnValidInterceptor() throws Exception {
Assume.assumeFalse(
(isMariadbServer() && minVersion(10, 4, 0) )
(isMariadbServer() && minVersion(10, 4, 0))
|| (!isMariadbServer() && minVersion(8, 0, 3)));
File temp = File.createTempFile("localInfile", ".txt");
StringBuilder builder = new StringBuilder();
Expand Down Expand Up @@ -191,7 +191,7 @@ private void testLocalInfile(Connection connection, String file) throws SQLExcep
@Test
public void loadDataInfileEmpty() throws SQLException, IOException {
Assume.assumeFalse(
(isMariadbServer() && minVersion(10, 4, 0) )
(isMariadbServer() && minVersion(10, 4, 0))
|| (!isMariadbServer() && minVersion(8, 0, 3)));
// Create temp file.
File temp = File.createTempFile("validateInfile", ".tmp");
Expand All @@ -210,7 +210,7 @@ public void loadDataInfileEmpty() throws SQLException, IOException {
@Test
public void testPrepareLocalInfileWithoutInputStream() throws SQLException {
Assume.assumeFalse(
(isMariadbServer() && minVersion(10, 4, 0) )
(isMariadbServer() && minVersion(10, 4, 0))
|| (!isMariadbServer() && minVersion(8, 0, 3)));
try (Connection connection = setConnection("&allowLocalInfile=true")) {
try {
Expand Down Expand Up @@ -296,15 +296,15 @@ private void checkBigLocalInfile(long fileSize) throws Exception {
@Test
public void testSmallBigLocalInfileInputStream() throws Exception {
Assume.assumeFalse(
(isMariadbServer() && minVersion(10, 4, 0) )
(isMariadbServer() && minVersion(10, 4, 0))
|| (!isMariadbServer() && minVersion(8, 0, 3)));
checkBigLocalInfile(256);
}

@Test
public void test2xBigLocalInfileInputStream() throws Exception {
Assume.assumeFalse(
(isMariadbServer() && minVersion(10, 4, 0) )
(isMariadbServer() && minVersion(10, 4, 0))
|| (!isMariadbServer() && minVersion(8, 0, 3)));
Assume.assumeTrue(checkMaxAllowedPacketMore40m("test2xBigLocalInfileInputStream"));
checkBigLocalInfile(16777216 * 2);
Expand All @@ -313,7 +313,7 @@ public void test2xBigLocalInfileInputStream() throws Exception {
@Test
public void testMoreThanMaxAllowedPacketLocalInfileInputStream() throws Exception {
Assume.assumeFalse(
(isMariadbServer() && minVersion(10, 4, 0) )
(isMariadbServer() && minVersion(10, 4, 0))
|| (!isMariadbServer() && minVersion(8, 0, 3)));
Assume.assumeTrue(System.getenv("MAXSCALE_VERSION") == null);
Assume.assumeFalse(sharedIsAurora());
Expand Down
6 changes: 4 additions & 2 deletions src/test/java/org/mariadb/jdbc/StatementTest.java
Expand Up @@ -277,7 +277,7 @@ public void testNoPartitionForGivenValue() throws SQLException {
@Test
public void testLoadDataInvalidColumn() throws SQLException {
Assume.assumeFalse(
(isMariadbServer() && minVersion(10, 4, 0) )
(isMariadbServer() && minVersion(10, 4, 0))
|| (!isMariadbServer() && minVersion(8, 0, 3)));
try (Connection connection = setConnection("&allowLocalInfile=true")) {
Statement statement = connection.createStatement();
Expand Down Expand Up @@ -313,7 +313,9 @@ public void testLoadDataInvalidColumn() throws SQLException {
}
assertEquals(ER_LOAD_DATA_INVALID_COLUMN_STATE, sqlException.getSQLState());

//otherwise, localInfileInputStream will not be null, which cause false logic in readLocalInfilePacket and test like LocalInfileInputStreamTest#testLocalInfileUnValidInterceptor will fail if run after it
//otherwise, localInfileInputStream will not be null,
// which cause false logic in readLocalInfilePacket
// and test like LocalInfileInputStreamTest#testLocalInfileUnValidInterceptor will fail if run after it
mysqlStatement.setLocalInfileInputStream(null);

}
Expand Down

0 comments on commit c9a86cf

Please sign in to comment.