TiKV crashes
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
```sql
/* init */ DROP TABLE IF EXISTS t;
/* init */ CREATE TABLE t (c1 BIT (30));
/* init */ INSERT INTO t VALUES (b'100001001101010001000010001111');
/* init */ INSERT INTO t VALUES (b'010010001100110110000011010101');
UPDATE t SET c1 = b'111001111010010110110010001011' WHERE c1 NOT LIKE c1;
```
### 2. What did you expect to see? (Required)
The UPADTE statement executes successfully, and no rows in table t are updated.
### 3. What did you see instead (Required)
TiKV crashes.
The UPDATE statement does not receive any execution feedback.
In the TiKV log, the error message is roughly as follows:
```bash
[FATAL] [lib.rs:481] ["range end index 2 out of range for slice of length 1"]
```
By the way, executing the following UPDATE statement will not cause TiKV to crash.
```sql
UPDATE t SET c1 = b'111001111010010110110010001011' WHERE FALSE;
```
And executing the following test case (with a reduced bit length) will also not cause TiKV to crash.
```sql
/* init */ DROP TABLE IF EXISTS t;
/* init */ CREATE TABLE t (c1 BIT (20));
/* init */ INSERT INTO t VALUES (b'10000100110101000100');
/* init */ INSERT INTO t VALUES (b'01001000110011011000');
UPDATE t SET c1 = b'11100111101001011011' WHERE c1 NOT LIKE c1;
```
### 4. What is your TiDB version? (Required)
```sql
mysql> select version();
+--------------------+
| version() |
+--------------------+
| 8.0.11-TiDB-v8.5.3 |
+--------------------+
```
```sql
mysql> select tidb_version();
+-----------------------------------------------------------+
| tidb_version() |
+-----------------------------------------------------------+
| Release Version: v8.5.3 |
| Edition: Community |
| Git Commit Hash: dc2548aac79a712265e831cff2a3a896bc0a5a38 |
| Git Branch: HEAD |
| UTC Build Time: 2025-07-31 13:54:43 |
| GoVersion: go1.23.8 |
| Race Enabled: false |
| Check Table Before Drop: false |
| Store: tikv |
+-----------------------------------------------------------+
```
Contributor guide
Assessment
This issue has not been assessed yet.