Open qw4990 opened 9 hours ago
When using Prepared, the normalized query used to match the binding is "select hour ( d
) as hour
from test
. t
group by hour ( d
)", but if use normal query, it's "select hour ( d
) as hour
from test
. t
group by hour
".
So the Prepared process must normalize the query wrongly and change the "group by hour
" to "group by hour (d
)" and cause this problem.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
Both the normal query and the prepared statement can use the global binding.
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
Master