Closed zzzeek closed 1 year ago
occurs as of 0.2.7rc6 and possibly earlier, is not in 0.2.5
import asyncmy import asyncio async def main(): conn = await asyncmy.connect( user="scott", password="tiger", db="test", host="localhost" ) cursor = conn.cursor() await cursor.execute("""DROP TABLE IF EXISTS t""") await cursor.execute( """ CREATE TABLE t ( scale_value DOUBLE(15, 12) )""" ) dec_value = 45.7683 await cursor.execute( "INSERT INTO t (scale_value) VALUES (%s)", [dec_value] ) await cursor.execute("SELECT scale_value FROM t") row = await cursor.fetchone() assert row[0] == dec_value, row[0] asyncio.run(main())
test fails with
AssertionError: 45.768299102783
no other MySQL or database driver loses precision on only four significant digits. 0.2.5 did not have this problem and was on par with other drivers.
Any updates on this?
fixed
occurs as of 0.2.7rc6 and possibly earlier, is not in 0.2.5
test fails with
no other MySQL or database driver loses precision on only four significant digits. 0.2.5 did not have this problem and was on par with other drivers.