Skip to content

Commit 3477a2c

Browse files
committed
Bug 1941913 - Bug fixes for scripts/remove-non-public-data.pl that prepares a sanitized DB snapshot for researchers
1 parent 172618f commit 3477a2c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: scripts/remove-non-public-data.pl

+4-4
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ BEGIN
127127
],
128128
longdescs_reactions => [
129129
qw(
130-
id comment_id user_id
130+
id comment_id user_id reaction
131131
)
132132
],
133133
longdescs_tags => [
@@ -248,7 +248,7 @@ BEGIN
248248
else {
249249
print "dropping $table\n";
250250
drop_referencing($table);
251-
$dbh->do("DROP TABLE IF EXISTS $table");
251+
$dbh->do('DROP TABLE IF EXISTS ' . $dbh->quote_identifier($table));
252252
}
253253
}
254254

@@ -320,12 +320,12 @@ sub drop_referencing {
320320

321321
# drop the index
322322
my $rows
323-
= $dbh->selectall_arrayref("SHOW INDEX FROM $table WHERE Column_name = ?",
323+
= $dbh->selectall_arrayref('SHOW INDEX FROM ' . $dbh->quote_identifier($table) . ' WHERE Column_name = ?',
324324
{Slice => {}}, $column);
325325
foreach my $fk (@$rows) {
326326
print " dropping index $fk->{Table}.$fk->{Key_name}\n";
327327
$dbh->do("ALTER TABLE "
328-
. $dbh->quote_identifier($fk->{table})
328+
. $dbh->quote_identifier($fk->{Table})
329329
. " DROP INDEX $fk->{Key_name}");
330330
}
331331
}

0 commit comments

Comments
 (0)