mirror of https://github.com/rails/rails
clearing statements on disconnect and reset
This commit is contained in:
parent
54ff59f3ba
commit
5abebfb569
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue