method
connect
v1.2.6 -
Show latest stable
- Class:
ActiveRecord::ConnectionAdapters::MysqlAdapter
connect()private
No documentation available.
# File activerecord/lib/active_record/connection_adapters/mysql_adapter.rb, line 385
def connect
encoding = @config[:encoding]
if encoding
@connection.options(Mysql::SET_CHARSET_NAME, encoding) rescue nil
end
@connection.ssl_set(@config[:sslkey], @config[:sslcert], @config[:sslca], @config[:sslcapath], @config[:sslcipher]) if @config[:sslkey]
@connection.real_connect(*@connection_options)
execute("SET NAMES '#{encoding}'") if encoding
# By default, MySQL 'where id is null' selects the last inserted id.
# Turn this off. http://dev.rubyonrails.org/ticket/6778
execute("SET SQL_AUTO_IS_NULL=0")
end