Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 237222 - dev-db/sqlite-3.5.9 division bug
Summary: dev-db/sqlite-3.5.9 division bug
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Petteri Räty (RETIRED)
URL: http://bugs.debian.org/cgi-bin/bugrep...
Whiteboard:
Keywords:
Depends on: 234414 254864
Blocks: 237754
  Show dependency tree
 
Reported: 2008-09-09 19:56 UTC by coran.fisher@gmail.com
Modified: 2009-02-01 11:12 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description coran.fisher@gmail.com 2008-09-09 19:56:09 UTC
sqlite 3.5.9 breaks some programs (like anki) due to a division bug.
3.5.6 does not have this bug nor does 2.x
See Debian bug http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=488864
I see the same behavior.


Reproducible: Always

Steps to Reproduce:
Copied from debian bug I can always reproduce this.  3.5.6 works fine.

sqlite3 seems to have changed how division is calculated.  Please
compare the results following sqlite3 select against those from sqlite
(version 2) that follow. I expected the sqlite answers rather than
those that sqlite3 is giving.

>sqlite3
SQLite version 3.5.9
Enter ".help" for instructions
sqlite> select 1.0/2.0;
0.5
sqlite> select 1.0/3.0;

sqlite> select 1.0/4.0;
0.25
sqlite> select 1.0/5.0;

sqlite> select 1.0/6.0;

sqlite> select 1.0/7.0;

sqlite> select 1.0/8.0;
0.125
sqlite> select 1.0/9.0;

sqlite> select 1.0/10.0;

sqlite>

Here are the version 2 results.

>sqlite
SQLite version 2.8.17
Enter ".help" for instructions
sqlite> select 1.0/2.0;
0.5
sqlite> select 1.0/3.0;
0.333333333333333
sqlite> select 1.0/4.0;
0.25
sqlite> select 1.0/5.0;
0.2
sqlite> select 1.0/6.0;
0.166666666666667
sqlite> select 1.0/7.0;
0.142857142857143
sqlite> select 1.0/8.0;
0.125
sqlite> select 1.0/9.10;
0.10989010989011
sqlite> select 1.0/10.0;
0.1
sqlite>
Actual Results:  
blank answers on some division

Expected Results:  
same division answers in 3.5.9 as 3.5.6 or 2.x sqlite
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2008-09-09 20:40:19 UTC
Does this bug still exist in dev-db/sqlite-3.6.2?
Comment 2 coran.fisher@gmail.com 2008-09-09 21:00:56 UTC
Just tried it, and it worked fine.  Here's my output:
 

$ sqlite3
SQLite version 3.6.2
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> select 1.0/2.0;
0.5
sqlite> select 1.0/3.0;
0.333333333333333
sqlite> select 1.0/4.0;
0.25
sqlite> select 1.0/5.0;
0.2
sqlite> select 1.0/6.0;
0.166666666666667
sqlite> select 1.0/7.0;
0.142857142857143
sqlite> select 1.0/8.0;
0.125
sqlite> select 1.0/9.0;
0.111111111111111
sqlite> select 1.0/10.0;
0.1




Comment 3 Wormo (RETIRED) gentoo-dev 2008-09-10 00:04:13 UTC
Please attach your 'emerge --info' (especially important here since the debian bug report indicated it could be sensitive to build environment!) 
Comment 4 coran.fisher@gmail.com 2008-09-10 00:12:01 UTC
OK I attached it below.  For me it was only 3.5.9 that exhibits this.  I can upgrade or downgrade and division is just fine.  So basically anything but 3.5.9 is great just 3.5.9 breaks things and can't do division.

