install_blog fails when there are more than 8k of blogs in the database
|Reported by:||Kyrylo||Owned by:|
WP stated to fail on install_blog call once we reached 8k of blogs. Users are not able to create blogs via /wp-signup.php. Neither are superadmins able to create blogs via the wp-admin network interface.
The call stack is as follows:
> install_blog ( $blog_id, $blog_title ) // /wp-includes/ms-functions.php >> make_db_current_silent(); // /wp-includes/ms-functions.php >>> dbDelta($wp_queries); // /wp-admin/includes/upgrade.php >>>> $wpdb->get_col('SHOW TABLES;') // /wp-admin/includes/upgrade.php
The last one: $wpdb->get_col('SHOW TABLES;') - is a heave MySQL query and if your database is set to check the integrity of tables - PHP fails via time out.
It is desirable to have a simple and more quicker blog set up.
Currently we had to patch with the code that simply generates 9 blog tables and is not querying about 70,000 tables in the database.