Index: trunk/phase3/includes/db/DatabaseSqlite.php |
— | — | @@ -521,7 +521,10 @@ |
522 | 522 | } |
523 | 523 | |
524 | 524 | function duplicateTableStructure( $oldName, $newName, $temporary = false, $fname = 'DatabaseSqlite::duplicateTableStructure' ) { |
525 | | - return $this->query( 'CREATE ' . ( $temporary ? 'TEMPORARY ' : '' ) . " TABLE $newName AS SELECT * FROM $oldName LIMIT 0", $fname ); |
| 525 | + $res = $this->query( "SELECT sql FROM sqlite_master WHERE tbl_name='$oldName' AND type='table'", $fname ); |
| 526 | + $sql = $this->fetchObject( $res )->sql; |
| 527 | + $sql = preg_replace( '/\b' . preg_quote( $oldName ) . '\b/', $newName, $sql, 1 ); |
| 528 | + return $this->query( $sql, $fname ); |
526 | 529 | } |
527 | 530 | |
528 | 531 | } // end DatabaseSqlite class |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -668,6 +668,7 @@ |
669 | 669 | the page selector when they have only one page |
670 | 670 | * (bug 21559) "logempty" message is now wrapped in a div with class |
671 | 671 | "mw-warning-logempty" when used in log extract |
| 672 | +* (bug 20549) Parser tests were broken on SQLite backend |
672 | 673 | |
673 | 674 | == API changes in 1.16 == |
674 | 675 | |