diff --git a/src/metabase/driver/sql_jdbc/execute.clj b/src/metabase/driver/sql_jdbc/execute.clj index a518e65df497781a4f15e3a57e7486ecb28178e6..4fa65c7861ca14ff57386297d99abb83ae4d82c6 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))]