-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
a) use test; create table t1 ( a int, b int, index idx(b)); create table t2 ( c int, d int, index idx(d));
b) Run the script to insert data:
for i in {1..3000}
do
mysql -h127.0.0.1 -P4000 -uroot -D test -e "insert into t1 values($i, $i);"
mysql -h127.0.0.1 -P4000 -uroot -D test -e "insert into t2 values($i, $i);"
done
c) set @@tidb_max_chunk_size=32;
set @@tidb_index_join_batch_size=32;
INSERT INTO mysql.opt_rule_blacklist VALUES("topn_push_down");
ADMIN reload opt_rule_blacklist;
d)
execute the following sql statement twice:
select /*+ inl_hash_join(t2) */ t1.b from t1 left join t2 on t1.b=t2.d order by t1.b limit 1000,1;
2. What did you expect to see? (Required)
The two select statements executed successfully, and output:
+------+
| b |
+------+
| 1001 |
+------+
+------+
| b |
+------+
| 1001 |
+------+
3. What did you see instead (Required)
The first one outputs correctly, while the second one hangs.
4. What is your TiDB version? (Required)
| Release Version: v6.2.0-alpha
Edition: Community
Git Commit Hash: e0527ba
Git Branch: heads/refs/tags/v6.2.0-alpha
UTC Build Time: 2022-06-21 14:26:36
GoVersion: go1.18.2
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
Store: tikv |