Patch by Myk Melez <myk@mozilla.org>
r=bbaetz,justdave
$sql .= ") & $::usergroupset)\n";
+# Lock tables before inserting records for the new bug into the database
+# if we are using a shadow database to prevent shadow database corruption
+# when two bugs get created at the same time.
+SendSQL("LOCK TABLES bugs WRITE, longdescs WRITE, cc WRITE") if Param("shadowdb");
+
# Add the bug report to the DB.
SendSQL($sql);
}
}
+SendSQL("UNLOCK TABLES") if Param("shadowdb");
+
# Assemble the -force* strings so this counts as "Added to this capacity"
my @ARGLIST = ();
if (@cc) {