This commit is contained in:
Xavier Noria
2011-04-23 00:53:28 +02:00
parent ca2f826f5a
commit df70b9dfb2
3 changed files with 3 additions and 3 deletions

View File

@@ -334,7 +334,7 @@ module ActiveRecord
rows
end
# Clear prepared statement cache.
# Clears the prepared statements cache.
def clear_cache!
@statements.values.each do |cache|
cache[:stmt].close

View File

@@ -237,7 +237,7 @@ module ActiveRecord
@local_tz = execute('SHOW TIME ZONE', 'SCHEMA').first["TimeZone"]
end
# Clear prepared statement cache.
# Clears the prepared statements cache.
def clear_cache!
@statements.each_value do |value|
@connection.query "DEALLOCATE #{value}"

View File

@@ -98,7 +98,7 @@ module ActiveRecord
@connection.close rescue nil
end
# Clear prepared statement cache.
# Clears the prepared statements cache.
def clear_cache!
@statements.clear
end