Skip to content
Permalink
Browse files

Merge branch 'master' into develop

  • Loading branch information
rusher committed Nov 21, 2019
2 parents 87946bb + f6d27fa commit 564dfc4f8ef556c5086d74368fe5e5754dd64d2d
Showing with 9 additions and 3 deletions.
  1. +1 −1 README.md
  2. +8 −2 src/main/java/org/mariadb/jdbc/MariaDbConnection.java
@@ -31,7 +31,7 @@ or maven :
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>2.5.0</version>
<version>2.5.1</version>
</dependency>
```

@@ -1663,10 +1663,16 @@ public void setDefaultTransactionIsolation(int defaultTransactionIsolation) {
* @throws SQLException if resetting operation failed
*/
public void reset() throws SQLException {
// COM_RESET_CONNECTION exist since mysql 5.7.3 and mariadb 10.2.4
// but not possible to use it with mysql waiting for https://bugs.mysql.com/bug.php?id=97633 correction.
// and mariadb only since https://jira.mariadb.org/browse/MDEV-18281
boolean useComReset =
options.useResetConnection
&& ((protocol.isServerMariaDb() && protocol.versionGreaterOrEqual(10, 2, 4))
|| (!protocol.isServerMariaDb() && protocol.versionGreaterOrEqual(5, 7, 3)));
&& protocol.isServerMariaDb()
&& (protocol.versionGreaterOrEqual(10, 3, 13)
|| (protocol.getMajorServerVersion() == 10
&& protocol.getMinorServerVersion() == 2
&& protocol.versionGreaterOrEqual(10, 2, 22)));

if (useComReset) {
protocol.reset();

0 comments on commit 564dfc4

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