diff options
author | Ali Ibrahim <aibrahim2k2@gmail.com> | 2019-04-12 09:28:48 -0400 |
---|---|---|
committer | Ali Ibrahim <aibrahim2k2@gmail.com> | 2019-04-12 09:31:31 -0400 |
commit | b381e43a12fdf10c93f45939b4fa4689cfbda559 (patch) | |
tree | f955b97fe28d8f4fca0ced0a440b3daf3fee7659 /activerecord/lib/active_record/connection_adapters | |
parent | 6584fb3939dd3892834ed93fa791064d5299cda2 (diff) | |
download | rails-b381e43a12fdf10c93f45939b4fa4689cfbda559.tar.gz rails-b381e43a12fdf10c93f45939b4fa4689cfbda559.tar.bz2 rails-b381e43a12fdf10c93f45939b4fa4689cfbda559.zip |
Make changes per PR feedback
* Remove AbstractMysqlAdapter::Version since full_version_string will always
be set.
* Remove nodoc on private methods because private methods are not exposed in
the docs.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb | 8 | ||||
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb | 4 |
2 files changed, 3 insertions, 9 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb index 75bc94c49c..a7be475618 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb @@ -51,12 +51,6 @@ module ActiveRecord end end - class Version < AbstractAdapter::Version # :nodoc: - def initialize(version_string, full_version_string) - super - end - end - def initialize(connection, logger, connection_options, config) super(connection, logger, config) end @@ -809,7 +803,7 @@ module ActiveRecord MismatchedForeignKey.new(options) end - def version_string(full_version_string) # :nodoc: + def version_string(full_version_string) full_version_string.match(/^(?:5\.5\.5-)?(\d+\.\d+\.\d+)/)[1] end diff --git a/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb index 2ff411a058..5b0335c22b 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb @@ -125,11 +125,11 @@ module ActiveRecord super end - def full_version # :nodoc: + def full_version schema_cache.database_version.full_version_string end - def get_full_version # :nodoc: + def get_full_version @connection.server_info[:version] end end |