From: Tim Starling Date: Wed, 6 Jan 2010 04:05:49 +0000 (+0000) Subject: Don't count unions of bracketed selects as being write queries X-Git-Tag: 1.31.0-rc.0~38398 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22calendrier%22%2C%22type=semaine%22%29%20.%20%22?a=commitdiff_plain;h=ddd5acf9004b8094e5c6110fc940eb7bdc4c69ac;p=lhc%2Fweb%2Fwiklou.git Don't count unions of bracketed selects as being write queries --- diff --git a/includes/db/Database.php b/includes/db/Database.php index 36f34a3035..b1b0441b7d 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -422,7 +422,7 @@ abstract class DatabaseBase { * Should return true if unsure. */ function isWriteQuery( $sql ) { - return !preg_match( '/^(?:SELECT|BEGIN|COMMIT|SET|SHOW)\b/i', $sql ); + return !preg_match( '/^(?:SELECT|BEGIN|COMMIT|SET|SHOW|\(SELECT)\b/i', $sql ); } /** @@ -2853,4 +2853,4 @@ class LikeMatch { public function toString() { return $this->str; } -} \ No newline at end of file +}