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
mysql>select*from t1 where name ='借款策略集_网页';
+------------------------+
| name |
+------------------------+
| 借款策略集_网页 |
+------------------------+1 row inset (0.00 sec)
What did you see instead?
mysql>select*from t1 where name ='借款策略集_网页';
Empty set (0.01 sec)
mysql> alter table t1 drop index pname;
Query OK, 0 rows affected (0.33 sec)
mysql>select*from t1 where name ='借款策略集_网页';
+------------------------+
| name |
+------------------------+
| 借款策略集_网页 |
+------------------------+1 row inset (0.00 sec)
mysql> create index pname on t1 (name(12));
Query OK, 0 rows affected (0.34 sec)
mysql>select*from t1 where name ='借款策略集_网页';
Empty set (0.00 sec)
mysql>select*from t1 where name <'借款策略集_网页';
+--------------+
| name |
+--------------+
| 借款策略 |
+--------------+1 row inset (0.01 sec)
What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?
Release Version: v2.0.0
Git Commit Hash: 637e130e6a9ba2e54e158131c0466233db39a60e
Git Branch: HEAD
UTC Build Time: 2018-07-16 08:54:50
GoVersion: go version go1.10.1 darwin/amd64
TiKV Min Version: 2.0.0-rc.4.1
In our prefix index implementation, the index length is counted by its bytes.
However,
The effective maximum length of a VARCHAR in MySQL 5.0.3 and later is subject to the maximum row size (65,535 bytes, which is shared among all columns) and the character set used. For example, utf8 characters can require up to three bytes per character, so a VARCHAR column that uses the utf8 character set can be declared to be a maximum of 21,844 characters.
The text was updated successfully, but these errors were encountered:
Please answer these questions before submitting your issue. Thanks!
If possible, provide a recipe for reproducing the error.
tidb-server -V
or runselect tidb_version();
on TiDB)?In our prefix index implementation, the index length is counted by its bytes.
However,
The text was updated successfully, but these errors were encountered: