Skip to content

wrongly skip plan cache with predicate simplification #61513

@hawkingrei

Description

@hawkingrei

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE t1 (
pk INTEGER PRIMARY KEY,
col_time TIME DEFAULT NULL,
col_varchar VARCHAR(1) DEFAULT NULL,
KEY (col_varchar)
);
INSERT INTO t1 VALUES(5, '11:03:56', 'I');
PREPARE st FROM
"SELECT * FROM t1
WHERE pk = 5 AND (col_time, col_varchar) IN ((23, 'Y'), (92, 'W'))";
EXECUTE st;

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

No warnings

3. What did you see instead (Required)

Level	Code	Message
Warning	1105	skip prepared plan-cache: True/False predicate simplification is triggered

4. What is your TiDB version? (Required)

ac812ca

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.severity/majorsig/plannerSIG: Plannertype/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