From 0a3ec9e2652da700749dc57e5f2ab26a4858784c Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 25 Jun 2003 08:27:16 +0000 Subject: [PATCH] switch INSERT to REPLACE when adding math equations to help work around race condition --- includes/OutputPage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.20.1