division error in sqlite 3.5.9-5
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Python |
Invalid
|
Undecided
|
Unassigned | ||
sqlite3 (Debian) |
Fix Released
|
Unknown
|
|||
sqlite3 (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Intrepid |
Fix Released
|
Undecided
|
Martin Pitt |
Bug Description
Binary package hint: libsqlite3-0
Error occur in sqlite3 3.5.9-5 (command line interface) and python 2.5.2-10ubuntu1 (when connect do sqlite db).
When I try divide real number by real or integer sometimes I get null.
Example:
#sqlite3 test.db
SQLite version 3.5.9
Enter ".help" for instructions
sqlite> select 1.0/2;
0.5
sqlite> select 30/2;
15
sqlite> select 30.3/2;
15.15
sqlite> select 30.3/22; ---<------- ERROR
sqlite> select 30.3/2;
15.15
sqlite> select 30.3/3; ---<------- ERROR
sqlite> select 30.3/2;
15.15
sqlite> select 30.3/4;
7.575
sqlite> select 30.3/5; ---<------- ERROR
sqlite> select 30.3/6; ---<------- ERROR
sqlite> select 30.3/7; ---<------- ERROR
sqlite> select 30.3/8;
3.7875
sqlite> select 30.3/9; ---<------- ERROR
sqlite> select 30.3/10; ---<------- ERROR
sqlite> select 30.3/11; ---<------- ERROR
sqlite> select 30.3/12; ---<------- ERROR
sqlite> select 30.3/13; ---<------- ERROR
sqlite> select 30.3/14; ---<------- ERROR
sqlite> select 30.3/14.3; ---<------- ERROR
sqlite> select 30.3/15; ---<------- ERROR
sqlite> select 30.3/16;
1.89375
sqlite> select 30.3/16.0;
1.89375
sqlite> select 30.3/16.5; ---<------- ERROR
sqlite>
Regards
Sep
executive summary prepared by Rolf Leggewie as per https:/
2.1 impact: sqlite3 returns incorrect results, all packages using an sqlite3 backend are possibly affected by them. I know that at least anki (ichi2.net/anki/) is completely unusable in Intrepid because of this bug.
2.2 fix in .dev branch: dunno, but users report that jaunty packages (which are based off the same orig.tar.gz, I think) are not affected. somebody please comment.
2.3 minimal patch: http://
2.4 test case: see original report above
2.5 regression potential: dunno, sorry. somebody please comment here.
Related branches
Changed in sqlite3: | |
status: | New → In Progress |
description: | updated |
Changed in sqlite3 (Debian): | |
status: | Unknown → Fix Released |
Solution:
Replace line in debian/rules:
DEB_OPT_FLAG := -O2 -fno-strict- aliasing -DSQLITE_ ENABLE_ COLUMN_ METADATA -DSQLITE_ ENABLE_ FTS3
to:
DEB_OPT_FLAG := -O2 -fno-strict- aliasing -DSQLITE_ ENABLE_ COLUMN_ METADATA -DSQLITE_ ENABLE_ FTS3 -fno-inline- small-functions
[from: http://<email address hidden> /msg35393. html]
Regards
sep