Skip to content

Batch Point Get doesn't use converted datum #54746

@Ryan-Git

Description

@Ryan-Git

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE `t` (`tenant_id` bigint(20) NOT NULL DEFAULT '0',`order_id` bigint(20) NOT NULL DEFAULT '0',UNIQUE KEY `uk_ten_ord` (`order_id`, `tenant_id`))  PARTITION BY HASH(`tenant_id`) PARTITIONS 32;

INSERT INTO t(tenant_id, order_id) VALUES (123, 456);

DELETE FROM t where (tenant_id, order_id) in (('123','456'));

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

affected rows 1

3. What did you see instead (Required)

affected rows 0

4. What is your TiDB version? (Required)

up to 7.5.0, master the same I think

in #26713, cases of ValueExpr and ParamMarkerExpr are handled(use converted int datum instead of origin string one), but the RowExpr is left unchanged, which causes this problem.

Is it intentional?

Metadata

Metadata

Assignees

Labels

affects-6.1This bug affects the 6.1.x(LTS) versions.affects-6.5This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.component/tablepartitionThis issue is related to Table Partition of TiDB.severity/majorsig/sql-infraSIG: SQL Infratype/bugThe issue is confirmed as a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions