sqlite3
of
clause.
result
I've tried to reproduce this problem on libdbd-sqlite3-perl 1.37-1, 1.40-2
and 1.44-1 without success.
Below is what was done to try and reproduce the problem:
arnestig@debian:~$ sqlite3 database.db "CREATE TABLE test (id INTEGER, data
VARCHAR)"
arnestig@debian:~$ sqlite3 database.db "INSERT INTO test VALUES( 1, 'item1'
)"
arnestig@debian:~$ sqlite3 database.db "INSERT INTO test VALUES( 2, 'item2'
)"
arnestig@debian:~$ sqlite3 database.db "INSERT INTO test VALUES( 3, 'item3'
)"
arnestig@debian:~$ perl -e 'use DBD::SQLite; my $dbh =
DBI->connect("DBI:SQLite:dbname=database.db"); my $stmt = "SELECT * FROM
test ORDER BY RANDOM() LIMIT 1"; my $sth = $dbh->prepare( $stmt ); my $rv =
$sth->execute() or die $DBI::errstr; while(my @row =
$sth->fetchrow_array()) { print "Result: $row[0],$row[1]\n"; }'
Result: 2,item2
arnestig@debian:~$ perl -e 'use DBD::SQLite; my $dbh =
DBI->connect("DBI:SQLite:dbname=database.db"); my $stmt = "SELECT * FROM
test ORDER BY RANDOM() LIMIT 1"; my $sth = $dbh->prepare( $stmt ); my $rv =
$sth->execute() or die $DBI::errstr; while(my @row =
$sth->fetchrow_array()) { print "Result: $row[0],$row[1]\n"; }'
Result: 3,item3
arnestig@debian:~$ perl -e 'use DBD::SQLite; my $dbh =
DBI->connect("DBI:SQLite:dbname=database.db"); my $stmt = "SELECT * FROM
test ORDER BY RANDOM() LIMIT 1"; my $sth = $dbh->prepare( $stmt ); my $rv =
$sth->execute() or die $DBI::errstr; while(my @row =
$sth->fetchrow_array()) { print "Result: $row[0],$row[1]\n"; }'
Result: 1,item1
arnestig@debian:~$ perl -e 'use DBD::SQLite; my $dbh =
DBI->connect("DBI:SQLite:dbname=database.db"); my $stmt = "SELECT * FROM
test ORDER BY RANDOM() LIMIT 1"; my $sth = $dbh->prepare( $stmt ); my $rv =
$sth->execute() or die $DBI::errstr; while(my @row =
$sth->fetchrow_array()) { print "Result: $row[0],$row[1]\n"; }'
Result: 2,item2
Please let us know if you have more information on how to reproduce the
problem.
- Tobias