Bug #39961 Using ADO Recordset and Update to set Decimal field causes wrong value
Submitted: 9 Oct 2008 19:29 Modified: 21 Nov 2008 15:11
Reporter: Meelis Lilbok Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S1 (Critical)
Version:5.1.5 OS:Any
Assigned to: Jess Balint CPU Architecture:Any

[9 Oct 2008 19:29] Meelis Lilbok
Description:
Seting ADO Recordset decimal field value to 44.56 cause wrong value 445600.0000

How to repeat:
Dim r As New Recordset
r.open "select * from kogud where id=1", "dsn=mysql", adOpenKeyset, adLockBatchOptimistic, adCmdText
r.fields("m1").Value = 44.56
r.Update

Result - m1= 445600.0000
[9 Oct 2008 19:31] Meelis Lilbok
SQL Trace Log

Attachment: sql.log (application/octet-stream, text), 134.70 KiB.

[9 Oct 2008 19:32] Meelis Lilbok
SHOW CREATE table

Attachment: create table.txt (text/plain), 1.79 KiB.

[9 Oct 2008 19:37] Meelis Lilbok
ODBC 5.1.1 Windows, MySQL Server 5.1(Windows) and 5.0.32-Debian_7etch6-log
[9 Oct 2008 21:42] Jess Balint
Verified using server side cursor. Client cursor not affected.
[9 Oct 2008 23:11] Jess Balint
Code pushed to:
https://code.launchpad.net/~myodbc-developers/myodbc/bug39961
[14 Nov 2008 17:21] Jess Balint
Pushed as rev 812, will be released in 5.1.6.
[21 Nov 2008 15:11] Tony Bedford
An entry was added to the 5.1.6 changelog:

Setting the ADO Recordset decimal field value to 44.56 resulted in an incorrect value of 445600.0000 being stored when the record set was updated with the Update method.
[30 Jan 2009 17:59] Jess Balint
Bug#42316 was marked as a duplicate of this.
[17 Jul 2009 11:45] Tonci Grgin
Bug#46162 was marked as duplicate of this report.