select
((exists (select 1)) * -5) as c1,
(true * -5) as c2,
((0 in (0)) * -5) as c3
;
2. What did you expect to see? (Required)
mysql> select
-> ((exists (select 1)) * -5) as c1,
-> (true * -5) as c2,
-> ((0 in (0)) * -5) as c3
-> ;
+----+----+----+
| c1 | c2 | c3 |
+----+----+----+
| -5 | -5 | -5 |
+----+----+----+
1 row in set (0.00 sec)
3. What did you see instead (Required)
mysql> select
-> ((exists (select 1)) * -5) as c1,
-> (true * -5) as c2,
-> ((0 in (0)) * -5) as c3
-> ;
+----------------------+----+----+
| c1 | c2 | c3 |
+----------------------+----+----+
| 18446744073709551611 | -5 | -5 |
+----------------------+----+----+
1 row in set (0.00 sec)
4. What is your TiDB version? (Required)
Release Version: v8.4.0-alpha-370-gf773b6eeb4
Edition: Community
Git Commit Hash: f773b6eeb4593a3e2c998c265f491a016570a426
Git Branch: HEAD
UTC Build Time: 2024-10-11 02:08:09
GoVersion: go1.23.2
Race Enabled: false
Check Table Before Drop: false
Store: tikv
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.
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
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.