I ran into an issue where it seems that mysql 5.1.63 (on a debian) stores 2/3 as
0.666666666666667
and on mysql 5.5.21 (on a mac) as
0.6666666666666667
as I happen to use Ebean to manage my database interactions, I need the mysql DOUBLE representation to correspond to the java double
representation. (Otherwise Ebean will throw an OptimisticLockException
as the java double
representation can't be found in the mysql table)
As Ebean is generating the create table
syntax for me and generates DOUBLE fields (no DECIMALs unfortunately), I was curious whether there is some setting to tell mysql which precision to use when a DOUBLE is defined without an explicit precision setting.
If you have other hints as to how resolve this issue, they are more than welcome as well.
Cheers, Daniel