cancel
Showing results for 
Search instead for 
Did you mean: 

the exception on mysql 5.6

the exception on mysql 5.6

magento Version: 2.1.8
mysql version: aliyun RDS for mysql 5.6
php version: PHP 7.0.22

mysql account authority is certainly no problem

 

PRODUCTS> Categories> Add Subcategory

 

When I click on "save" the time

 

you will see the error message "Something went wrong while saving the category"

 

check "var / log / exception.log" to show:

 

main.CRITICAL: PDSTException: SQLSTATE [HY000]: General error: 1787 When @@ GLOBAL.ENFORCE_GTID_CONSISTENCY = 1, the statements CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can be executed in a non-transactional context only, and require that AUTOCOMMIT = 1 in /data1/www/magento2/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228


I checked the information, it should be mysql 5.6 after the gtid characteristics caused
can not execute "create temporary table" in transaction
the problem now seems to affect a lot of features


will not close the "gtid" under the premise, what is the solution to this problem?


and because I am using the RDS service now, this important parameter, the vendor is unlikely to let me modify


even if I installed mysql on the machine, when the need to use master / slave mode
this situation will encounter the same

2 REPLIES

Re: the exception on mysql 5.6

help...

Re: the exception on mysql 5.6

I still have the same problem with Magento 2.2.1, also on Aliyun RDS server.

 

[2017-11-13 04:34:03] main.CRITICAL: SQLSTATE[HY000]: General error: 1787 When @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1, the statements CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can be executed in a non-transactional context only, and require that AUTOCOMMIT = 1., query was: CREATE TEMPORARY TABLEtmp_select_fc67d54614b698ebb1a8d4d6da400330 (PRIMARY KEY(url_rewrite_id),INDEX HASHKEY_ENTITY_STORE USING HASH(hash_key),INDEX ENTITY_STORE USING HASH(entity_id,store_id)) ENGINE=INNODB IGNORE (SELECT e., CONCAT(e.store_id,'_', e.entity_id) AS hash_key FROM url_rewrite AS e WHERE (entity_type = 'category') AND (entity_id IN('13'))) {"exception":"[object] (Zend_Db_Statement_Exception(code: 0): SQLSTATE[HY000]: General error: 1787 When @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1, the statements CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can be executed in a non-transactional context only, and require that AUTOCOMMIT = 1., query was: CREATE TEMPORARY TABLE tmp_select_fc67d54614b698ebb1a8d4d6da400330 (PRIMARY KEY(url_rewrite_id),INDEX HASHKEY_ENTITY_STORE USING HASH(hash_key),INDEX ENTITY_STORE USING HASH(entity_id,store_id)) ENGINE=INNODB IGNORE (SELECT e., CONCAT(e.store_id,'_', e.entity_id) AS hash_key FROM url_rewrite AS e WHERE (entity_type = 'category') AND (entity_id IN('13'))) at /var/www/html/myproject/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:235, PDOException(code: HY000): SQLSTATE[HY000]: General error: 1787 When @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1, the statements CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can be executed in a non-transactional context only, and require that AUTOCOMMIT = 1. at /var/www/html/myproject/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228)"} []