Add filters for install/upgrade queries, so that unit tests installer can force creating InnoDB tables, so that we can use transactions to revert the database to its initial state after each test. See #17749
git-svn-id: http://svn.automattic.com/wordpress/trunk@18531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c8721d2600
commit
4870176ad0
|
@ -1382,6 +1382,7 @@ function dbDelta($queries, $execute = true) {
|
|||
$queries = explode( ';', $queries );
|
||||
if ('' == $queries[count($queries) - 1]) array_pop($queries);
|
||||
}
|
||||
$queries = apply_filters( 'dbdelta_queries', $queries );
|
||||
|
||||
$cqueries = array(); // Creation Queries
|
||||
$iqueries = array(); // Insertion Queries
|
||||
|
@ -1402,6 +1403,8 @@ function dbDelta($queries, $execute = true) {
|
|||
// Unrecognized query type
|
||||
}
|
||||
}
|
||||
$cqueries = apply_filters( 'dbdelta_create_queries', $cqueries );
|
||||
$iqueries = apply_filters( 'dbdelta_insert_queries', $iqueries );
|
||||
|
||||
// Check to see which tables and fields exist
|
||||
if ($tables = $wpdb->get_col('SHOW TABLES;')) {
|
||||
|
|
Loading…
Reference in New Issue