mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 18:55:30 +00:00
Fix a few more missing $sth->finish warnings in DBTools
This commit is contained in:
parent
9041c05ece
commit
da1394cc30
@ -178,6 +178,7 @@ sub TableExists {
|
|||||||
$exists = 1;
|
$exists = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$sth->finish;
|
||||||
return $exists;
|
return $exists;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -189,6 +190,7 @@ sub GetFieldDef {
|
|||||||
|
|
||||||
while (my $ref = $sth->fetchrow_arrayref) {
|
while (my $ref = $sth->fetchrow_arrayref) {
|
||||||
next if $$ref[0] ne $field;
|
next if $$ref[0] ne $field;
|
||||||
|
$sth->finish;
|
||||||
return $ref;
|
return $ref;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -201,6 +203,7 @@ sub GetIndexDef {
|
|||||||
|
|
||||||
while (my $ref = $sth->fetchrow_arrayref) {
|
while (my $ref = $sth->fetchrow_arrayref) {
|
||||||
next if $$ref[2] ne $field;
|
next if $$ref[2] ne $field;
|
||||||
|
$sth->finish;
|
||||||
return $ref;
|
return $ref;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -213,11 +216,14 @@ sub CountIndexes {
|
|||||||
$sth->execute;
|
$sth->execute;
|
||||||
|
|
||||||
if ( $sth->rows == -1 ) {
|
if ( $sth->rows == -1 ) {
|
||||||
|
$sth->finish;
|
||||||
die ("Unexpected response while counting indexes in $table:" .
|
die ("Unexpected response while counting indexes in $table:" .
|
||||||
" \$sth->rows == -1");
|
" \$sth->rows == -1");
|
||||||
}
|
}
|
||||||
|
|
||||||
return ($sth->rows);
|
my $rows = $sth->rows;
|
||||||
|
$sth->finish;
|
||||||
|
return ($rows);
|
||||||
}
|
}
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
@ -263,6 +269,7 @@ sub DropIndexes {
|
|||||||
$SEEN{$$ref[2]} = 1;
|
$SEEN{$$ref[2]} = 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
$sth->finish;
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
Loading…
Reference in New Issue
Block a user