Skip to content

Newsletter\Model\Subscriber::loadByEmail() does not use MySQL index #13033

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

devamitbera
Copy link

@devamitbera devamitbera commented Jan 7, 2018

  • Use MYSQL index
  • Add an Mysql Index key via upgrade Schema
  • files add at app/code/Magento/Newsletter/Setup/UpgradeScheme.php
  • Modified at app/code/Magento/Newsletter/etc/module.xml

Description

Fixed Issues (if relevant)

  1. Newsletter\Model\Subscriber::loadByEmail() does not use MySQL index #12787: newsletter-subscriber-loadbyemail-mysql-index-issue

Manual testing scenarios

Require to run Setup command for upgrade Newsletter Scheme
Run below query at database to check index key exists for field subscriber_email

EXPLAIN SELECT * FROM newsletter_subscriber WHERE subscriber_email='{EmailId}'

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

- Use MYSQL index
- Add an Mysql Index key via upgrade Schema
- files  add  at app/code/Magento/Newsletter/Setup/UpgradeScheme.php
- Modified at app/code/Magento/Newsletter/etc/module.xml
@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Jan 7, 2018

CLA assistant check
All committers have signed the CLA.

@dmanners dmanners self-assigned this Jan 7, 2018
@dmanners dmanners added this to the January 2018 milestone Jan 7, 2018
@@ -0,0 +1,37 @@
<?php
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just have a look through the styles please.

Feedback from our tests


FILE: ...LE1/magento2/app/code/Magento/Newsletter/Setup/UpgradeSchema.php
----------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
----------------------------------------------------------------------
  2 | ERROR | [x] There must be one blank line after the namespace
    |       |     declaration
  7 | ERROR | [x] There must be one blank line after the last USE
    |       |     statement; 0 found;
 11 | ERROR | [x] Expected 1 space before "UpgradeSchemaInterface"; 2
    |       |     found
 37 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

@magento-team magento-team merged commit be8b258 into magento:2.2-develop Jan 16, 2018
@magento-engcom-team magento-engcom-team added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Jan 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.2.x The issue has been fixed in 2.2 release line Progress: accept Release Line: 2.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants