Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2.8
-
None
-
Centos 7.3
Description
View return bad result "31457280.0000", but correct value is "30":
MariaDB [test]> CREATE TABLE `t1` (bps INT);
|
Query OK, 0 rows affected (0.01 sec) |
|
MariaDB [test]> INSERT INTO t1 (bps) VALUES(31457280); |
Query OK, 1 row affected (0.00 sec) |
|
MariaDB [test]> SELECT (t1.bps / (1024 * 1024)) AS Mbit FROM t1; |
+---------+
|
| Mbit |
|
+---------+
|
| 30.0000 | |
+---------+
|
1 row in set (0.00 sec) |
|
MariaDB [test]> CREATE VIEW v1 AS SELECT (t1.bps / (1024 * 1024)) AS Mbit FROM t1; |
Query OK, 0 rows affected (0.00 sec) |
|
MariaDB [test]> SELECT * FROM v1;
|
+---------------+
|
| Mbit |
|
+---------------+
|
| 31457280.0000 | |
+---------------+
|
1 row in set (0.00 sec) |