pingcap / pingcap/tidb

content in database cannot be completely cleared

Open
#62,390 1 comment 0 reactions 0 assignees View on GitHub
component/ddl type/bug
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
create or replace view `test`.`V` as (select 1);

create or replace view `test`.`v` as (select 1);

drop database test;

create database test;

show tables in test;
```

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

the database `test` should be empty because it was dropped & recreated.

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

- the first time I execute the SQLs, there is one view `V` left
- the second time, there are two
- and the third time, there are three

Image

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

```
Release Version: v8.5.1
Edition: Community
Git Commit Hash: fea86c8e35ad4a86a5e1160701f99493c2ee547c
Git Branch: HEAD
UTC Build Time: 2025-01-16 07:40:13
GoVersion: go1.23.2
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.