r68625 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68624‎ | r68625 | r68626 >
Date:12:35, 27 June 2010
Author:maxsem
Status:ok
Tags:
Comment:
Follow-up to r68604: recognise ATTACH DATABASE as a read-only statement
Modified paths:
  • /trunk/phase3/includes/db/DatabaseSqlite.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabaseSqlite.php
@@ -164,6 +164,13 @@
165165 }
166166
167167 /**
 168+ * @see DatabaseBase::isWriteQuery()
 169+ */
 170+ function isWriteQuery( $sql ) {
 171+ return parent::isWriteQuery( $sql ) && !preg_match( '/^ATTACH\b/i', $sql );
 172+ }
 173+
 174+ /**
168175 * SQLite doesn't allow buffered results or data seeking etc, so we'll use fetchAll as the result
169176 */
170177 function doQuery( $sql ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r68604Support for $wgSharedDB in SQlitemaxsem12:10, 26 June 2010

Status & tagging log