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

precision problems when handling decimal calculation #16426

Closed
qw4990 opened this issue Apr 15, 2020 · 0 comments · Fixed by #15927
Closed

precision problems when handling decimal calculation #16426

qw4990 opened this issue Apr 15, 2020 · 0 comments · Fixed by #15927
Assignees
Labels

Comments

@qw4990
Copy link
Contributor

qw4990 commented Apr 15, 2020

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. What did you do?

mysql root@127.0.0.1:test> create table t (a int);                                                                                        
mysql root@127.0.0.1:test> insert into t values (42);                                                                                     
mysql root@127.0.0.1:test> select * from t where a / 1000000;                                                                             

2. What did you expect to see?

mysql root@127.0.0.1:test> create table t (a int);                                                                                        
Query OK, 0 rows affected
Time: 0.596s
mysql root@127.0.0.1:test> insert into t values (42);                                                                                     
Query OK, 1 row affected
Time: 0.211s
mysql root@127.0.0.1:test> select * from t where a / 1000000;                                                                             
+----+
| a  |
+----+
| 42 |
+----+
1 row in set
Time: 0.030s

3. What did you see instead?

mysql root@127.0.0.1:test> create table t (a int);                                          
Query OK, 0 rows affected
Time: 0.025s
mysql root@127.0.0.1:test> insert into t values (42);                                       
Query OK, 1 row affected
Time: 0.005s
mysql root@127.0.0.1:test> select * from t where a / 1000000;                               
+---+
| a |
+---+
0 rows in set

4. What version of TiDB are you using? (tidb-server -V or run select tidb_version(); on TiDB)

The latest master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants