From b4c4cc6bf13d737a610a5e4b60a7a96c041ba709 Mon Sep 17 00:00:00 2001
From: Cam Saul <cammsaul@gmail.com>
Date: Wed, 13 Mar 2019 17:14:55 -0700
Subject: [PATCH] Fix Snowflake & Vertica [ci snowflake] [ci vertica]

---
 src/metabase/driver/sql_jdbc/execute.clj | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/metabase/driver/sql_jdbc/execute.clj b/src/metabase/driver/sql_jdbc/execute.clj
index a518e65df49..4fa65c7861c 100644
--- a/src/metabase/driver/sql_jdbc/execute.clj
+++ b/src/metabase/driver/sql_jdbc/execute.clj
@@ -170,7 +170,9 @@
     ;; This is normally done for us by java.jdbc as a result of our `jdbc/query` call
     (with-open [^PreparedStatement stmt (jdbc/prepare-statement conn sql opts)]
       ;; specifiy that we'd like this statement to close once its dependent result sets are closed
-      (.closeOnCompletion stmt)
+      ;; (Not all drivers support this so ignore Exceptions if they don't)
+      (u/ignore-exceptions
+        (.closeOnCompletion stmt))
       ;; Need to run the query in another thread so that this thread can cancel it if need be
       (try
         (let [query-future (future (jdbc/query conn (into [stmt] params) opts))]
-- 
GitLab