diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-01-14 15:19:18 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-01-14 15:19:18 +0000 |
commit | 0227f86eee4502588c1d56638f2dabcb886cde28 (patch) | |
tree | 77f1b366b864c99d663ca3efd32eed1129ffec44 /activerecord | |
parent | 55efae272065c66f2f10ab786c300213e910465c (diff) | |
download | rails-0227f86eee4502588c1d56638f2dabcb886cde28.tar.gz rails-0227f86eee4502588c1d56638f2dabcb886cde28.tar.bz2 rails-0227f86eee4502588c1d56638f2dabcb886cde28.zip |
MySQL: retain SSL settings on reconnect. Closes #6976.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5929 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/CHANGELOG | 2 | ||||
-rwxr-xr-x | activerecord/lib/active_record/connection_adapters/mysql_adapter.rb | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index 5fa13915fb..94a46d3064 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* MySQL: retain SSL settings on reconnect. #6976 [randyv2] + * Apply scoping during initialize instead of create. Fixes setting of foreign key when using find_or_initialize_by with scoping. [Cody Fauser] * SQLServer: handle [quoted] table names. #6635 [rrich] diff --git a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb index d7668140fd..9bc4c94373 100755 --- a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb @@ -385,6 +385,7 @@ module ActiveRecord 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 end |