Skip Menu |
 

This queue is for tickets about the DBD-SQLite CPAN distribution.

Report information
The Basics
Id: 16187
Status: resolved
Priority: 0/
Queue: DBD-SQLite

People
Owner: Nobody in particular
Requestors: siracusa [...] mindspring.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.09
Fixed in: (no value)



Subject: $sth->rows doesn't work
Download (untitled) / with headers
text/plain 490b
#!/usr/bin/perl # $sth->rows does not work accorrding to teh DBI spec. # Here's a test program to reproduce this bug. use DBI; my $dbh = DBI->connect('dbi:SQLite:dbname=test.db'); $dbh->do('CREATE TABLE test (id int)'); $dbh->do('INSERT INTO test (id) VALUES (1)'); $dbh->do('INSERT INTO test (id) VALUES (2)'); my $sth = $dbh->prepare('DELETE FROM test'); $sth->execute; my $rows = $sth->rows; # $rows should be 2, but is 0 instead print "Rows affected: $rows\n"; $dbh->disconnect;
Subject: $sth->rows doesn't work
Download (untitled) / with headers
text/plain 489b
#!/usr/bin/perl # $sth->rows does not work accorrding to teh DBI spec. # Here's a test program to reproduce this bug. use DBI; my $dbh = DBI->connect('dbi:SQLite:dbname=test.db'); $dbh->do('CREATE TABLE test (id int)'); $dbh->do('INSERT INTO test (id) VALUES (1)'); $dbh->do('INSERT INTO test (id) VALUES (2)'); my $sth = $dbh->prepare('DELETE FROM test'); $sth->execute; my $rows = $sth->rows; # $rows should be 2, but is 0 instead print "Rows affected: $rows\n"; $dbh->disconnect;
Download (untitled) / with headers
text/plain 739b
[JSIRACUSA - Tue Nov 29 15:42:33 2005]: Show quoted text
> #!/usr/bin/perl > # $sth->rows does not work accorrding to teh DBI spec. > # Here's a test program to reproduce this bug. > > use DBI; > > my $dbh = DBI->connect('dbi:SQLite:dbname=test.db'); > > $dbh->do('CREATE TABLE test (id int)'); > $dbh->do('INSERT INTO test (id) VALUES (1)'); > $dbh->do('INSERT INTO test (id) VALUES (2)'); > > my $sth = $dbh->prepare('DELETE FROM test'); > $sth->execute; > > my $rows = $sth->rows; > > # $rows should be 2, but is 0 instead > print "Rows affected: $rows\n"; > > $dbh->disconnect;
I also noticed this bug and I must say it`s rather annoying.I wasted an hour trying to debug a script work that worked under MySQL DBD.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.