Skip to content

Commit 336977d

Browse files
committed
Revert "Fix more tests with $sth handles"
This reverts commit bd1d2f6. According to DBI documentation $sth->finish() should not be called after fetching all data.
1 parent 1785c1e commit 336977d

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

t/25lockunlock.t

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ my ($row, $errstr);
4040
$errstr= '';
4141
$row = $sth->fetchrow_arrayref;
4242
$errstr= $sth->errstr;
43-
$sth->finish;
4443
ok !defined($row), "Fetch should have failed";
4544
ok !defined($errstr), "Fetch should have failed";
4645

t/35prepare.t

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use vars qw($test_dsn $test_user $test_password);
1313
$dbh = DbiTestConnect($test_dsn, $test_user, $test_password,
1414
{ RaiseError => 1, PrintError => 0 });
1515

16-
plan tests => 50;
16+
plan tests => 49;
1717

1818
ok(defined $dbh, "Connected to database");
1919

@@ -94,7 +94,6 @@ ok($sth= $dbh->prepare("SELECT 1"), "Prepare - Testing bug #20153");
9494
ok($sth->execute(), "Execute - Testing bug #20153");
9595
ok($sth->fetchrow_arrayref(), "Fetch - Testing bug #20153");
9696
ok(!($sth->fetchrow_arrayref()),"Not Fetch - Testing bug #20153");
97-
ok($sth->finish);
9897

9998
# Install a handler so that a warning about unfreed resources gets caught
10099
$SIG{__WARN__} = sub { die @_ };

t/40numrows.t

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ require 'lib.pl';
1010
my ($dbh, $sth, $aref);
1111
$dbh = DbiTestConnect($test_dsn, $test_user, $test_password,
1212
{ RaiseError => 1, PrintError => 0, AutoCommit => 0 });
13-
plan tests => 2*33 + 1;
13+
plan tests => 2*32 + 1;
1414

1515
for my $mariadb_server_prepare (0, 1) {
1616

@@ -85,8 +85,6 @@ is scalar @$aref, 3, 'Verified rows should be 3';
8585

8686
is $sth->rows, 3, 'rows still should be 3';
8787

88-
ok $sth->finish;
89-
9088
ok $dbh->do("DROP TEMPORARY TABLE dbd_mysql_t40numrows"), "drop table dbd_mysql_t40numrows";
9189

9290
}

0 commit comments

Comments
 (0)