pingcap / pingcap/tidb

UPDATE is not blocked by DELETE

Open
#69,281 2 comments 0 reactions 0 assignees View on GitHub
contribution may-affects-7.5 may-affects-8.1 may-affects-8.5 severity/major sig/transaction type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Bug Report

### 1. Minimal reproduce step (Required)

Isolation Level: Read Committed & Repeatable Read

```sql
/* init */ CREATE TABLE t (c1 NUMERIC);
/* init */ INSERT INTO t VALUES (1);

/* t1 */ BEGIN;
/* t1 */ INSERT INTO t (c1) VALUES (2);
/* t2 */ BEGIN;
/* t2 */ DELETE FROM t;
/* t1 */ UPDATE t SET c1 = 3;
/* t1 */ COMMIT;
/* t2 */ ROLLBACK;
```

### 2. What did you expect to see? (Required)

We expect UPDATE statement to be blocked.

In addition, in MySQL, the DELETE statement is blocked and the UPDATE statement reports deadlock.

### 3. What did you see instead (Required)

UPDATE statement is not blocked by the DELETE statement of another transaction.

### 4. What is your TiDB version? (Required)

```
Release Version: v8.5.6
Edition: Community
Git Commit Hash: https://github.com/pingcap/tidb/commit/ae18096e023780bb56bfce33698abec0d4640d0a
Git Branch: HEAD
UTC Build Time: 2026-04-14 07:15:36
GoVersion: go1.25.8
Race Enabled: false
Check Table Before Drop: false
Store: tikv
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.