diff options
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-x | activerecord/lib/active_record/connection_adapters/mysql_adapter.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb index 14991c2171..4cc08c01ae 100755 --- a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb @@ -311,11 +311,7 @@ module ActiveRecord def connect encoding = @config[:encoding] if encoding - begin - @connection.options(Mysql::SET_CHARSET_NAME, encoding) - rescue - raise ActiveRecord::ConnectionFailed, 'The :encoding option is only available for MySQL 4.1 and later with the mysql-ruby driver. Again, this does not work with the ruby-mysql driver or MySQL < 4.1.' - end + @connection.options(Mysql::SET_CHARSET_NAME, encoding) rescue nil end @connection.real_connect(*@connection_options) execute("SET NAMES '#{encoding}'") if encoding |