Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

planner: incompatible behavior between prepared statements and non-prep statements #42439

Closed
qw4990 opened this issue Mar 21, 2023 · 0 comments · Fixed by #42443
Closed

planner: incompatible behavior between prepared statements and non-prep statements #42439

qw4990 opened this issue Mar 21, 2023 · 0 comments · Fixed by #42443
Labels
affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. epic/plan-cache severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@qw4990
Copy link
Contributor

qw4990 commented Mar 21, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE UK_MU16407 (COL3 timestamp NULL DEFAULT NULL, UNIQUE KEY U3(COL3));
insert into UK_MU16407 values("1985-08-31 18:03:27");

SELECT COL3 FROM UK_MU16407 WHERE COL3>'2039-1-19 3:14:40';

PREPARE st FROM 'SELECT COL3 FROM UK_MU16407 WHERE COL3>?';
set @a='2039-1-19 3:14:40';
execute st using @a;

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

No error in the above SQLs;

3. What did you see instead (Required)

mysql> execute st using @a;
ERROR 1292 (22007): Incorrect timestamp value: '2039-01-19 03:14:40.000000'

4. What is your TiDB version? (Required)

+-----------------------------------------+
| version()                               |
+-----------------------------------------+
| 5.7.25-TiDB-v7.1.0-alpha-93-g0d1d140ba1 |
+-----------------------------------------+
@qw4990 qw4990 added type/bug The issue is confirmed as a bug. sig/planner SIG: Planner severity/moderate epic/plan-cache labels Mar 21, 2023
@qw4990 qw4990 changed the title planner: uncompatible behavior between prepared statements and non-prep statements planner: incompatible behavior between prepared statements and non-prep statements Mar 21, 2023
ti-chi-bot pushed a commit that referenced this issue Mar 22, 2023
@ti-chi-bot ti-chi-bot added the affects-6.5 This bug affects the 6.5.x(LTS) versions. label Sep 4, 2023
YangKeao pushed a commit to YangKeao/tidb that referenced this issue Sep 7, 2023
@ti-chi-bot ti-chi-bot added the affects-7.1 This bug affects the 7.1.x(LTS) versions. label Sep 15, 2023
ti-chi-bot bot pushed a commit that referenced this issue Oct 16, 2023
@ti-chi-bot ti-chi-bot removed the affects-7.1 This bug affects the 7.1.x(LTS) versions. label Dec 7, 2023
@YangKeao YangKeao added affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. labels Jan 25, 2024
@winoros winoros removed the affects-7.5 This bug affects the 7.5.x(LTS) versions. label Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. epic/plan-cache severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
4 participants