diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2015-09-11 22:35:43 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2015-09-11 22:35:43 +0900 |
commit | 48ec433ea247d9a360a6bc8b253e2cef26d6be61 (patch) | |
tree | 086fa8186e819b31aa44e720b84c77eaa91fba4c /activerecord/lib/active_record/connection_adapters | |
parent | bbf0d35bf6148752911c1da4b7449450faea8755 (diff) | |
download | rails-48ec433ea247d9a360a6bc8b253e2cef26d6be61.tar.gz rails-48ec433ea247d9a360a6bc8b253e2cef26d6be61.tar.bz2 rails-48ec433ea247d9a360a6bc8b253e2cef26d6be61.zip |
TEXT and BLOB limit is byte length, not character length.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb | 4 |
1 files changed, 2 insertions, 2 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 7b47539596..72dfdd406c 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb @@ -1027,7 +1027,7 @@ module ActiveRecord when 0..0xfff; "varbinary(#{limit})" when nil; "blob" when 0x1000..0xffffffff; "blob(#{limit})" - else raise(ActiveRecordError, "No binary type has character length #{limit}") + else raise(ActiveRecordError, "No binary type has byte length #{limit}") end end @@ -1048,7 +1048,7 @@ module ActiveRecord when nil, 0x100..0xffff; 'text' when 0x10000..0xffffff; 'mediumtext' when 0x1000000..0xffffffff; 'longtext' - else raise(ActiveRecordError, "No text type has character length #{limit}") + else raise(ActiveRecordError, "No text type has byte length #{limit}") end end |