-
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
min(truncate())
may lead to incorrect result
#52978
Labels
affects-5.4
This bug affects the 5.4.x(LTS) versions.
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.
affects-8.1
This bug affects the 8.1.x(LTS) versions.
severity/major
sig/execution
SIG execution
type/bug
The issue is confirmed as a bug.
Comments
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
may-affects-8.1
labels
Apr 30, 2024
Reproduced locally with latest tidb version. |
The plan looks a little inefficiency but all right:
|
/label affects-5.4 |
ti-chi-bot
bot
added
affects-5.4
This bug affects the 5.4.x(LTS) versions.
and removed
may-affects-5.4
This bug maybe affects 5.4.x versions.
labels
May 6, 2024
/label affects-6.1 |
ti-chi-bot
bot
added
affects-6.1
This bug affects the 6.1.x(LTS) versions.
and removed
may-affects-6.1
labels
May 6, 2024
/label affects-6.5 |
ti-chi-bot
bot
added
affects-6.5
This bug affects the 6.5.x(LTS) versions.
and removed
may-affects-6.5
labels
May 6, 2024
/label affects-7.1 |
ti-chi-bot
bot
added
affects-7.1
This bug affects the 7.1.x(LTS) versions.
and removed
may-affects-7.1
labels
May 6, 2024
/label affects-7.5 |
ti-chi-bot
bot
added
affects-7.5
This bug affects the 7.5.x(LTS) versions.
and removed
may-affects-7.5
labels
May 6, 2024
/assign @yibin87 |
/remove-severity critical |
/severity major |
Corner case for not common used 'truncate' function, change to major severity. |
terry1purcell
pushed a commit
to terry1purcell/tidb
that referenced
this issue
May 17, 2024
…arge negative (pingcap#53075) close pingcap#52978
RidRisR
pushed a commit
to RidRisR/tidb
that referenced
this issue
May 23, 2024
…arge negative (pingcap#53075) close pingcap#52978
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 the 5.4.x(LTS) versions.
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.
affects-8.1
This bug affects the 8.1.x(LTS) versions.
severity/major
sig/execution
SIG execution
type/bug
The issue is confirmed as a bug.
1. Minimal reproduce step (Required)
Firstly, 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 executingerror.sql
multiple times or executeinit.sql
again to rebuild the table.init.sql.txt
error.sql.txt
2. What did you expect to see? (Required)
The first column represents the minimum value of the
c_ou2
column within each group,the second column represents the maximum value of the
c_ou2
column within each group,and the third column represents the minimum value of
truncate(-26340, c_ou2)
. If there exists ac_ou2
greater than 0, there should be a result of -26340, which is necessarily the minimum value.3. What did you see instead (Required)
In the multi-node version: correct.
In the single-node version: The value in the third column of the second row is incorrectly 0; it should be -26340.
output_re_main2.log
output_re_single2.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: