From f9ee36e339636a17ec31faa84c3ef44823923c56 Mon Sep 17 00:00:00 2001 From: Brett Wooldridge Date: Wed, 12 Apr 2017 14:46:38 +0900 Subject: [PATCH] Fixes #866 mark commit state dirty when Connection.getMetaData() is called. --- .../java/com/zaxxer/hikari/pool/ProxyConnection.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/com/zaxxer/hikari/pool/ProxyConnection.java b/src/main/java/com/zaxxer/hikari/pool/ProxyConnection.java index e5b14771..15933487 100644 --- a/src/main/java/com/zaxxer/hikari/pool/ProxyConnection.java +++ b/src/main/java/com/zaxxer/hikari/pool/ProxyConnection.java @@ -22,6 +22,7 @@ import java.lang.reflect.InvocationHandler; import java.lang.reflect.Proxy; import java.sql.CallableStatement; import java.sql.Connection; +import java.sql.DatabaseMetaData; import java.sql.PreparedStatement; import java.sql.SQLException; import java.sql.Savepoint; @@ -346,6 +347,14 @@ public abstract class ProxyConnection implements Connection return ProxyFactory.getProxyPreparedStatement(this, trackStatement(delegate.prepareStatement(sql, columnNames))); } + /** {@inheritDoc} */ + @Override + public DatabaseMetaData getMetaData() throws SQLException + { + markCommitStateDirty(); + return delegate.getMetaData(); + } + /** {@inheritDoc} */ @Override public void commit() throws SQLException