Hi folks,
  I package libdbi for Red Hat.  While investigating a user's bug report
I found out that 0.8.3's dbi_result.c was fetching the wrong union
member when returning result values that are wider than the type
returned by the database.  Looking into your CVS, I see that this was
fixed back in May 2009 ... for all cases but one.  I believe you still
need the attached patch.

                        regards, tom lane


*** libdbi-0.8.3/src/dbi_result.c~      Fri Aug  5 13:53:18 2011
--- libdbi-0.8.3/src/dbi_result.c       Fri Aug  5 13:54:42 2011
***************
*** 1133,1138 ****
--- 1133,1139 ----
  
    switch (RESULT->field_attribs[fieldidx] & DBI_DECIMAL_SIZEMASK) {
    case DBI_DECIMAL_SIZE4:
+     return RESULT->rows[RESULT->currowidx]->field_values[fieldidx].d_float;
    case DBI_DECIMAL_SIZE8:
      return RESULT->rows[RESULT->currowidx]->field_values[fieldidx].d_double;
    default:

------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
libdbi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libdbi-devel

Reply via email to