aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-06-01 17:39:13 +0900
committerGitHub <noreply@github.com>2018-06-01 17:39:13 +0900
commitb257a2d9b3009f1b9cbfc56c5ba1bd07b7263af9 (patch)
tree6cc200f11f78295c1b15d843d002495f96ca796a /activerecord
parent455ed450cc92010f0930ff1a5e2f5baf770dfdae (diff)
parent4d65293622d4bb5510c5a8d2537910f8ff8b6cc8 (diff)
downloadrails-b257a2d9b3009f1b9cbfc56c5ba1bd07b7263af9.tar.gz
rails-b257a2d9b3009f1b9cbfc56c5ba1bd07b7263af9.tar.bz2
rails-b257a2d9b3009f1b9cbfc56c5ba1bd07b7263af9.zip
Merge pull request #33028 from yahonda/use_mariadb10_3
CI against MariaDB 10.3
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/test/cases/adapters/mysql2/virtual_column_test.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/test/cases/adapters/mysql2/virtual_column_test.rb b/activerecord/test/cases/adapters/mysql2/virtual_column_test.rb
index ffde8ed4d8..8494acee3b 100644
--- a/activerecord/test/cases/adapters/mysql2/virtual_column_test.rb
+++ b/activerecord/test/cases/adapters/mysql2/virtual_column_test.rb
@@ -18,6 +18,7 @@ if ActiveRecord::Base.connection.supports_virtual_columns?
t.string :name
t.virtual :upper_name, type: :string, as: "UPPER(`name`)"
t.virtual :name_length, type: :integer, as: "LENGTH(`name`)", stored: true
+ t.virtual :name_octet_length, type: :integer, as: "OCTET_LENGTH(`name`)", stored: true
end
VirtualColumn.create(name: "Rails")
end
@@ -55,7 +56,8 @@ if ActiveRecord::Base.connection.supports_virtual_columns?
def test_schema_dumping
output = dump_table_schema("virtual_columns")
assert_match(/t\.virtual\s+"upper_name",\s+type: :string,\s+as: "(?:UPPER|UCASE)\(`name`\)"$/i, output)
- assert_match(/t\.virtual\s+"name_length",\s+type: :integer,\s+as: "LENGTH\(`name`\)",\s+stored: true$/i, output)
+ assert_match(/t\.virtual\s+"name_length",\s+type: :integer,\s+as: "(?:octet_length|length)\(`name`\)",\s+stored: true$/i, output)
+ assert_match(/t\.virtual\s+"name_octet_length",\s+type: :integer,\s+as: "(?:octet_length|length)\(`name`\)",\s+stored: true$/i, output)
end
end
end