Ticket #9223: support_read_timeout_in_mysql.patch
| File support_read_timeout_in_mysql.patch, 1.3 kB (added by seangeo, 1 year ago) |
|---|
-
activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
old new 127 127 # * <tt>:sslcert</tt> -- Necessary to use MySQL with an SSL connection 128 128 # * <tt>:sslcapath</tt> -- Necessary to use MySQL with an SSL connection 129 129 # * <tt>:sslcipher</tt> -- Necessary to use MySQL with an SSL connection 130 # * <tt>:read_timeout</tt> -- Socket Read Timeout in seconds. Defaults to no timeout. 130 131 # 131 132 # By default, the MysqlAdapter will consider all columns of type tinyint(1) 132 133 # as boolean. If you wish to disable this emulation (which was the default … … 385 386 if encoding 386 387 @connection.options(Mysql::SET_CHARSET_NAME, encoding) rescue nil 387 388 end 389 @connection.options(Mysql::OPT_READ_TIMEOUT, @config[:read_timeout]) if @config[:read_timeout] 388 390 @connection.ssl_set(@config[:sslkey], @config[:sslcert], @config[:sslca], @config[:sslcapath], @config[:sslcipher]) if @config[:sslkey] 389 391 @connection.real_connect(*@connection_options) 390 392 execute("SET NAMES '#{encoding}'") if encoding