In provsioning_db_connect(), it would be better to report the actual error from mysql, not just that an error occured:
if (!$connection) {
drush_set_error('PROVISION_MASTER_DB_FAILED', dt('Could not connect to the master \
database server.') ." ". mysql_error(), 'error');
}
else {
$success = @mysql_select_db('mysql', $connection);
if ($success) {
_provision_db_connection($connection);
}
else {
drush_set_error('PROVISION_MASTER_DB_FAILED', dt('Could not select the mysql dat\
abase.') .' '. mysql_error(), 'error');
return FALSE;
}
}
Comments
Comment #1
anarcat commentedThe issue here is that such a message may expose the database connection details, I'm not sure it's a good idea.
Comment #2
anarcat commentedOkay, after checking, only the username is exposed in MySQL 5.0, so i'll commit this.