[MDEV-8942] utf8 charater set doesn't affect table creation. Created: 2015-10-14 Updated: 2015-11-17 Resolved: 2015-11-17 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Character Sets |
| Affects Version/s: | 10.1.7 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | passion053 | Assignee: | Unassigned |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | need_feedback | ||
| Environment: |
CentOS 7.1 |
||
| Description |
|
( First of all, sorry for my poor english. My mother tongue is not english. ) 1. Add below statement to /etc/my.cnf.d/server.cnf character-set-server = utf8 2. Restart DB and check character set. 3. Create new database and move to that database. 4. Create table without 'CHARACTER SET' option. 5. Check 'SHOW CREATE TABLE' statement result. In MariaDB 10.0.21, Once I set 'character-set-server = utf8', all tables are created with utf8 even though I didn't write the 'character_set' option in 'CREATE TABLE' statement. And I think this is normal. Please check. Thank you. |
| Comments |
| Comment by Elena Stepanova [ 2015-10-19 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
When I do exactly what you described, I get the expected result – the table is created with character set UTF8, see the output below.
However, it's easy to make a mistake while doing this test, please check that's not what happened in your case. For example:
Since your default database testDB was created with character set latin1, your character_set_database shows latin1, and all tables in this schema will be created with character set latin1.
But if you now create a new database, it will be created with the new default character set, and tables which you later create inside that new schema will inherit the new character set:
Please let me know if it explains your observations. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2015-11-17 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Closing for now as "can't reproduce". If you have more information and still think there is a bug, please comment to re-open. |