pingcap / pingcap/tidb

delete stmt miss the Batch_Point_Get plan

Open
#63,356 0 comments 0 reactions 0 assignees View on GitHub
affects-8.5 contribution may-affects-6.5 may-affects-7.1 may-affects-7.5 may-affects-8.1 severity/major sig/planner 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)

CREATE TABLE `t1` (
`order_id` bigint(20) NOT NULL DEFAULT '0',
UNIQUE KEY `order_id` (`order_id`)
);

explain delete from t1 where order_id in ('1 1');
Image

explain select * from t1 where order_id in ('1 1');
Image

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

delete stmt should also use Batch_Point_Get plan as same as the select stmt.

### 3. What did you see instead (Required)
delete stmt has wrong plan.

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

all
may be relate to this PR: https://github.com/pingcap/tidb/pull/26713/files

ConvertTo() returns TruncateError in the delete stmt, so skip the Batch_Point_Get plan
Image

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.