Skip to content
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 negation of minimum signed integer #9053

Closed
EmilyOng opened this issue Mar 31, 2025 · 0 comments · Fixed by dolthub/go-mysql-server#2920
Closed

Incorrect negation of minimum signed integer #9053

EmilyOng opened this issue Mar 31, 2025 · 0 comments · Fixed by dolthub/go-mysql-server#2920
Assignees
Labels
bug Something isn't working correctness We don't return the same result as MySQL customer issue

Comments

@EmilyOng
Copy link

Consider the following test case:

CREATE TABLE t0(c0 INT);
INSERT INTO t0(c0) VALUES(-2147483648);
SELECT -t0.c0 AS ref0 FROM t0;

Actual:

ref0
-2147483648

Expected:

ref0
2147483648

Description

I verified that MySQL produced the expected result.

Dolt Version

I reproduced this on v1.51.0.

d0/main*> SELECT dolt_version();
+----------------+
| dolt_version() |
+----------------+
| 1.51.0         |
+----------------+
1 row in set (0.01 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctness We don't return the same result as MySQL customer issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants