mwild1 / luadbi

Multi-backend SQL database library for Lua
MIT License
38 stars 14 forks source link

MySQL BIGINT handled wrong #29

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. CREATE table with a BIGINT column.
2. INSERT 1 into this column
3. SELECT * from table

What is the expected output? What do you see instead?
Expexted output is the same as input: 1
What I see is 4.9406564584125e-324.

What version of the product are you using? On what operating system?
luadbi-mysql 0.5.
MySQL server 5.1.71 and 5.5.38.
Operating systems Ubuntu, FreeBSD, OpenWrt.

Please provide any additional information below.
I think that luadbi-mysql is handling an int like a double.

If I try to read the same table with MySQL-cli, luasql-mysql or Python-MySQLdb 
everything is shown as expected.

The root cause is probably the same as for issue #26.

Best regards,

Peter Fassberg
Sweden

Original issue reported on code.google.com by pfassb...@gmail.com on 30 Jun 2014 at 9:47

GoogleCodeExporter commented 8 years ago
It seems you are right, I have fixed issue #26 and BIGINT seems to work ok now. 
Marking as fixed. Thanks!

Original comment by MWild1 on 30 Jul 2014 at 7:48