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)
createtablet01(a varchar(20));
insert into t01 values ("齆斮聒蚆髙锐潊贩哨啅捸爖斥圱犳飁綴纜牖蚙");
altertable t01 add index eidx ((concat_ws('expression_index', a, 'test')));
select*from t01 use index (eidx) where (concat_ws('expression_index', a, 'test')) not like (concat_ws('expression_index', "齆斮聒蚆髙锐潊贩哨啅捸爖斥圱犳飁綴纜牖蚙", 'test'));
insert into t01 values ("齆斮聒蚆髙锐潊贩哨啅捸爖斥圱犳飁綴纜牖蚙");
2. What did you expect to see? (Required)
MySQL root@172.16.5.103:hchwang>select*from t01 use index (eidx) where (concat_ws('expression_index', a, 'test')) not like (concat_ws('expression_index', "齆斮聒蚆髙锐潊贩哨啅捸爖斥圱犳飁綴纜牖蚙", 'test'));
+---+
| a |
+---+0 rows insetTime: 0.054s
MySQL root@172.16.5.103:hchwang>insert into t01 values ("齆斮聒蚆髙锐潊贩哨啅捸爖斥圱犳飁綴纜牖蚙");
Query OK, 1 row affected
Time: 0.039s
MySQL root@172.16.5.103:hchwang>select*from t01;
+------------------------------------------+
| a |
+------------------------------------------+
| 齆斮聒蚆髙锐潊贩哨啅捸爖斥圱犳飁綴纜牖蚙 |
| 齆斮聒蚆髙锐潊贩哨啅捸爖斥圱犳飁綴纜牖蚙 |
+------------------------------------------+
3. What did you see instead (Required)
MySQL root@127.0.0.1:test>droptablet01;
Query OK, 0 rows affected
Time: 0.019s
MySQL root@127.0.0.1:test> create table t01(a varchar(20));
Query OK, 0 rows affected
Time: 0.011s
MySQL root@127.0.0.1:test>insert into t01 values ("齆斮聒蚆髙锐潊贩哨啅捸爖斥圱犳飁綴纜牖蚙");
Query OK, 1 row affected
Time: 0.001s
MySQL root@127.0.0.1:test> alter table t01 add index eidx ((concat_ws('expression_index', a, 'test')));
Query OK, 0 rows affected
Time: 2.547s
MySQL root@127.0.0.1:test>select*from t01 use index (eidx) where (concat_ws('expression_index', a, 'test')) not like (concat_ws('expression_index', "齆斮聒蚆髙锐潊贩哨啅捸爖斥圱犳飁綴纜牖蚙", 'test'));
+------------------------------------------+
| a |
+------------------------------------------+
| 齆斮聒蚆髙锐潊贩哨啅捸爖斥圱犳飁綴纜牖蚙 |
+------------------------------------------+1 row insetTime: 0.008s
MySQL root@127.0.0.1:test>insert into t01 values ("齆斮聒蚆髙锐潊贩哨啅捸爖斥圱犳飁綴纜牖蚙");
(1406, 'Data Too Long, field len 25, data len 40')
MySQL root@127.0.0.1:test>select*from t01;
+------------------------------------------+
| a |
+------------------------------------------+
| 齆斮聒蚆髙锐潊贩哨啅捸爖斥圱犳飁綴纜牖蚙 |
+------------------------------------------+
4. What is your TiDB version? (Required)
tidb_version() | Release Version: v5.2.0-alpha-567-gdba8e111f-dirty
Edition: Community
Git Commit Hash: dba8e111fe26b1db0742dd5a024309137d49f5d2
Git Branch: release-5.2
UTC Build Time: 2021-08-1901:23:29
GoVersion: go1.16.2
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
The text was updated successfully, but these errors were encountered:
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: