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

The result of decimal divide won't round at some precision. #6462

Closed
LittleFall opened this issue Dec 8, 2022 · 0 comments · Fixed by #6471
Closed

The result of decimal divide won't round at some precision. #6462

LittleFall opened this issue Dec 8, 2022 · 0 comments · Fixed by #6471
Labels
affects-6.5 This bug affects the 6.5.x(LTS) versions. component/compute severity/moderate type/bug The issue is confirmed as a bug.

Comments

@LittleFall
Copy link
Contributor

LittleFall commented Dec 8, 2022

Bug Report

1. Minimal reproduce step (Required)

drop table ish;
create table ish(a decimal(4,0), b decimal(40, 20));
alter table ish set tiflash replica 1;
insert into ish values (1, 10001);

set tidb_enforce_mpp=1;
select a/b from ish;

2. What did you expect to see? (Required)

+--------+
| a/b    |
+--------+
| 0.0001 |
+--------+

3. What did you see instead (Required)

+--------+
| a/b    |
+--------+
| 0.0000 |
+--------+

4. What is your TiFlash version? (Required)

6.5

@LittleFall LittleFall added the type/bug The issue is confirmed as a bug. label Dec 8, 2022
@LittleFall LittleFall changed the title the result of decimal divide won't round at some precision. The result of decimal divide won't round at some precision. Dec 8, 2022
@LittleFall LittleFall added affects-5.0 affects-5.1 affects-5.2 affects-5.3 affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-6.0 affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.2 affects-6.3 affects-6.4 affects-6.5 This bug affects the 6.5.x(LTS) versions. and removed affects-5.0 affects-5.1 affects-5.2 affects-5.3 affects-5.4 This bug affects the 5.4.x(LTS) versions. affects-6.0 affects-6.1 This bug affects the 6.1.x(LTS) versions. affects-6.2 affects-6.3 affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-6.4 labels Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.5 This bug affects the 6.5.x(LTS) versions. component/compute severity/moderate type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants