Problem/Motivation

When getting schema information from a mysql database, the Schema.php implementation relies on getPrefixInfo finding information on tables. also because of the implementation in findTables, for building a list of tables. However, because of the implementation, it only ever looks at the information for the default key.

Proposed resolution

?

Remaining tasks

Decide on an approach, review, commit.

User interface changes

n/a

API changes

n/a

Data model changes

n/a

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

neclimdul created an issue. See original summary.

Crell’s picture

neclimdul’s picture

2 possible approaches. I don't know if its valid to rely on the values in getConnectionOptions or not.

Crell’s picture

Status: Needs review » Reviewed & tested by the community

Option 2 is definitely the better approach, no question.

Committers: The 703 KB patch from #3 is what is RTBC, not the other one. :-)

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Hm. Not sure of a good way to test this, so let's go with the fix for now.

Committed and pushed mysql_s_schema-2554241-2.patch to 8.0.x. Thanks!

  • webchick committed 2b0de9c on 8.0.x
    Issue #2554241 by neclimdul: mysql's Schema implementation can only...

Status: Fixed » Closed (fixed)

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

Dave Reid’s picture

Version: 8.0.x-dev » 7.x-dev
Status: Closed (fixed) » Patch (to be ported)
Issue tags: +Needs backport to D7
David_Rothstein’s picture

Version: 7.x-dev » 8.0.0
Status: Patch (to be ported) » Closed (fixed)

The backport is happening in #2311305: Schema::getPrefixInfo() return value refers to the wrong database (with #2223073: Calling DatabaseSchema::getPrefixInfo() on a non-default connection returns the wrong database - write tests repurposed to be about adding tests, since there are some in the patches there but none were ever written here).