-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
incorrect query result gets by stream agg hint #49902
Labels
affects-6.1
This bug affects the 6.1.x(LTS) versions.
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-7.1
This bug affects the 7.1.x(LTS) versions.
affects-7.5
This bug affects the 7.5.x(LTS) versions.
fuzz/randomtest
severity/critical
sig/execution
SIG execution
type/bug
The issue is confirmed as a bug.
Comments
except for the root Operator, the other operators' actual row count is quite the same and desirable, while streamAgg and hashAgg output different row-cout out. |
@XuHuaiyu /cc |
ti-chi-bot
bot
added
may-affects-5.4
This bug maybe affects 5.4.x versions.
may-affects-6.1
may-affects-6.5
may-affects-7.1
may-affects-7.5
labels
Dec 29, 2023
reproducible minor case step1: modify the tidb code: diff --git a/pkg/sessionctx/variable/tidb_vars.go b/pkg/sessionctx/variable/tidb_vars.go
index 059b9115a9..26539e9401 100644
--- a/pkg/sessionctx/variable/tidb_vars.go
+++ b/pkg/sessionctx/variable/tidb_vars.go
@@ -1187,10 +1187,10 @@ const (
DefBatchDelete = false
DefBatchCommit = false
DefCurretTS = 0
- DefInitChunkSize = 32
+ DefInitChunkSize = 2
DefMinPagingSize = int(paging.MinPagingSize)
DefMaxPagingSize = int(paging.MaxPagingSize)
- DefMaxChunkSize = 1024
+ DefMaxChunkSize = 2
DefDMLBatchSize = 0
DefMaxPreparedStmtCount = -1
DefWaitTimeout = 28800
diff --git a/pkg/sessionctx/variable/varsutil.go b/pkg/sessionctx/variable/varsutil.go
index 8d3262786b..a15d34da0d 100644
--- a/pkg/sessionctx/variable/varsutil.go
+++ b/pkg/sessionctx/variable/varsutil.go
@@ -233,7 +233,7 @@ const (
// initChunkSizeUpperBound indicates upper bound value of tidb_init_chunk_size.
initChunkSizeUpperBound = 32
// maxChunkSizeLowerBound indicates lower bound value of tidb_max_chunk_size.
- maxChunkSizeLowerBound = 32
+ maxChunkSizeLowerBound = 2
)
// appendDeprecationWarning adds a warning that the item is deprecated. step2: drop table if exists t, s;
CREATE TABLE `t` (`c` char(1)) COLLATE=utf8_general_ci ;
insert into t values("V"),("v");
CREATE TABLE `s` (`col_61` int);
insert into s values(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1),(1);
SELECT /*+ stream_agg()*/ `t`.`c` FROM (`s`) JOIN `t` GROUP BY `t`.`c`;
SELECT `t`.`c` FROM (`s`) JOIN `t` GROUP BY `t`.`c`; |
13 tasks
wshwsh12
added
affects-6.1
This bug affects the 6.1.x(LTS) versions.
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-7.1
This bug affects the 7.1.x(LTS) versions.
affects-7.5
This bug affects the 7.5.x(LTS) versions.
and removed
may-affects-5.4
This bug maybe affects 5.4.x versions.
labels
Jan 2, 2024
ti-chi-bot
bot
removed
may-affects-6.1
may-affects-6.5
may-affects-7.5
may-affects-7.1
labels
Jan 2, 2024
v5.4.0 doesn't use new collation, so don't pick this fix. |
This was referenced Jan 3, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects-6.1
This bug affects the 6.1.x(LTS) versions.
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-7.1
This bug affects the 7.1.x(LTS) versions.
affects-7.5
This bug affects the 7.5.x(LTS) versions.
fuzz/randomtest
severity/critical
sig/execution
SIG execution
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
Two queries gets the same result.
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
c52655c
The text was updated successfully, but these errors were encountered: