Skip to content

"Out Of Memory Quota" return wrong results #31494

Closed
@ChenPeng2013

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

use test;
[test.txt](https://github.com/pingcap/tidb/files/7836737/test.txt)
set tidb_mem_quota_query=2097152;
# please execute many times
select /*+ inl_join(t1) */ * from t1 right join t2 on t1.b=t2.b;

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

mysql> select /*+ inl_join(t1) */ * from t1 right join t2 on t1.b=t2.b;
....
32771 rows in set (0.05 sec)

or

mysql> select /*+ inl_join(t1) */ * from t1 right join t2 on t1.b=t2.b;
ERROR 1105 (HY000): Out Of Memory Quota![conn_id=7]

3. What did you see instead (Required)

mysql> select /*+ inl_join(t1) */ * from t1 right join t2 on t1.b=t2.b;
....
| NULL | NULL | 8187 | 8187 | 8187 |
| NULL | NULL | 8188 | 8188 | 8188 |
| NULL | NULL | 8189 | 8189 | 8189 |
| NULL | NULL | 8190 | 8190 | 8190 |
+------+------+------+------+------+
8194 rows in set (0.03 sec)

4. What is your TiDB version? (Required)

Release Version: v5.5.0-alpha-22-ge0157f4a8
Edition: Community
Git Commit Hash: e0157f4a8cd86108acb2e14cd74e81c1f56f93e2
Git Branch: release-5.4
UTC Build Time: 2022-01-10 03:51:15
GoVersion: go1.16.5
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

affects-5.1This bug affects 5.1.x versions.affects-5.2This bug affects 5.2.x versions.affects-5.3This bug affects 5.3.x versions.affects-5.4This bug affects the 5.4.x(LTS) versions.severity/criticalsig/executionSIG executiontype/bugThe issue is confirmed as a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions