aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2016-10-14 23:55:14 -0300
committerGitHub <noreply@github.com>2016-10-14 23:55:14 -0300
commit8e06900742c78c2036f269ac38ef427b66bb8450 (patch)
tree86be8ee56bbd63d020200426c020b5e7eea4cfba
parent1167df3d11434de80d7e2533dbd1c1177e1805d1 (diff)
parent32fc0331227ab9b14c875837ea66be8ee70ab96b (diff)
downloadrails-8e06900742c78c2036f269ac38ef427b66bb8450.tar.gz
rails-8e06900742c78c2036f269ac38ef427b66bb8450.tar.bz2
rails-8e06900742c78c2036f269ac38ef427b66bb8450.zip
Merge pull request #26785 from yahonda/diag26774
Support index.length for MySQL 8.0.0-dmr
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb2
1 files changed, 1 insertions, 1 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 003ba6eff5..e7bd0e7c12 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
@@ -388,7 +388,7 @@ module ActiveRecord
end
indexes.last.columns << row[:Column_name]
- indexes.last.lengths.merge!(row[:Column_name] => row[:Sub_part]) if row[:Sub_part]
+ indexes.last.lengths.merge!(row[:Column_name] => row[:Sub_part].to_i) if row[:Sub_part]
end
end