You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
drop table if exists t;
create table t (a varchar(100)) CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
alter table t set tiflash replica 1;
insert into t values('1 '), ('1\n'), ('1');
select hex(min(a)) from t;
MySQL version
mysql> select version();
+-----------+
| version() |
+-----------+
| 8.0.29 |
+-----------+
1 row in set (0.00 sec)
2. What did you expect to see? (Required)
MySQL [test]> select hex(min(a)) from t;
+-------------+
| hex(min(a)) |
+-------------+
| 31202020 |
+-------------+
3. What did you see instead (Required)
MySQL [test]> select hex(min(a)) from t;
+-------------+
| hex(min(a)) |
+-------------+
| 31 |
+-------------+
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
MySQL version
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiFlash version? (Required)
master
TiDB behavior
For mysql
For tidb
MySQL cmp '1\0' and '1':
According to https://docs.pingcap.com/tidb/dev/character-set-and-collation, the tidb choose to remove tail space.
Bug in tiflash
tiflash/dbms/src/Columns/ColumnString.cpp
Lines 317 to 318 in 432c153
tiflash show remove tail '\0'.
The text was updated successfully, but these errors were encountered: