-
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
subqueries produce different result between different deploy topology (3) #52778
Comments
+----------------------------------------+-----------+---------+-----------+---------------+----------------------------------------------------------------------------| id | estRows | actRows | task | access object | execution info +----------------------------------------+-----------+---------+-----------+---------------+----------------------------------------------------------------------------| Sort_13 | 528.00 | 528 | root | | time:1.24s, loops:2, RU:7501.356338 | └─Apply_17 | 528.00 | 528 | root | | time:1.24s, loops:2, Concurrency:OFF, cache:ON, cacheHitRatio:9.280% |
The plan and issue is very similar to #52777, it is probably the same root cause. |
/label affects-8.1 |
close as duplicated. |
/close |
@yibin87: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
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_este10ce0x
in the table.The second column is a subquery that searches for the maximum value of
ref_2.c_este10ce0x between ref_5.c_ub_1s91wi and NULL
. If the maximum value ofref_5.c_ub_1s91wi
is less thanc_este10ce0x
, all values will be evaluated as NULL, and thus output NULL. Otherwise, there exist some rows evaluated as 0, and thus output 0.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.
Under the constraint condition, the maximum value of
ref_5.c_ub_1s91wi
is 2114215637. However, even whenc_este10ce0x
is less than this value, some result is still evaluated as NULL.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: