r60710 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60709‎ | r60710 | r60711 >
Date:04:05, 6 January 2010
Author:tstarling
Status:deferred
Tags:
Comment:
Don't count unions of bracketed selects as being write queries
Modified paths:
  • /trunk/phase3/includes/db/Database.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/Database.php
@@ -422,7 +422,7 @@
423423 * Should return true if unsure.
424424 */
425425 function isWriteQuery( $sql ) {
426 - return !preg_match( '/^(?:SELECT|BEGIN|COMMIT|SET|SHOW)\b/i', $sql );
 426+ return !preg_match( '/^(?:SELECT|BEGIN|COMMIT|SET|SHOW|\(SELECT)\b/i', $sql );
427427 }
428428
429429 /**
@@ -2853,4 +2853,4 @@
28542854 public function toString() {
28552855 return $this->str;
28562856 }
2857 -}
\ No newline at end of file
 2857+}

Status & tagging log