-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
subqueries produce different result between different deploy topology (2) #52777
Labels
affects-5.4
This bug affects 5.4.x versions.
affects-6.1
affects-6.5
affects-7.1
affects-7.5
affects-8.1
severity/critical
sig/execution
SIG execution
type/bug
The issue is confirmed as a bug.
Comments
r33s3n6
changed the title
subquery produce different result between different deploy topology (2)
subqueries produce different result between different deploy topology (2)
Apr 20, 2024
The plan seems ok, while reproduced the incorrect result with latest version. Correlated column replacement is suspicious. |
/severity critical |
ti-chi-bot
bot
added
severity/critical
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
may-affects-8.1
labels
Apr 29, 2024
/label affects-8.1 |
This was referenced Apr 29, 2024
Narrow down the case:
|
13 tasks
/label affects-5.4 |
ti-chi-bot
bot
added
affects-5.4
This bug affects 5.4.x versions.
and removed
may-affects-5.4
This bug maybe affects 5.4.x versions.
labels
May 8, 2024
/label affects-6.1 |
/label affects-6.5 |
/label affects-7.1 |
/label affects-7.5 |
13 tasks
ti-chi-bot
pushed a commit
to ti-chi-bot/tidb
that referenced
this issue
May 10, 2024
This was referenced May 10, 2024
terry1purcell
pushed a commit
to terry1purcell/tidb
that referenced
this issue
May 17, 2024
RidRisR
pushed a commit
to RidRisR/tidb
that referenced
this issue
May 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects-5.4
This bug affects 5.4.x versions.
affects-6.1
affects-6.5
affects-7.1
affects-7.5
affects-8.1
severity/critical
sig/execution
SIG execution
type/bug
The issue is confirmed as a bug.
1. Minimal reproduce step (Required)
First execute
init.sql
to create the table. Then executingerror.sql
yields unexpected results. Note that reproducing these results might not be entirely stable. Typically, it can be completed within three attempts. You can try executing multiple times or execute it again after rebuilding the table.init.sql.txt
error.sql.txt
2. What did you expect to see? (Required)
The first column is a column c_k in the table.
The second column is the maximum value of t_xf1at0.c_pv from another table t_xf1at0 under certain conditions.
The third column is a subquery that calculates
t_xf1at0.c_pv <= c_k
, sorted in ascending order. If the maximum value of t_xf1at0.c_pv is greater than c_k, the result should be 0; otherwise, it should be 1.3. What did you see instead (Required)
In both TiDB multi-node and TiDB single-node versions, incorrect values are present, but the results are different.
output_re_main.log
output_re_single.log
4. What is your TiDB version? (Required)
topology:
distributed.yaml:
single.yaml
about us
We are the BASS team from the School of Cyber Science and Technology at Beihang University. Our main focus is on system software security, operating systems, and program analysis research, as well as the development of automated program testing frameworks for detecting software defects. Using our self-developed database vulnerability testing tool, we have identified the above-mentioned vulnerabilities in TiDB that may lead to database logic error.
The text was updated successfully, but these errors were encountered: