Index: trunk/phase3/maintenance/parserTests.inc |
— | — | @@ -656,7 +656,14 @@ |
657 | 657 | $this->changePrefix( $wgDBtype != 'oracle' ? 'parsertest_' : 'pt_' ); |
658 | 658 | $newTableName = $db->tableName( $tbl ); |
659 | 659 | |
660 | | - if ( $db->tableExists( $tbl ) && $wgDBtype != 'postgres' && $wgDBtype != 'oracle' ) { |
| 660 | + if ( $wgDBtype == 'mysql' ) { |
| 661 | + $db->query( "DROP TABLE IF EXISTS $newTableName" ); |
| 662 | + } elseif ( in_array( $wgDBtype, array( 'postgres', 'oracle' ) ) ) { |
| 663 | + /* DROPs wouldn't work due to Foreign Key Constraints (bug 14990, r58669) |
| 664 | + * Use "DROP TABLE IF EXISTS $newTableName CASCADE" for postgres? That |
| 665 | + * syntax would also work for mysql. |
| 666 | + */ |
| 667 | + } elseif ( $db->tableExists( $tbl ) ) { |
661 | 668 | $db->query( "DROP TABLE $newTableName" ); |
662 | 669 | } |
663 | 670 | # Create new table |