Problem/Motivation

Noticed when reviewing #3593963: Field loading can hit the MySQL 61 table join limit if there are ~60 fields - we do

            // For each column declared by the field, populate the item from
            // the prefixed database column.
            foreach ($field_definition_columns[$field_name] as $column => $attributes) {
              $column_name = $table_mapping->getFieldColumnName($storage_definition, $column);
              // Unserialize the value if specified in the column schema.
              $item[$column] = (!empty($attributes['serialize'])) ? $this->handleNullableFieldUnserialize($row[$column_name]) : $row[$column_name];
            }

for both single cardinality and multiple cardinality fields but we have $field_columns with all the columns name in it already so we should use that instead of $table_mapping.

Proposed resolution

Use $field_columns

Remaining tasks

User interface changes

None

Introduced terminology

N/a

API changes

None

Data model changes

None

Release notes snippet

N/a

Issue fork drupal-3594426

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Issue summary: View changes
alexpott’s picture

Status: Active » Needs review

smustgrave’s picture

Since that one is still WIP should this be rolled into it?

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new98 bytes

The Needs Review Queue Bot tested this issue. The merge request has merge conflicts and cannot be merged. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

alexpott’s picture

@smustgrave nope it is a separate issue that was pre-existing to it.

alexpott’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Other issue landed so marking this one

  • catch committed bfd3c06a on 11.4.x
    task: #3594426 Use local variable over object in \Drupal\Core\Entity\Sql...

  • catch committed 7be34519 on 11.x
    task: #3594426 Use local variable over object in \Drupal\Core\Entity\Sql...

  • catch committed b2d27032 on main
    task: #3594426 Use local variable over object in \Drupal\Core\Entity\Sql...
catch’s picture

Version: main » 11.4.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to main, 11.x, and 11.4.x, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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