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

bug: decimal value div cause panic #17319

Open
1 of 2 tasks
b41sh opened this issue Jan 17, 2025 · 0 comments
Open
1 of 2 tasks

bug: decimal value div cause panic #17319

b41sh opened this issue Jan 17, 2025 · 0 comments
Assignees
Labels
C-bug Category: something isn't working found-by-sqlsmith

Comments

@b41sh
Copy link
Member

b41sh commented Jan 17, 2025

Search before asking

  • I had searched in the issues and found no similar issues.

Version

main

What's Wrong?

decimal value div cause panic, should return out of range error.
this bug is found by Tidb test

panicked at src/query/expression/src/utils/mod.rs:190:55:
called `Result::unwrap()` on an `Err` value: Overflow. Code: 1049, Text = Decimal scale must be between 0 and precision 76.

How to Reproduce?

root@0.0.0.0:48000/default> select 1e200/1e-200;
error: APIError: QueryFailed: [1104]called `Result::unwrap()` on an `Err` value: Overflow. Code: 1049, Text = Decimal scale must be between 0 and precision 76.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@b41sh b41sh added C-bug Category: something isn't working found-by-sqlsmith labels Jan 17, 2025
@sundy-li sundy-li self-assigned this Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: something isn't working found-by-sqlsmith
Projects
None yet
Development

No branches or pull requests

2 participants