aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVipul A M <vipulnsward@gmail.com>2016-04-12 19:19:21 +0530
committerVipul A M <vipulnsward@gmail.com>2016-04-14 04:42:41 +0530
commitbbb8f518b53f1e9ef90c490f741e2eea0d993a17 (patch)
tree2856ce02cf63fe1633184bb08c194e947fa8eeff
parentdb9bc8097399aab9c866175b12e9e099b6c83ffa (diff)
downloadrails-bbb8f518b53f1e9ef90c490f741e2eea0d993a17.tar.gz
rails-bbb8f518b53f1e9ef90c490f741e2eea0d993a17.tar.bz2
rails-bbb8f518b53f1e9ef90c490f741e2eea0d993a17.zip
Include running mariadb on travis
- Specify we want to run on latest stable ruby for mariadb - change in runs of builds Make mariadb? method publicly available
-rw-r--r--.travis.yml5
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb8
-rw-r--r--activerecord/test/cases/time_precision_test.rb1
3 files changed, 10 insertions, 4 deletions
diff --git a/.travis.yml b/.travis.yml
index ef85107515..f3314f49af 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -31,6 +31,11 @@ rvm:
matrix:
include:
# Latest compiled version in http://rubies.travis-ci.org
+ - rvm: 2.3.0
+ env:
+ - "GEM=ar:mysql2"
+ addons:
+ mariadb: 10.0
- rvm: jruby-9.0.5.0
jdk: oraclejdk8
env:
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 1797af4e97..6189e381bf 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
@@ -81,6 +81,10 @@ module ActiveRecord
@version ||= Version.new(full_version.match(/^\d+\.\d+\.\d+/)[0])
end
+ def mariadb? # :nodoc:
+ full_version =~ /mariadb/i
+ end
+
# Returns true, since this connection adapter supports migrations.
def supports_migrations?
true
@@ -782,10 +786,6 @@ module ActiveRecord
subselect.from subsubselect.as('__active_record_temp')
end
- def mariadb?
- full_version =~ /mariadb/i
- end
-
def supports_rename_index?
mariadb? ? false : version >= '5.7.6'
end
diff --git a/activerecord/test/cases/time_precision_test.rb b/activerecord/test/cases/time_precision_test.rb
index 628a8eb771..c422daa859 100644
--- a/activerecord/test/cases/time_precision_test.rb
+++ b/activerecord/test/cases/time_precision_test.rb
@@ -44,6 +44,7 @@ class TimePrecisionTest < ActiveRecord::TestCase
end
def test_formatting_time_according_to_precision
+ skip("TIME column on MariaDB doesn't ignore the date part of the string when it coerces to time") if current_adapter?(:Mysql2Adapter) && ActiveRecord::Base.connection.mariadb?
@connection.create_table(:foos, force: true) do |t|
t.time :start, precision: 0
t.time :finish, precision: 4