Problem/Motivation

$install_state['database_ready'] added some logic around $install_state['database_ready'] but it's never set to TRUE to it's just confusing.

Proposed resolution

Remove logic dependent on $install_state['database_ready'] being true because it never is.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

N/a

CommentFileSizeAuthor
#2 3135310-2.patch1.72 KBalexpott
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
FileSize
1.72 KB
longwave’s picture

Status: Needs review » Reviewed & tested by the community

So this was added back in #2352081: Prevent installation over an already installed database but it has never worked - database_ready was always FALSE then and nothing has changed since. Tests pass so this is obviously dead code and can be removed.

xjm’s picture

Confirmed it never gets set anywhere:

[mandelbrot:maintainer | Thu 23:45:36] $ grep -r "database_ready" *
core/includes/install.core.inc:    'database_ready' => FALSE,
core/includes/install.core.inc:  if ($install_state['database_verified'] && $install_state['database_ready']) {
core/includes/install.core.inc:    // install_verify_database_ready() will throw an AlreadyInstalledException
core/includes/install.core.inc:    install_verify_database_ready();
core/includes/install.core.inc:    'install_verify_database_ready' => [
core/includes/install.core.inc:      'run' => $install_state['database_ready'] ? INSTALL_TASK_SKIP : INSTALL_TASK_RUN_IF_NOT_COMPLETED,
core/includes/install.core.inc:function install_verify_database_ready() {

I wonder what this means for the install_verify_database_ready() task that #3120731: Incorrect "Drupal already installed" if any database settings are wrong or unsatisfactory also added a task to... maybe that's related to why that functionality went wrong in the first place?

  • xjm committed c020473 on 9.1.x
    Issue #3135310 by alexpott: Remove completely unused 'database_ready'...

  • xjm committed 12dc32d on 9.0.x
    Issue #3135310 by alexpott: Remove completely unused 'database_ready'...

  • xjm committed 70e87a9 on 8.9.x
    Issue #3135310 by alexpott: Remove completely unused 'database_ready'...
xjm’s picture

Version: 9.1.x-dev » 8.9.x-dev
Status: Reviewed & tested by the community » Fixed

Committed to 9.1.x, and cherry-picked to 9.0.x and 8.9.x. I didn't cherry-pick it to 8.8.x because the other installer change wasn't.

@longwave was incorrectly not credited in the commit message (sorry) due to crossposting with myself, but I've fixed this in the issue credits themselves.

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.