Make WordPress Core

Ticket #37046: 37046.patch

File 37046.patch, 732 bytes (added by javorszky, 8 years ago)

Patch disabling foreign key checks for dropping tables and re-enabling them after.

  • tests/phpunit/includes/install.php

     
    4040
    4141echo "Installing..." . PHP_EOL;
    4242
     43$wpdb->query( "SET foreign_key_checks = 0" );
    4344foreach ( $wpdb->tables() as $table => $prefixed_table ) {
    4445        $wpdb->query( "DROP TABLE IF EXISTS $prefixed_table" );
    4546}
     
    5152        if ( $multisite )
    5253                $wpdb->$table = $prefixed_table;
    5354}
     55$wpdb->query( "SET foreign_key_checks = 1" );
    5456
    5557// Prefill a permalink structure so that WP doesn't try to determine one itself.
    5658add_action( 'populate_options', '_set_default_permalink_structure_for_tests' );