pingcap / pingcap/tidb

When DROP TABLE with multiple tables listed, and one of them does not exist, TiDB still drops all the remaining tables

Open
#64,218 1 comment 2 reactions 0 assignees View on GitHub
compatibility-mysql8 compatibility-mysql80 component/ddl type/compatibility
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
use test;

create table aa(a bigint primary key); create table cc like aa;
drop table aa, bb, cc;
-- ✅ ERROR 1051 (42S02): Unknown table 'test.bb'
show tables;
```

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

```
+----------------+
| Tables_in_test |
+----------------+
| aa |
| cc |
...
+----------------+
```

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

Tables `aa` and `cc` are gone

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

Reproduced on v6.5.5, v8.5.3 and master

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.