use new close method for disconnecting where we can
This commit is contained in:
parent
e01c7581e5
commit
5b41082aba
|
@ -243,10 +243,12 @@ module ActiveRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def disconnect!
|
def disconnect!
|
||||||
|
@connection.close
|
||||||
@connection = nil
|
@connection = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
def reset!
|
def reset!
|
||||||
|
disconnect!
|
||||||
@connection = Mysql2::Client.new(@config)
|
@connection = Mysql2::Client.new(@config)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,7 @@ module Sequel
|
||||||
|
|
||||||
# Closes given database connection.
|
# Closes given database connection.
|
||||||
def disconnect_connection(c)
|
def disconnect_connection(c)
|
||||||
c = nil
|
c.close
|
||||||
end
|
end
|
||||||
|
|
||||||
# Convert tinyint(1) type to boolean if convert_tinyint_to_bool is true
|
# Convert tinyint(1) type to boolean if convert_tinyint_to_bool is true
|
||||||
|
|
Loading…
Reference in New Issue