1

I recently upgraded my WordPress CiviCRM from 5.25 to 5.28 and in doing so needed to migrate the SQL old 5.5 database to 5.7. The upgrades went fine, but I now have an error when trying to send group emails through CiviMail:

Error in call to Mailing_send_test : DB Error: unknown error

Aug 27 15:28:58  [error] $Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => exceptionHandler
        )

    [code] => -1
    [message] => DB Error: unknown error
    [mode] => 16
    [debug_info] => CREATE TEMPORARY TABLE `civicrm_tmp_e_gccache_5999aedd9eade6251afdc6974a96b5b1` (contact_id int, group_id int, UNIQUE UI_contact_group (contact_id,group_id)) ENGINE=MEMORY DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci [nativecode=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.]
    [type] => DB_Error
    [user_info] => CREATE TEMPORARY TABLE `civicrm_tmp_e_gccache_5999aedd9eade6251afdc6974a96b5b1` (contact_id int, group_id int, UNIQUE UI_contact_group (contact_id,group_id)) ENGINE=MEMORY DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci [nativecode=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.]
    [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="CREATE TEMPORARY TABLE `civicrm_tmp_e_gccache_5999aedd9eade6251afdc6974a96b5b1` (contact_id int, group_id int, UNIQUE UI_contact_group (contact_id,group_id)) ENGINE=MEMORY DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci [nativecode=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.]"]
)

I've tried cleaning up caches but stumped for any other ideas. Please help.

Kind regards, Alex

1 Answer 1

1

Alex, Welcome to Civi stackexchange.

If the server is running with global transaction identifiers (GTIDs) enabled (gtid_mode=ON), do not enable binary logging. Try turning it off

3
  • Thanks for the prompt reply. These are the settings - gtid_mode=OFF and log_bin=ON. Perhaps setting enforce_gtid_consistency=OFF may fix it?
    – Alex
    Commented Aug 27, 2020 at 23:49
  • Yes may be... Can you try.. Commented Aug 28, 2020 at 0:09
  • Oof. Seems that we can't get admin privileges on phpMyAdmin to change variables, as a result of shared hosting.
    – Alex
    Commented Aug 28, 2020 at 15:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.