# [Known Issues] 未明确指定 Schema 的情况下，修改数据失败

## Key Words

Delete, Insert, Update 失败, 未指定 Schema

## Description

Delete query 未明确使用 Schema 的情况下删除失败

## Root Cause

It's a known issue, delete stmt privilege check wrong.

Detailed information please refer to this link: [https://github.com/pingcap/tidb/issues/22946](https://github.com/pingcap/tidb/issues/22946)

## Diagnostic Steps

```sql
MySQL [(none)]> create database test1;

MySQL [(none)]> create table test1.foo (id int, constraint uk_id primary key(id));

MySQL [(none)]> insert into test1.foo values(1); 

MySQL [(none)]> insert into test1.foo values(2);

MySQL [(none)]> create table test1.bar (id int, constraint uk_id primary key(id));

MySQL [(none)]> insert into test1.bar values(1); 

MySQL [(none)]> insert into test1.bar values(2);

MySQL [(none)]> delete from a1 using test1.foo as a1 inner join test1.bar as b1 where a1.id=b1.id and b1.id=2;
Query OK, 0 rows affected (0.01 sec)

MySQL [(none)]> use test1;
Database changed

MySQL [syslog]> delete from a1 using test1.foo as a1 inner join test1.bar as b1 where a1.id=b1.id and b1.id=2;
Query OK, 1 row affected (0.03 sec)
```

## Resolution

修复 PR [https://github.com/pingcap/tidb/pull/23215](https://github.com/pingcap/tidb/pull/23215)
升级到 v4.0.13 及之后版本 
升级到 v5.0 版本

## Workaround

指定 database

## Affected Versions

v4.0.0 ~ v4.0.12
v5.0.0-rc