Portage 2.1.5.6 (default/linux/x86/2008.0/desktop, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.26-gentoo i686)
=================================================================
System uname: 2.6.26-gentoo i686 AMD Athlon(tm) 64 X2 Dual Core Processor 5200+
Timestamp of tree: Tue, 09 Sep 2008 16:33:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.12
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.62-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.26
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon64 -O3 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/bind /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=athlon64 -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="ja_JP.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="ja"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS="lzma"
PORTAGE_COMPRESS_FLAGS="-9"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/sunrise /usr/local/portage/layman/voip /usr/local/portage/layman/secondlife /usr/local/portage /usr/local/portage/layman/sunrise /usr/local/portage/layman/voip /usr/local/portage/layman/secondlife"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="16bit 3dnow 3dnowext 7zip X X509 Xaw3d a52 aac accessibility ace acl acpi aim alsa amarok amazon amr amrnb amrwb anthy apache2 arts artswrappersuid asf async authdaemond avahi bash-completion berkdb bidi big-iron big-tables bittorrent bluetooth branding bzip2 cairo calendar canna catalogs cddb cdparanoia cdr cgi cjk clamav clamd cli clucene contentcache cracklib crypt cscope css ctype curl curlwrappers dbus deprecated dga diffheaders directfb discouraged divx djvu dnd dovecot-sasl dri dts dvd dvdnav dvdr dvdread eb eds emboss emerald enca encode esd exif expat extensions extrafilters fam fame fbcon ffmpeg finger firefox flac fortran ftp garmin gcj gd geoip ggi gif gimp glib glitz glsa glut gmedia gmp gnutella gocr gopher gpgme gphoto2 gpm gps graph graphviz gs gstreamer gtk guile gzip gzip-el hal iconv icq id3 id3tag idea idn ilbc imagemagick imap imlib immqt-bc inotify ipv6 isdnlog jabber jack jasper java java5 javascript jbig jce jingle jp jpeg jpeg2k kakasi kcal kde kdepim kerberos lame lcms ldap libnotify libsamplerate libwww lilo live logrotate logwatch loop-aes lua lzo mad maildir matroska max-idx-128 md5sum mdnsresponder-compat mhash midi migemo mikmod mjpeg mmx mmxext mng modplug mp3 mp4 mp4live mpeg mpeg2 mplayer mpm-worker msn mtp mudflap mule musepack musicbrainz mysql ncurses netmeeting netpbm network networking nforce2 nls nodrm nowin nowlistening nptl nptlonly nsplugin nspr ntp nuv nvidia objc objc++ objc-gc ocr ocrad offensive ofx ogg ole openexr openft opengl openmp pam pango parse-clocks pcre pdf perl php png pnm pop pop3d ppds pppd prime procmail psyco python qdbm qt3 qt3support qt4 quicktime quotes radio rar raw rc5 readline real realmedia reflection replytolist restrict-javascript rle ruby samba sasl scanner scim sdl seamonkey sendmail session smime smp sndfile sound soundex speex spell spf spl sqlite sqlite3 srt sse sse2 ssl startup-notification subtitles subversion suexec svg sysfs syslog taglib tagwriting tcl tcltk tcpd tellico tesseract theora thesaurus threads threadsafe thunderbird tiff tk tokenizer transcode translator truetype ucs4 unicode unzip usb utempter uudeview uuencode v4l v4l2 vcd videos vidix vim-pager vim-with-x virus-scan visualization vorbis vorbis-psy wav wavpack webpresence wideband widescreen win32codecs wma wmf wmp wordperfect x264 x86 xanim xattr xcb xchatdccserver xcomposite xface xforms xfs xft xim xine xinerama xml xorg xscreensaver xtended xulrunner xv xvid xvmc yahoo yaz zeroconf zip zlib zrtp" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="ja" USERLAND="GNU" VIDEO_CARDS="nvidia fbdev vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_RSYNC_EXTRA_OPTS
Comment 5 Wormo (RETIRED) gentoo-dev 2008-09-10 01:28:35 UTC
Ok, thanks for the report. Version bump should fix this then.
Comment 6 coran.fisher@gmail.com 2008-09-10 01:43:28 UTC
Thank you.  I feel that is the best solution for I've been unable to make any other version output null for division tests.  I am currently operating on sqlite 3.6.2 which I have so far always received proper output for division as above. 
Comment 7 Petteri Räty (RETIRED) gentoo-dev 2008-09-15 16:51:15 UTC
(In reply to comment #6)
> Thank you.  I feel that is the best solution for I've been unable to make any
> other version output null for division tests.  I am currently operating on
> sqlite 3.6.2 which I have so far always received proper output for division as
> above. 
> 

I committed 3.6.2. As it can break stuff (at least dspam breaks) before it can go stable I need to generate lists of all stable reverse deps so that arches can test building them.
Comment 8 Petteri Räty (RETIRED) gentoo-dev 2009-02-01 11:12:36 UTC
Ok. We now have a fixed version stable.