diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-12 16:58:39 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-10-26 13:44:08 -0700 |
commit | 5abebfb569dcf69847a473c337e07e25f88d63a4 (patch) | |
tree | 58f8591e720e4f2cb5dcad15a72e492a8073bc26 /activerecord | |
parent | 54ff59f3ba4c299ebb0b517ae1a3efb5859ab1c7 (diff) | |
download | rails-5abebfb569dcf69847a473c337e07e25f88d63a4.tar.gz rails-5abebfb569dcf69847a473c337e07e25f88d63a4.tar.bz2 rails-5abebfb569dcf69847a473c337e07e25f88d63a4.zip |
clearing statements on disconnect and reset
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb | 6 |
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 |