Index: trunk/phase3/includes/db/DatabaseSqlite.php |
— | — | @@ -601,6 +601,12 @@ |
602 | 602 | } |
603 | 603 | $sql = $obj->sql; |
604 | 604 | $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 | + } |
605 | 611 | return $this->query( $sql, $fname ); |
606 | 612 | } |
607 | 613 | |