From 666ee2902af3823e25379355f5df3b1ab20a11a4 Mon Sep 17 00:00:00 2001 From: Platonides Date: Fri, 31 Dec 2010 14:08:10 +0000 Subject: [PATCH] Follow up r79314. The table to drop is the NEW one, the one that is going to be recreated. Sure, the prefix was changed, which means that we need just the table base. The r79314 behavior was to perform the following: DROP /* CloneDatabase::cloneTableStructure */ TABLE IF EXISTS `archive` CREATE /* DatabaseMysql::duplicateTableStructure */ TEMPORARY TABLE `unittest_archive` (LIKE `archive`) Luckily, it failed there as it didn't find the table it had just dropped. --- includes/db/CloneDatabase.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/db/CloneDatabase.php b/includes/db/CloneDatabase.php index 4d22452cb4..9e1f05c5c0 100644 --- a/includes/db/CloneDatabase.php +++ b/includes/db/CloneDatabase.php @@ -96,9 +96,9 @@ class CloneDatabase { $this->changePrefix( $this->newTablePrefix ); $newTableName = $this->db->tableName( $tbl ); - - if( $this->dropCurrentTables && !in_array( $this->db->getType(), array( 'postgres') ) ) { - $this->db->dropTable( $oldTableName, __METHOD__ ); + + if( $this->dropCurrentTables && !in_array( $this->db->getType(), array( 'postgres' ) ) ) { + $this->db->dropTable( $tbl, __METHOD__ ); //Dropping the oldTable because the prefix was changed } -- 2.20.1