Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/61.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mysql GTID一致性:创建临时表和删除临时表只能在事务上下文之外执行_Mysql_Google Cloud Platform_Magento2.2_Gtid - Fatal编程技术网

Mysql GTID一致性:创建临时表和删除临时表只能在事务上下文之外执行

Mysql GTID一致性:创建临时表和删除临时表只能在事务上下文之外执行,mysql,google-cloud-platform,magento2.2,gtid,Mysql,Google Cloud Platform,Magento2.2,Gtid,我的Magento版本是2.2.3。我们正在使用Google Cloud SQL第二代实例 运行索引命令时遇到错误 一般错误:1787语句违反GTID一致性:CREATE 临时表和DROP临时表只能在外部执行 事务上下文。这些语句在应用程序中也是不允许的 函数或触发器,因为函数和触发器也被考虑在内 要成为多语句事务,查询为:创建临时表 如果不存在catalog\u product\u index\u eav\u tempLIKE catalog\u product\u index\u eav\u

我的Magento版本是2.2.3。我们正在使用Google Cloud SQL第二代实例

运行索引命令时遇到错误

一般错误:1787语句违反GTID一致性:CREATE 临时表和DROP临时表只能在外部执行 事务上下文。这些语句在应用程序中也是不允许的 函数或触发器,因为函数和触发器也被考虑在内 要成为多语句事务,查询为:创建临时表 如果不存在
catalog\u product\u index\u eav\u temp
LIKE
catalog\u product\u index\u eav\u tmp


根据中发布的问题,我可以通过使用以下命令禁用二进制日志来消除此错误:

gcloud sql instances patch [INSTANCE_NAME] --no-enable-bin-log

您还可以在创建云SQL实例时从web控制台禁用二进制日志记录:

1. Expand "Show Configuration Options"
2. Expand "Enable auto backups and high availability"
3. Uncheck "Enable binary logging"
这意味着您当前无法使用Magento 2 community edition实现高可用性MySQL实例(使用Google Cloud SQL)


您可以跟踪更新的状态

“这就是Magento bug,我在Magento 2.1.7发布时已经报告过了。但问题仍然存在。”那么为什么要在这里发布呢?看起来你需要等到magento解决这个问题。我无论如何都要解决它。我正在寻求帮助。看来@RaymondNijland提交的问题是。“我相信这是一个复制品,它有一点更大的牵引力。”洛根我找到了解决办法,我已经修复了它。谢谢@普拉尚特瓦兰达:太好了!你能发布你的答案吗?