lib/hiera/backend/mysql_json_backend.rb in hiera-mysql-json-backend-jruby-2.1.0 vs lib/hiera/backend/mysql_json_backend.rb in hiera-mysql-json-backend-jruby-2.1.1
- old
+ new
@@ -147,10 +147,12 @@
(1..numcols).each do |c|
row[md.getColumnName(c)] = res.getString(c)
end
data << row
end
-
+ stmt.close
+ conn.close
+ data
else
client = Mysql2::Client.new(connection_hash)
begin
data = client.query(query).to_a
Hiera.debug("Mysql Query returned #{data.size} rows")