diff options
author | Ali Ibrahim <aibrahim2k2@gmail.com> | 2019-04-10 14:13:21 -0400 |
---|---|---|
committer | Ali Ibrahim <aibrahim2k2@gmail.com> | 2019-04-11 12:57:19 -0400 |
commit | 6584fb3939dd3892834ed93fa791064d5299cda2 (patch) | |
tree | aa6b25c50f13e543c3eeb35d5f44209d212f6a62 /activerecord/test | |
parent | b86f32bc8529caa767e166aa10725a0fe1add7b5 (diff) | |
download | rails-6584fb3939dd3892834ed93fa791064d5299cda2.tar.gz rails-6584fb3939dd3892834ed93fa791064d5299cda2.tar.bz2 rails-6584fb3939dd3892834ed93fa791064d5299cda2.zip |
Cache full MySQL version in schema cache
* The database version is cached in all the adapters, but this didn't include
the full MySQL version. Anything that uses the full MySQL version would need
to query the database to get that data even if they're using the schema
cache.
* Now the full MySQL version will be cached in the schema cache via the
Version object.
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/connection_adapters/schema_cache_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/connection_adapters/schema_cache_test.rb b/activerecord/test/cases/connection_adapters/schema_cache_test.rb index 89a9c30f9b..28e232b88f 100644 --- a/activerecord/test/cases/connection_adapters/schema_cache_test.rb +++ b/activerecord/test/cases/connection_adapters/schema_cache_test.rb @@ -95,6 +95,10 @@ module ActiveRecord assert_no_queries do assert_equal @database_version.to_s, @cache.database_version.to_s + + if current_adapter?(:Mysql2Adapter) + assert_not_nil @cache.database_version.full_version_string + end end end |