From: yoonghm Date: Sun, 27 Sep 2015 03:02:10 +0000 (+0800) Subject: Remove exception and drop cloned tables in PostgresSQL too X-Git-Tag: 1.31.0-rc.0~2858^2 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=b620b4a2542a148166e6ca6da9da4027face1b95;p=lhc%2Fweb%2Fwiklou.git Remove exception and drop cloned tables in PostgresSQL too In PostgresSQL a) Temp tables are automatically deleted upon end of session b) Same temp table name hides existing table for current session It is not necessary to consider 'postgres' during dropping of table. I guess similar logic for Oracle but I could not verify. It seems that no one use Oracle for MediaWiki. Bug: T113445 Change-Id: I37b5483a6e9abe5cda0d4dfc103c287641f277a7 --- diff --git a/includes/db/CloneDatabase.php b/includes/db/CloneDatabase.php index 809b660a1b..6d1844494c 100644 --- a/includes/db/CloneDatabase.php +++ b/includes/db/CloneDatabase.php @@ -93,8 +93,10 @@ class CloneDatabase { self::changePrefix( $this->newTablePrefix ); $newTableName = $this->db->tableName( $tbl, 'raw' ); + // Postgres: Temp tables are automatically deleted upon end of session + // Same Temp table name hides existing table for current session if ( $this->dropCurrentTables - && !in_array( $this->db->getType(), [ 'postgres', 'oracle' ] ) + && !in_array( $this->db->getType(), [ 'oracle' ] ) ) { if ( $oldTableName === $newTableName ) { // Last ditch check to avoid data loss