diff options
author | Justin Bailey <jgbailey@gmail.com> | 2009-09-14 17:53:04 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-09-17 10:57:03 -0700 |
commit | c9d3c48dc6389feb2001372cd76e96274e773c9b (patch) | |
tree | e5f03b9a8c32f96a45ee8b2f687a2942203d7eba /activerecord/lib | |
parent | 0d762646c4285437c12ddec9d0938c4ff1c3ef42 (diff) | |
download | rails-c9d3c48dc6389feb2001372cd76e96274e773c9b.tar.gz rails-c9d3c48dc6389feb2001372cd76e96274e773c9b.tar.bz2 rails-c9d3c48dc6389feb2001372cd76e96274e773c9b.zip |
Enable use of MySQL stored procedures by default.
[#3204 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/mysql_adapter.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb index 1bb1c0bc15..1072eb7ac1 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb @@ -65,12 +65,15 @@ module ActiveRecord raise end end + MysqlCompat.define_all_hashes_method! mysql = Mysql.init mysql.ssl_set(config[:sslkey], config[:sslcert], config[:sslca], config[:sslcapath], config[:sslcipher]) if config[:sslca] || config[:sslkey] - ConnectionAdapters::MysqlAdapter.new(mysql, logger, [host, username, password, database, port, socket], config) + default_flags = Mysql.const_defined?(:CLIENT_MULTI_RESULTS) ? Mysql::CLIENT_MULTI_RESULTS : 0 + options = [host, username, password, database, port, socket, default_flags] + ConnectionAdapters::MysqlAdapter.new(mysql, logger, options, config) end end |