From: Brion Vibber Date: Wed, 25 Jun 2003 08:27:16 +0000 (+0000) Subject: switch INSERT to REPLACE when adding math equations to help work around race condition X-Git-Tag: 1.1.0~478 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=0a3ec9e2652da700749dc57e5f2ab26a4858784c;p=lhc%2Fweb%2Fwiklou.git switch INSERT to REPLACE when adding math equations to help work around race condition --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 283dcdf40a..d09dcdda98 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -93,7 +93,7 @@ function renderMath( $tex ) $outmd5_sql = mysql_escape_string(pack("H32", $outmd5)); - $sql = "INSERT INTO math VALUES ('".$md5_sql."', '".$outmd5_sql."', ".$conservativeness.", ".$sql_html.", ".$sql_mathml.")"; + $sql = "REPLACE INTO math VALUES ('".$md5_sql."', '".$outmd5_sql."', ".$conservativeness.", ".$sql_html.", ".$sql_mathml.")"; $res = wfQuery( $sql, $fname ); # we don't really care if it fails