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

expression: Fix the decimal fraction of DIV #6590

Merged
merged 6 commits into from
May 23, 2018

Conversation

zz-jason
Copy link
Member

drop table if exists t;
create table t(a bigint, b decimal(6, 2));
insert into t values(1, 1.12), (0, 1.12);

Before this PR:

TiDB(localhost:4000) > select a/b from t;
+--------+
| a/b    |
+--------+
| 0.8929 |
|      0 |
+--------+
2 rows in set (0.01 sec)

After This PR:

TiDB(localhost:4000) > select a/b from t;
+--------+
| a/b    |
+--------+
| 0.8929 |
| 0.0000 |
+--------+
2 rows in set (0.00 sec)

fix #6564

@zz-jason
Copy link
Member Author

/run-all-tests

@iamxy
Copy link
Member

iamxy commented May 21, 2018

/run-common-test

@iamxy
Copy link
Member

iamxy commented May 21, 2018

/run-integration-common-test

@zz-jason
Copy link
Member Author

/run-all-tests

@zz-jason
Copy link
Member Author

/run-all-tests tidb-test=pr/536

@zz-jason
Copy link
Member Author

/run-integration-common-test

@zz-jason
Copy link
Member Author

@zz-jason zz-jason changed the title expression: Fix the decimal fraction of div expression: Fix the decimal fraction of DIV May 22, 2018
Copy link
Contributor

@zhexuany zhexuany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tiancaiamao
Copy link
Contributor

LGTM

@tiancaiamao tiancaiamao added the status/LGT2 Indicates that a PR has LGTM 2. label May 23, 2018
@tiancaiamao tiancaiamao merged commit 4ea89b3 into pingcap:master May 23, 2018
@zz-jason zz-jason deleted the dev/fixdivdecimal branch May 23, 2018 03:42
zz-jason added a commit to zz-jason/tidb that referenced this pull request May 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT2 Indicates that a PR has LGTM 2. type/compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

a compatibility problem on builtin UDF: DIV
4 participants