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 decimal scale if division is used, but it is not the last operation #4931

Closed
jennifersp opened this issue Dec 6, 2022 · 0 comments · Fixed by dolthub/go-mysql-server#2308
Labels
bug Something isn't working sql Issue with SQL

Comments

@jennifersp
Copy link
Contributor

Dolt> select 2000.0 / 250000000.0 * (24.0 * 6.0 * 6.25 * 10.0);
+---------------------------------------------------+
| 2000.0 / 250000000.0 * (24.0 * 6.0 * 6.25 * 10.0) |
+---------------------------------------------------+
| 0.07200000000000                                  |
+---------------------------------------------------+

MySQL> select 2000.0 / 250000000.0 * (24.0 * 6.0 * 6.25 * 10.0);
+---------------------------------------------------+
| 2000.0 / 250000000.0 * (24.0 * 6.0 * 6.25 * 10.0) |
+---------------------------------------------------+
| 0.0720000000                                      |
+---------------------------------------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sql Issue with SQL
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant