博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ERROR 1786 (HY000)
阅读量:7224 次
发布时间:2019-06-29

本文共 1208 字,大约阅读时间需要 4 分钟。

【错误代码】

1 ERROR 1786 (HY000): Statement violates GTID consistency: CREATE TABLE ... SELECT.

【原因分析】

是由于启用enforce_gtid_consistency功能导致

1 mysql> show variables like 'enforce_gtid%';2 +--------------------------+-------+3 | Variable_name            | Value |4 +--------------------------+-------+5 | enforce_gtid_consistency | ON    |6 +--------------------------+-------+7 1 row in set (0.01 sec)

而该功能会限制数据库只允许执行被日志记录的语句,该参数值设置说明:

官方原文解释

When enabled, the server enforces GTID consistency by allowing execution of only statements that can be safely logged using a GTID. You must set this option to ON before enabling GTID based replication.

 

Only statements that can be logged using GTID safe statements can be logged when  is set to ON, so the operations listed here cannot be used with this option:

  •  statements

  •  or  statements inside transactions

  • Transactions or statements that update both transactional and nontransactional tables. There is an exception that nontransactional DML is allowed in the same transaction or in the same statement as transactional DML, if all nontransactional tables are temporary.

 【解决方法】

通过set global enforce_gtid_consistency=off来修改

转载于:https://www.cnblogs.com/tonnytangy/p/7541757.html

你可能感兴趣的文章
小米涉足银行业 联合新希望集团成立民营银行
查看>>
用私服修复Maven仓库依赖引用(加载)不下来的问题
查看>>
中国四大银行IT基础架构去IOE问题思考和探讨
查看>>
Spark RDDRelation
查看>>
逆袭!Xbox One销量超PS4成英国游戏主机销售冠军
查看>>
广义动量定理之数量n的应用分析
查看>>
django模型详解(四)
查看>>
如何从系统层面优化深度学习计算?
查看>>
TIOBE 6 月编程语言榜:TypeScript 首次跻身前100
查看>>
解决ssh登录后闲置时间过长而断开连接
查看>>
ADB server didn't ACK 解决方法
查看>>
奥迪与Alta达成合作,将为电动汽车打造太阳能天窗
查看>>
【连载】物联网全栈教程-从云端到设备(十一)---调用阿里云API,获取物的属性。...
查看>>
美军制造3D打印无人机,最高时速55英里
查看>>
Netweaver和CloudFoundry里的trace开关
查看>>
工作负载不要全部放在公共云的篮子中!
查看>>
tf.Graph().get_operations
查看>>
【工业串口和网络软件通讯平台(SuperIO)教程】一.通讯机制
查看>>
[图文教程]阿里云万网域名一键签发SSL证书 快捷申请免费SSL证书
查看>>
区块链简介
查看>>