It says "Currently, TiDB supports the following character sets:" (includes latin1).
2. What did you expect to see?
I think it is more accurate to say TiDB only supports ascii + utf8 character sets, since utf8 is a super set of ascii but not of latin1 (aka iso8859). Then "for compatibility latin1 is included in the results of meta data commands".
For example, consider this bug when trying to use a valid latin1 character:
set names latin1;
create table tc(a varchar(20) charset latin1);
insert into tc values (BINARY(X'A5'));
select * from tc
In MySQL, the yen character(¥) displays correctly. The character is is in latin1, but not in ascii.
3. What did you see instead?
mysql> select * from tc;
+------+
| a |
+------+
| � |
+------+
1 row in set (0.00 sec)
4. What version of TiDB are you using? (tidb-server -V or run select tidb_version(); on TiDB)
mysql> select tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v4.0.0-beta.2-290-ga0c740784
Git Commit Hash: a0c7407846fbc84f939afbc091f2db54f48c1bfa
Git Branch: master
UTC Build Time: 2020-04-17 04:04:45
GoVersion: go1.13
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
1 row in set (0.00 sec)
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. What did you do?
On this page: https://pingcap.com/docs/stable/reference/sql/character-set/
It says "Currently, TiDB supports the following character sets:" (includes latin1).
2. What did you expect to see?
I think it is more accurate to say TiDB only supports ascii + utf8 character sets, since utf8 is a super set of ascii but not of latin1 (aka iso8859). Then "for compatibility latin1 is included in the results of meta data commands".
For example, consider this bug when trying to use a valid latin1 character:
In MySQL, the yen character(¥) displays correctly. The character is is in latin1, but not in ascii.
3. What did you see instead?
4. What version of TiDB are you using? (
tidb-server -V
or runselect tidb_version();
on TiDB)