mysql> create table t (id integer primary key, f1 float, f2 float(10,4));
mysql> insert into t (id, f1, f2) values (1, 0.0001, 0.0001);
mysql> select f1, f1=0.0001, f1=0.0001e0, f2, f2=0.0001, f2=0.0001e0 from t;
+--------+-----------+-------------+--------+-----------+-------------+
| f1 | f1=0.0001 | f1=0.0001e0 | f2 | f2=0.0001 | f2=0.0001e0 |
+--------+-----------+-------------+--------+-----------+-------------+
| 0.0001 | 0 | 0 | 0.0001 | 1 | 0 |
+--------+-----------+-------------+--------+-----------+-------------+
1 row in set (0.00 sec)
Last active
February 26, 2024 13:25
-
-
Save methane/d383ebdb597e361b49dd0db4c36b2a93 to your computer and use it in GitHub Desktop.
mariadb float type
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PyMySQL/mysqlclient#705 より。
MariaDB 10.10も10.5も同じ。
文字列として比較されているのかdecimalとして比較されているのかよくわからない。
暗黙の型変換をデバッグする機能はないものか。