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

wrong behavior when enabling prepare-cache in stmt order by ? #8153

Closed
winoros opened this issue Nov 2, 2018 · 0 comments
Closed

wrong behavior when enabling prepare-cache in stmt order by ? #8153

winoros opened this issue Nov 2, 2018 · 0 comments
Labels
sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@winoros
Copy link
Member

winoros commented Nov 2, 2018

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
create table t1 (a int, b int);
insert into t1 (a,b) values (2,8),(1,9),(3,7);

# Will order by index
prepare stmt from "select * from t1 order by ?";
set @a=1;
execute stmt using @a;
set @a=2;
execute stmt using @a;
deallocate prepare stmt;
  1. What did you expect to see?

The results are ordered by column.

  1. What did you see instead?

Results are unordered.

  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?

master dd65caa

@winoros winoros added type/bug The issue is confirmed as a bug. sig/planner SIG: Planner labels Nov 2, 2018
xhebox pushed a commit to xhebox/tidb that referenced this issue Oct 8, 2021
xhebox pushed a commit to xhebox/tidb that referenced this issue Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

1 participant