r79138 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79137‎ | r79138 | r79139 >
Date:22:26, 28 December 2010
Author:overlordq
Status:ok (Comments)
Tags:
Comment:
Followup to r79094, PG handles temporary tables correctly so you dont need to do cleanup
Modified paths:
  • /trunk/phase3/includes/db/CloneDatabase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/CloneDatabase.php
@@ -94,7 +94,7 @@
9595 $this->changePrefix( $this->newTablePrefix );
9696 $newTableName = $this->db->tableName( $tbl );
9797
98 - if( $this->dropCurrentTables ) {
 98+ if( $this->dropCurrentTables && !in_array( $this->db->getType(), array( 'postgres') ) ) {
9999 $this->db->dropTable( $newTableName, __METHOD__ );
100100 }
101101

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r79094Followup r79093: Move DROP TABLE code to Database classes and properly rename...demon01:19, 28 December 2010

Comments

#Comment by 😂 (talk | contribs)   22:30, 28 December 2010

This should respect $useTemporaryTables: if we didn't use temporary tables in Postgres then we will need to drop them

I know the only callers right now use temp tables, but other (future) callers might not :)

#Comment by Nikerabbit (talk | contribs)   06:45, 29 December 2010

Interesting way of doing comparison. Anticipating more database types?

#Comment by OverlordQ (talk | contribs)   06:46, 29 December 2010

It originally had oracle in there as well, instead of breaking things more, I'll let somebody else figure out of oracle needs put back in there as well.

Status & tagging log