On 06/08/11 12:21 +0200, Albert Cervera i Areny wrote: > A Dissabte, 6 d'agost de 2011 09:59:14, Cédric Krier va escriure: > > Hi, > > > > Even with this patch we still have testing issue with MySQL backend. > > Indeed the problem is that MySQL has rounding issue with float and decimal. > > For float, I can accept because it is float, but on decimal test like this > > should not fail [1] > > I think this makes MySQL impossible to work in production environment. So I > > propose to drop the support of MySQL for the next version of Tryton. What > > do you think? > > I didn't try Tryton tests so I don't know exactly which of them is failing > but > did some tests manually and although MySQL's behaviour is pretty odd, I think > it works correctly, at least when the search using decimal fields is in SQL. > You can take a look at the log of the session I did (attached) to see when it > works and when it does not.
I don't doubt that there should be solution to the issue but this is really insane, the database should do the casting itself. There is also an other issue with MySQL which is it doesn't store exactly the float it receives. So you our test on digits [1] doesn't work. Moreover the behavior of MySQL doesn't seem to be constant over versions. Previous version was working correctly with comparison of decimal. So I think the question is do we want to bloat Tryton (and spend Time) to be able to support the strange behaviors of MySQL (per version)? Do we really need MySQL support? [1] http://hg.tryton.org/trytond/file/393318c8f257/trytond/model/modelstorage.py#l1112 -- Cédric Krier B2CK SPRL Rue de Rotterdam, 4 4000 Liège Belgium Tel: +32 472 54 46 59 Email/Jabber: [email protected] Website: http://www.b2ck.com/
pgpN6RhhrP3cu.pgp
Description: PGP signature
