r82856 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82855‎ | r82856 | r82857 >
Date:14:30, 26 February 2011
Author:btongminh
Status:resolved
Tags:
Comment:
Add TEMPORARY TABLE support to Sqlite
Modified paths:
  • /trunk/phase3/includes/db/DatabaseSqlite.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabaseSqlite.php
@@ -601,6 +601,12 @@
602602 }
603603 $sql = $obj->sql;
604604 $sql = preg_replace( '/\b' . preg_quote( $oldName ) . '\b/', $newName, $sql, 1 );
 605+ if ( $temporary && strpos( $oldName, 'searchindex' ) === false ) {
 606+ # For some reason TEMPORARY TABLE doesn't work with searchindex
 607+ # We need to explicitly look for searchindex rather than VIRTUAL
 608+ # because we don't want to clone the FTS subtables either
 609+ $sql = str_replace( 'CREATE TABLE', 'CREATE TEMPORARY TABLE', $sql );
 610+ }
605611 return $this->query( $sql, $fname );
606612 }
607613

Follow-up revisions

RevisionCommit summaryAuthorDate
r82860Follow-up r82856: instead of remembering magic table names, just analyse its ...maxsem16:45, 26 February 2011

Status & tagging log