1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 Statement violates GTID consistency

Discussion in 'XenForo Questions and Support' started by CrispinP, Sep 13, 2016.

  1. CrispinP

    CrispinP Well-Known Member

    Hi folks,

    I recently reinstalled my QA server and put mysql57 on there (my prod has 5.6).
    I am now getting the following error whenever I try create a thread or resource.

    Mysqli statement execute error : Statement violates GTID consistency: Updates to non-transactional tables can only be done in either autocommitted statements or single-statement transactions, and never in the same statement as updates to transactional tables.

    I've turned off GTID in the my.cnf and restarted mySQL but to no avail.

    Any clues as to how to get this to work?

    This DB is a restore from prod in both code and DB.

    Full error:

  2. Mike

    Mike XenForo Developer Staff Member

    It sounds like GTIDs are still on. There are a couple options surrounding this: https://dev.mysql.com/doc/refman/5.7/en/replication-options-gtids.html Make sure you set both of them off and confirm that they're off when the server is running (via SHOW VARIABLES).
  3. CrispinP

    CrispinP Well-Known Member

    So that's the odd thing - they were on (by default apparently) and I turned them off.

    I set them off with the @globalthingymagig as well as in the my.cnf. A reboot and it still shows as off.

  4. Mike

    Mike XenForo Developer Staff Member

    I assume you're still having the problem. Just to confirm then, what about enforce_gtid_consistency?
    CrispinP likes this.
  5. CrispinP

    CrispinP Well-Known Member

    Perfect! Thanks for the tip. Setting that off and/or editing the my.cnf and setting it to zero there works.

    So, if this was a default install of 5.7.13, is there going to be fun to be had with new users who install this and XF?
    My prod version is 5.5 and it has none of this listed.

    Thanks again.
  6. shri

    shri Member

    Same issues on Google Cloud SQL Gen 2 - And cannot change that setting. :)
  7. AllCdnBoy

    AllCdnBoy New Member

    yup, same here. I get this every time I try to log out from the user side (admin side seems to work fine).

    [*]Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
    [*]Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
    [*]Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 661
    [*]Zend_Db_Adapter_Abstract->delete() in XenForo/Model/Session.php at line 487
    [*]XenForo_Model_Session->processLastActivityUpdateForLogOut() in XenForo/ControllerPublic/Logout.php at line 44
    [*]XenForo_ControllerPublic_Logout->actionIndex() in XenForo/FrontController.php at line 351
    [*]XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
    [*]XenForo_FrontController->run() in /index.php at line 13
    PS - for now, I just commented out the transactional part in Model/Session.php for
    Last edited: Dec 31, 2016

Share This Page