aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
index 6598feec62..0c58c57390 100644
--- a/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb
@@ -80,9 +80,15 @@ module ActiveRecord
def disconnect!
super
+ @statements.clear
@connection.close rescue nil
end
+ def reset!
+ @statements.clear
+ super
+ end
+
def supports_count_distinct? #:nodoc:
sqlite_version >= '3.2.6'
end