Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

备份操作JSON或者BIT类型的数据失败 #286

Closed
DBA-Ray opened this issue Dec 18, 2020 · 6 comments
Closed

备份操作JSON或者BIT类型的数据失败 #286

DBA-Ray opened this issue Dec 18, 2020 · 6 comments
Labels
wontfix This will not be worked on

Comments

@DBA-Ray
Copy link

DBA-Ray commented Dec 18, 2020

描述
备份JSON或者BIT类型的数据失败
提示:Backup: io.ReadFull(header) failed. err EOF: connection was bad.

重现
执行DML操作上述类型的数据,执行可以成功,备份失败

环境

  • 数据库: [mysql]
  • 版本: [8.0.22]
  • Archery (v1.8.0)
@DBA-Ray DBA-Ray changed the title 回滚JSON或者BIT类型的数据失败 备份操作JSON或者BIT类型的数据失败 Dec 18, 2020
@hanchuanchuan
Copy link
Owner

两种类型的备份均支持的. 该问题如何会重现的话, 可能是MySQL版本对应的binlog同样改变了.
周末我测试一下对应版本数据库.

@DBA-Ray
Copy link
Author

DBA-Ray commented Dec 18, 2020

确实是5.7是好用的,8.0.22会出错,建议设置binlog_transaction_compression=1测试,这是新版MYSQL的binlog压缩开关,如果此模式下可以正常备份,那么非压缩状态下也肯定可以回滚。

@hanchuanchuan
Copy link
Owner

测试过了, 确实是该压缩参数导致的, 开启压缩后产生了新的事件类型Transaction_payload_event.
这个支持可能要等蛮长一段时间了,工作量估计比较大(MySQL复制协议组件 go-mysql 暂不支持该事件).

@hanchuanchuan
Copy link
Owner

关联Issue: go-mysql-org/go-mysql#533

@DBA-Ray
Copy link
Author

DBA-Ray commented Dec 20, 2020

好的,另外有个需求,是否可以增加单独判断时间类型的字段是否可以为NULL的参数,因为时间类型的默认值如果是一个时间常量,并且需要在前端展示,那么体验不是很好,所以需要为NULL,但是每次都需要关闭判断字段NOT NULL才能实现此需求,但同时也失去了其他数据类型字段NOT NULL的检验。

@stale
Copy link

stale bot commented Jan 3, 2021

由于此问题没有最近的活动,因此已被自动标记为陈旧。如果没有进一步的活动,会作为不活跃issue关闭。感谢你对本项目的贡献。 This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants