Skip to content
Permalink
Browse files

[misc] Commit not executed when in transaction and autocommit is enabled

(cherry picked from commit 05bde61)

# Conflicts:
#	src/main/java/org/mariadb/jdbc/MariaDbConnection.java
  • Loading branch information...
rusher committed Feb 4, 2019
1 parent 76595d8 commit 2a54b05214b01ca2cb9b3092c1d95fd4b016514f
10 pom.xml
@@ -58,7 +58,7 @@
<artifactId>mariadb-java-client</artifactId>
<packaging>jar</packaging>
<name>mariadb-java-client</name>
<version>1.7.4</version>
<version>1.8.0</version>
<description>JDBC driver for MariaDB and MySQL</description>
<url>https://mariadb.com/kb/en/mariadb/about-mariadb-connector-j/</url>

@@ -70,8 +70,8 @@
<checkstyleVersion>8.12</checkstyleVersion>
<checkstyle.plugin.version>2.17</checkstyle.plugin.version>
<driver.version.major>1</driver.version.major>
<driver.version.minor>7</driver.version.minor>
<driver.version.patch>4</driver.version.patch>
<driver.version.minor>8</driver.version.minor>
<driver.version.patch>0</driver.version.patch>
<driver.version.qualifier></driver.version.qualifier>
</properties>

@@ -118,8 +118,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<source>1.7</source>
<target>1.7</target>
<compilerArgs>
<arg>-Xlint:all,-options,-path</arg>
</compilerArgs>
@@ -53,9 +53,9 @@
package org.mariadb.jdbc.internal.util.constant;

public final class Version {
public static final String version = "1.7.4";
public static final String version = "1.8.0";
public static final int majorVersion = 1;
public static final int minorVersion = 7;
public static final int patchVersion = 4;
public static final int minorVersion = 8;
public static final int patchVersion = 0;
public static final String qualifier = "";
}
@@ -67,6 +67,9 @@
import java.sql.SQLTransientException;
import java.sql.SQLWarning;
import java.sql.Statement;
import java.util.Iterator;
import java.util.Map;

import org.mariadb.jdbc.MariaDbConnection;
import org.mariadb.jdbc.MariaDbStatement;
import org.mariadb.jdbc.internal.util.SqlStates;
@@ -146,7 +149,12 @@ public static SQLException getException(SQLException exception, MariaDbConnectio

if (connection.includeThreadsTraces()) {
message.append("\n\ncurrent threads: ");
Thread.getAllStackTraces().forEach((thread, traces) -> {
Iterator<Map.Entry<Thread, StackTraceElement[]>> stacks =
Thread.getAllStackTraces().entrySet().iterator();
while (stacks.hasNext()) {
Map.Entry<Thread, StackTraceElement[]> entry = stacks.next();
Thread thread = entry.getKey();
StackTraceElement[] traces = entry.getValue();
message.append("\n name:\"")
.append(thread.getName())
.append("\" pid:")
@@ -156,7 +164,7 @@ public static SQLException getException(SQLException exception, MariaDbConnectio
for (int i = 0; i < traces.length; i++) {
message.append("\n ").append(traces[i]);
}
});
};
}
}
sqlException = get(message.toString(), exception.getSQLState(), exception.getErrorCode(), exception, timeout);
@@ -56,7 +56,6 @@
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.mariadb.jdbc.MariaDbPreparedStatementServer;
import org.mariadb.jdbc.internal.protocol.Protocol;
import org.mariadb.jdbc.internal.util.constant.HaMode;

0 comments on commit 2a54b05

Please sign in to comment.
You can’t perform that action at this time.