\MigrateSQLMap::getQualifiedMapTable may break with MySQL 8 support in D7 core

Created on 15 September 2020, almost 4 years ago
Updated 27 April 2023, about 1 year ago

Problem/Motivation

In #2978575: Mysql 8 Support on Drupal 7 β†’ we've come across a problem where \MigrateSQLMap::getQualifiedMapTable prefixes table names with dbname. when table prefixes are not in place.

Because MySQL 8 support will require quoting of table names in core, this prefixing / qualifying can cause problems depending on exactly how the quoting is implemented. See #2978575-221: Mysql 8 Support on Drupal 7 β†’ and previous comments around #50

It looks like this was introduced to migrate in #1480762: Join of legacy data to default database map table does not work β†’ .

Steps to reproduce

This may require manual steps to reproduce, as the qualifying / prefixing is skipped when table prefixes are in place, which is always the case in simpletest.

That means migrate's tests pass without the dbname. prefixing.

Proposed resolution

It sounds like this could be more of an optimisation than something that's essential; if so would it be possible to back this change out of migrate and fall back to the less-optimised solution (which sounds like what has to be done when table prefixing is in place anyway)?

Remaining tasks

Identify and implement a solution.

User interface changes

??

API changes

??

Data model changes

??

πŸ“Œ Task
Status

Needs work

Version

2.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom mcdruid πŸ‡¬πŸ‡§πŸ‡ͺπŸ‡Ί

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024