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

truncate float incorrectly. #307

Closed
siddontang opened this issue Oct 6, 2015 · 4 comments
Closed

truncate float incorrectly. #307

siddontang opened this issue Oct 6, 2015 · 4 comments
Labels
type/bug The issue is confirmed as a bug.

Comments

@siddontang
Copy link
Member

create table t (float(8));
insert into t values (3.14);
select * from t;

we will get 3, not 3.14.

@shenli

@siddontang siddontang added the type/bug The issue is confirmed as a bug. label Oct 6, 2015
@coocood
Copy link
Member

coocood commented Oct 7, 2015

Do you mean create table t (c1 float(0))?

@siddontang siddontang changed the title truncate float with decimal 0 incorrectly. truncate float incorrectly. Oct 7, 2015
@siddontang
Copy link
Member Author

No, create table t (float(8)), 8 is for field length, no decimal here.

@coocood
Copy link
Member

coocood commented Oct 7, 2015

@siddontang but I can not execute this statement in mysql.

@coocood
Copy link
Member

coocood commented Oct 7, 2015

Misunderstood the issue, never mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The issue is confirmed as a bug.
Projects
None yet
Development

No branches or pull requests

2 participants