diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-11-14 04:00:57 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-01-15 03:42:11 +0900 |
commit | f1af27fd9d9101684b26d0dcf2028859d67bec1f (patch) | |
tree | 9429f234f85ea5b3de614ed4c0fb5517fc3d392d /activesupport/test/array_inquirer_test.rb | |
parent | 282668cc81ba153ed83820a5f544fea6907b504d (diff) | |
download | rails-f1af27fd9d9101684b26d0dcf2028859d67bec1f.tar.gz rails-f1af27fd9d9101684b26d0dcf2028859d67bec1f.tar.bz2 rails-f1af27fd9d9101684b26d0dcf2028859d67bec1f.zip |
`create_database` should not add default charset when `collation` is given
If `collation` is given without `charset`, it may generate invalid SQL.
For example `create_database(:matt_aimonetti, collation: "utf8mb4_bin")`:
```
> CREATE DATABASE `matt_aimonetti` DEFAULT CHARACTER SET `utf8` COLLATE `utf8mb4_bin`;
ERROR 1253 (42000): COLLATION 'utf8mb4_bin' is not valid for CHARACTER SET 'utf8'
```
In MySQL, charset is used to find the default collation. If `collation`
is given explicitly, it is not necessary to give extra charset.
Diffstat (limited to 'activesupport/test/array_inquirer_test.rb')
0 files changed, 0 insertions, 0 deletions