The new status checks are broken with MySQLi.

warning: mysqli_get_server_info() expects parameter 1 to be mysqli, null given in /Users/ted/Documents/webdata/drupalCVS/includes/database.mysqli.inc on line 24.

If I switch to the "mysql" interface it works great, it detects my 5.0.19, otherwise, I get the warning above and the MySQL version is empty.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

m3avrck’s picture

Status: Active » Needs review
FileSize
533 bytes

Here's a patch which fixes this. There was not $connection to lookup. Note, we don't have to pass a valid $url to connect to the database to get the version information, an empty string works.

davemicc’s picture

That patch causes Drupal to give me an "Unable to connect to database server" access denied error. This patch passes the global $active_db connection object to mysqli_get_server_info() which seems to be consistent with what the other functions in the file do.

davemicc’s picture

Oops... I forgot to configure my editor to use spaces instead of tabs.

m3avrck’s picture

Hmm strange, yeah I should have used the global $db_active.

Nice work Dave, better patch!

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

confirmed fixed

calebgilbert’s picture

Can confirm that this patched worked for me too. Thanx.

zoeloelip’s picture

Any reason why mysqli_get_server_info is called twice? Why not use $info from the first call?

drumm’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)