Skip to content

Statement violates GTID consistency #15209

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

Closed
raybog opened this issue May 15, 2018 · 19 comments · Fixed by magento/devdocs#9111
Closed

Statement violates GTID consistency #15209

raybog opened this issue May 15, 2018 · 19 comments · Fixed by magento/devdocs#9111
Assignees
Labels
Area: Framework Component: Framework/DB USE ONLY for FRAMEWORK RELATED BUG! help wanted Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: done Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it

Comments

@raybog
Copy link

raybog commented May 15, 2018

We are using the Google Cloud SQL (MySQL 2e gen. 5.7) server where we encountered the following problem, when trying to add subcategory.

This can be "solved" by setting Binary logging to disable at GCP but it is not a good practice.

Preconditions

Clean installation of Magento 2.2.3 connected to Google Cloud SQL (MySQL 2e gen. 5.7) with Binary logging enabled.

Steps to reproduce

Add subcategory via Admin Panel

Expected result

Category should be added

Actual result

General error: 1787 Statement violates GTID consistency: CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can only be executed outside transactional context. These statements are also not allowed in a function or trigger because functions and triggers are also considered to be multi-statement transactions.

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label May 15, 2018
@lstellway
Copy link

lstellway commented Jun 27, 2018

I am using the same setup and experience this issue during a reindex:

php bin/magento indexer:reindex

The reindex issue is addressed in 12124. The source of the issue is probably the same.

@ghost
Copy link

ghost commented Jul 26, 2018

Hi @raybog , thank you for your report. Please follow these guidelines for proper tracking of your issue. You can report Commerce-related issues in one of two ways:
You can use the Support portal associated with your account
or
If you are a Partner reporting on behalf of a merchant, use the Partner portal.

GitHub is intended for Magento Open Source users to report on issues related to Open Source only. There are no account management services associated with GitHub.

@ghost ghost closed this as completed Jul 26, 2018
@ghost ghost removed their assignment Jul 26, 2018
@gwharton
Copy link
Contributor

gwharton commented Dec 31, 2018

Why was this closed!!. This is still broken in 2.2 and 2.3. Magento should be able to run on a MySQL installation with binary logging enabled.

@gwharton gwharton reopened this Dec 31, 2018
@ghost
Copy link

ghost commented Jan 2, 2019

@gwharton Because this is Commerce-related issues

@gwharton
Copy link
Contributor

gwharton commented Jan 2, 2019

What makes you think this is commerce related. The OP does not mention it and i get the bug in open source.

@ghost ghost self-assigned this Jan 2, 2019
@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Jan 2, 2019

Hi @engcom-backlog-nazar. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 6. Add label Issue: Confirmed once verification is complete.

  • 7. Make sure that automatic system confirms that report has been added to the backlog.

@ghost ghost added the Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed label Jan 2, 2019
@ghost
Copy link

ghost commented Jan 3, 2019

@gwharton but if we accept this we will have 2 duplicate issues ?

@gwharton
Copy link
Contributor

gwharton commented Jan 3, 2019

True, but this issue is failing adding a category and the other is failed reindexing. We are assuming the root cause is the same for both (admitedly seems like it is but we dont know that for sure yet do we?).

@ghost ghost added Component: Framework/DB USE ONLY for FRAMEWORK RELATED BUG! Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Jan 8, 2019
@magento-engcom-team
Copy link
Contributor

@engcom-backlog-nazar Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-97511, MAGETWO-97512 were created

@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Jan 9, 2019
@ghost ghost added help wanted and removed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development labels Jan 9, 2019
@ghost ghost removed their assignment Jan 9, 2019
@rakeshdonga
Copy link

rakeshdonga commented Sep 9, 2019

hello @engcom-backlog-nazar
i have same issue facing any update?
Thanks!!!

@ebanolopes
Copy link

Hello! Is this something that Magento team is working on for next versions or it is on backlog at this moment? Thanks!

@bradjones1
Copy link

This probably most seriously impacts Google Cloud SQL users; there is a notable event with the EOL of first-generation instances which did not utilize binary logging for HA replication on March 5. See #12124 (comment) for a more complete write-up.

@magento-engcom-team, per #15209 (comment) above, is binary logging/GTID transaction compatibility on the roadmap or is this firmly backlogged/needing community work?

@ebanolopes
Copy link

@bradjones1 not really only for Google Cloud, all managed databases are following this. Azure will also block non GTIDs instances on a close future. We're using Google Cloud, moved to Azure to avoid this and now we're working to try to fix this, as we don't want to have a self managed database inside our business.

@bradjones1
Copy link

@ebanolopes Indeed this is not just a Google Cloud issue, however it is pertinent in so far as they are sunsetting related functionality as per above.

I do not have any insight into Magento development priorities; to be honest, I am not a real fan of the product and we are moving away from M2. Sorry I don't have any information for you there. I suspect this issue will either only move forward if enterprise customers ask for it, or there is a community contribution.

@ghost ghost removed Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed labels Oct 20, 2020
@sdzhepa sdzhepa added Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it and removed Progress: ready for dev labels Oct 29, 2020
@magento-engcom-team magento-engcom-team added Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. labels Nov 30, 2020
@jorgb90
Copy link

jorgb90 commented Jan 14, 2021

How can this still be a problem in 2.4?!

@engcom-Alfa engcom-Alfa added Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Area: Framework Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed and removed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Aug 25, 2021
@github-jira-sync-bot
Copy link

❌ Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.magento.com/browse/AC-804

@ihor-sviziev
Copy link
Contributor

According to https://cloud.google.com/sql/docs/features#differences, MySQL for Cloud SQL 8.0 does support CREATE TEMPORARY TABLE statement, and Magento 2.4 does support MySQL 8.
image

So, this is not an issue for Magento 2.4 installations, that does support MySQL 8.

I created PR that adds this info to the docs: magento/devdocs#9111

@ihor-sviziev ihor-sviziev self-assigned this Aug 26, 2021
@m2-assistant
Copy link

m2-assistant bot commented Aug 26, 2021

Hi @ihor-sviziev. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:

    1. Add/Edit Component: XXXXX label(s) to the ticket, indicating the components it may be related to.
    1. Verify that the issue is reproducible on 2.4-develop branch
      Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
      - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
      - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
    1. If the issue is not relevant or is not reproducible any more, feel free to close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Framework Component: Framework/DB USE ONLY for FRAMEWORK RELATED BUG! help wanted Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: done Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.