WP upgrade is failing after update to WP 6.4.2 due to HyperDB

Open
#142 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
php, wordpress
Domain
database

Research direction

Reproduce a WordPress 6.4.2 core, plugin, theme, or translation update with HyperDB enabled, comparing behavior with db-config.php unchanged and HyperDB removed. Start at wordpress/wp-includes/class-wpdb.php:4158 and trace the calls through wordpress/wp-includes/update.php:78 and the upgrader stack; done means WP Admin updates no longer fail with a null mysqli value.

Written by the indexing model from the issue text.

Description

We are using HyperDB for long time and it has been mostly smooth experience so far. However, after upgrading to WordPress 6.4.2 we are expriencing database issues when running WP updates of core, plugins, themes and/or translations via WP Admin.

Our db-config.php did not change and only way of upgrading now is to temporarily switch HyperDB off by removing it from wordpress root dir.

Maybe somebody else also run into this issue and might have any insights?

Thank you.

Error example
PHP Fatal error:  Uncaught TypeError: mysqli_get_server_info(): Argument #1 ($mysql) must be of type mysqli, null given in wordpress/wp-includes/class-wpdb.php:4158
Stack trace:
#0 wordpress/wp-includes/class-wpdb.php(4158): mysqli_get_server_info(NULL)
#1 wordpress/wp-includes/update.php(78): wpdb->db_server_info()
#2 wordpress/wp-admin/includes/class-wp-upgrader.php(844): wp_version_check(Array)
#3 wordpress/wp-admin/includes/class-plugin-upgrader.php(392): WP_Upgrader->run(Array)
#4 wordpress/wp-admin/update.php(51): Plugin_Upgrader->bulk_upgrade(Array)
#5 {main}
  thrown in wordpress/wp-includes/class-wpdb.php on line 4158
Dominant language
PHP
Stars
150
Forks
28
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Automattic/HyperDB

All issues in Automattic/HyperDB

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.