libdbi / libdbd-sqlite3 returns incorrect values for several data types
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GnuCash |
Fix Released
|
High
|
|||
libdbi (Debian) |
Fix Released
|
Unknown
|
|||
libdbi (Ubuntu) |
Fix Released
|
High
|
Clint Byrum | ||
Maverick |
Fix Released
|
High
|
Clint Byrum | ||
libdbi-drivers (Fedora) |
Fix Released
|
Medium
|
Bug Description
This is related to
- Gnome's bugzilla bug 611936 https:/
- https:/
It seems that the 8.3 version of libdbd-sqlite3 delivered with Ubuntu 10.10 i386 is complied with optimisation -ffast-math which causes all the numeric values in gnucash 2.3.15 (svn r19751) with SQLite backend to be retrieved as zero.
This problem only started after I upgraded from Ubuntu 10.04 to 10.10.
ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: libdbd-sqlite3 0.8.3-1-0ubuntu1
ProcVersionSign
Uname: Linux 2.6.35-22-generic i686
Architecture: i386
Date: Wed Nov 10 11:40:17 2010
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100427.1)
ProcEnviron:
LANG=en_AU.utf8
SHELL=/bin/bash
SourcePackage: libdbi-drivers
== SRU Information ==
=== IMPACT ===
This bug prevents any programs that use floating point numbers in a libdbi accessed database from functioning properly on i386. This includes GNUcash, a widely used piece of accounting software.
=== DEV FIX ===
This was fixed by turning off fast-math optimizations in libdbi.
=== PATCH ===
See linked merge proposal against maverick
=== TEST CASE: ===
This only affects the i386 architecture, and so much be run on an i386 machine/chroot/vm.
1. sudo apt-get install libdbd-sqlite3 -- note this should install libdbi0 as well
2. sudo apt-get build-dep libdbi-drivers
3. apt-get source libdbi-drivers
4. cd into libdbi-
5. run 'debian/rules build'
6. run 'make check'
7. Accept the default answer for libdbidriver directory of /usr/lib/dbd
8. type in 'sqlite3' to answer 'test which driver?'
9. Accept the default answer for database directory and database name
10. Tests will run with "SUCCESS", but the test for double floats will look like this:
the_double: in:1.7976931348
11. Upgrade libdbi0 to the fixed package, then rerun steps 6 - 10, the test should now look like this:
the_double: in:1.7976931348
=== REGRESSION POTENTIAL ===
This is a change only in compile flags, and so the only regression potential is that it will slow down all floating point operations in libdbi. Given that the alternative is the wrong answer, slower is actually better in this case.
Related branches
- Martin Pitt: Approve
- Colin Watson: Needs Fixing
-
Diff: 40 lines (+9/-2)3 files modifiedconfigure (+1/-1)
configure.in (+1/-1)
debian/changelog (+7/-0)
- Ubuntu Sponsors: Pending requested
-
Diff: 40 lines (+9/-2)3 files modifiedconfigure (+1/-1)
configure.in (+1/-1)
debian/changelog (+7/-0)
Changed in libdbi-drivers (Ubuntu): | |
status: | New → Confirmed |
tags: | added: regression-release |
Changed in libdbi-drivers (Ubuntu Maverick): | |
status: | New → Confirmed |
importance: | Undecided → High |
status: | Confirmed → Triaged |
Changed in libdbi (Debian): | |
status: | Unknown → New |
Changed in gnucash: | |
importance: | Unknown → High |
status: | Unknown → Confirmed |
Changed in gnucash: | |
status: | Confirmed → Fix Released |
description: | updated |
tags: |
added: verification-done removed: verification-needed |
Changed in libdbi (Debian): | |
status: | New → Fix Released |
tags: | added: testcase |
Changed in libdbi-drivers (Fedora): | |
importance: | Unknown → Medium |
status: | Unknown → Fix Released |
Description of problem:
Problems with GnuCash sqlite losing transactions data.
See GnuCash bug 611936 and gnucash-devel thread "Bug 611936 and the 2.4.0 release" for a discussion of the bug.
How reproducible:
Only occurs with Fedora build of libdbi.
Steps to Reproduce:
1. Install libdbi and libdbi-drivers using YUM
2. Obtain latest GnuCash svn, build and install.
3. Save to sqlite, close GnuCash, re-open saved data.
Actual results:
Loss of data as described in thread and GnuCash bug.
Additional info:
Removing rpm libraries and compiling from source using "make debug" cures the problem. Apparently this does not occur with other other library distributions.
Apologies for referring to GnuCash mailing list and bugzilla but all the info is already there.