Bug#766501: libdbd-sqlite3-perl: 'order by random limit 1' not random

gregor herrmann gregoa at debian.org
Thu Oct 23 18:47:37 UTC 2014


On Thu, 23 Oct 2014 11:38:37 -0400, Pablo Virgo wrote:

> Package: libdbd-sqlite3-perl
> Version: 1.40-2

> I'm working on a small perl script that pulls random records from an sqlite3
> database.  Typically, as with the sqlite interface or cpan installations of
> this module, I can do this with a simple "ORDER BY RANDOM() LIMIT 1" clause.
> For some reason, when I use the .deb package version of the library, the result
> of that clause is always the first matching database record rather than a
> random one.

To be honest, I have no immediate idea; at least we don't have any
patches that do something like this.

But may I suggest that you try a newer version than 1.40-2 first?
Testing currently has 1.42-2, and unstable 1.44-1.

Also:
 
> Versions of packages libdbd-sqlite3-perl depends on:
> ii  libc6                         2.17-97
> ii  libdbi-perl [perl-dbdabi-94]  1.630-1
> ii  libsqlite3-0                  3.8.1-1
> ii  perl                          5.18.1-4
> ii  perl-base [perlapi-5.18.1]    5.18.1-4

libsqlite3-0 is also quite ancient; in DBD::SQLite's Changes file is
e.g. a note that sqlite 3.8.4.1 fixes ORDER BY bugs.

(testing has 3.8.6-1 and unstable 3.8.7-1)


Cheers,
gregor

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: David Bowie: Cat People (Single Version)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: Digital Signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20141023/8b9409e5/attachment.sig>


More information about the pkg-perl-maintainers mailing list