From 637cf8a3371c5655d540fbc81f90c2fc7d3828f2 Mon Sep 17 00:00:00 2001 From: Platonides Date: Wed, 11 Aug 2010 16:50:31 +0000 Subject: [PATCH] Move things along the DROP TABLE. --- maintenance/parserTests.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/maintenance/parserTests.inc b/maintenance/parserTests.inc index 6a5f657e96..54c42fee1f 100644 --- a/maintenance/parserTests.inc +++ b/maintenance/parserTests.inc @@ -656,7 +656,14 @@ class ParserTest { $this->changePrefix( $wgDBtype != 'oracle' ? 'parsertest_' : 'pt_' ); $newTableName = $db->tableName( $tbl ); - if ( $db->tableExists( $tbl ) && $wgDBtype != 'postgres' && $wgDBtype != 'oracle' ) { + if ( $wgDBtype == 'mysql' ) { + $db->query( "DROP TABLE IF EXISTS $newTableName" ); + } elseif ( in_array( $wgDBtype, array( 'postgres', 'oracle' ) ) ) { + /* DROPs wouldn't work due to Foreign Key Constraints (bug 14990, r58669) + * Use "DROP TABLE IF EXISTS $newTableName CASCADE" for postgres? That + * syntax would also work for mysql. + */ + } elseif ( $db->tableExists( $tbl ) ) { $db->query( "DROP TABLE $newTableName" ); } # Create new table -- 2.20.1