wrong behavior when enabling prepare-cache in stmt order by ?
#8153
Closed
Description
opened on Nov 2, 2018
Bug Report
Please answer these questions before submitting your issue. Thanks!
- 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;
- What did you expect to see?
The results are ordered by column.
- What did you see instead?
Results are unordered.
- What version of TiDB are you using (
tidb-server -V
or runselect tidb_version();
on TiDB)?
master dd65caa
Activity