I have a very strange case where mariaDB (mysql) inserts (or updates) a different decimal value. In the example below I want to insert the value '387507.65' but in mysql it is registered as '387507.66'. If I use a different amount, say without the '3', then it is registered fine.
As an example:
CREATE TABLE IF NOT EXISTS tbltest (
ID int(11) NOT NULL AUTO_INCREMENT,
admin_id int(11) NOT NULL DEFAULT '0',
opening_balance float(11,2) NOT NULL DEFAULT '0.00',
PRIMARY KEY (ID)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
INSERT INTO tbltest (ID, admin_id, opening_balance) VALUES (NULL,'1','387507.65');
I'm tested with 5.5.52-MariaDB (Linux) 10.1.26-MariaDB (Linux)
What must I do to be able to insert the correct value of 387507.65 ?