Open zhangysh1995 opened 4 years ago
Hi, @zhangysh1995 It's expected behavior. The padding handle in TiDB is not the same as MySQL. https://pingcap.com/docs-cn/stable/character-set-and-collation/ FYI
@wjhuang2016 Not sure why this page is related.
It is inconsistent, the first inserted values don't have padding zeros but the newly inserted ones have. The column uses binary type
, not charset. https://dev.mysql.com/doc/refman/8.0/en/binary-varbinary.html
Hi, @zhangysh1995
Sorry about that.
It's a bug, we should forbid alter table table1 modify col1 binary(10);
.
/bug P2
Bug Report
1. What did you do?
2. What did you expect to see?
3. What did you see instead?
4. What version of TiDB are you using? (
tidb-server -V
or runselect tidb_version();
on TiDB)Reproducible on master branch:
select tidb_version();