the page selector when they have only one page
* (bug 21559) "logempty" message is now wrapped in a div with class
"mw-warning-logempty" when used in log extract
+* (bug 20549) Parser tests were broken on SQLite backend
== API changes in 1.16 ==
}
function duplicateTableStructure( $oldName, $newName, $temporary = false, $fname = 'DatabaseSqlite::duplicateTableStructure' ) {
- return $this->query( 'CREATE ' . ( $temporary ? 'TEMPORARY ' : '' ) . " TABLE $newName AS SELECT * FROM $oldName LIMIT 0", $fname );
+ $res = $this->query( "SELECT sql FROM sqlite_master WHERE tbl_name='$oldName' AND type='table'", $fname );
+ $sql = $this->fetchObject( $res )->sql;
+ $sql = preg_replace( '/\b' . preg_quote( $oldName ) . '\b/', $newName, $sql, 1 );
+ return $this->query( $sql, $fname );
}
} // end DatabaseSqlite class