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

Get "Can't find column" error using execute statement #58761

Open
joechenrh opened this issue Jan 7, 2025 · 0 comments
Open

Get "Can't find column" error using execute statement #58761

joechenrh opened this issue Jan 7, 2025 · 0 comments
Assignees
Labels
epic/plan-cache severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@joechenrh
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE t1 (col1 int, col2 int);

prepare p3 from "select avg(col1) from t1 where not( col1 < ? ) or ( col2 = ? ) group by col1 having col1 = 7";

set @i0 = 1, @i1 = 1;

execute p3 using @i0, @i1;

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

Success.

3. What did you see instead (Required)

mysql> execute p3 using @i0, @i1;execute p3 using @i0, @i1;
ERROR 1105 (HY000): Can't find column test.t1.col2 in schema Column: [test.t1.col1] PKOrUK: [] NullableUK: []

4. What is your TiDB version? (Required)

master

@joechenrh joechenrh added the type/bug The issue is confirmed as a bug. label Jan 7, 2025
@qw4990 qw4990 self-assigned this Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic/plan-cache severity/moderate sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

2 participants