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

MySQL 5.7.22 表字段类型为 tinyint 长度为 1 时, undo_log 日志中只存储 true 和 false, 引起回滚异常 #1964

Closed
1 task
ymfs-wyh opened this issue Nov 29, 2019 · 5 comments · May be fixed by #6070
Labels
solution/MySQL Record the solution to the MySQL problem type: bug Category issues or prs related to bug.

Comments

@ymfs-wyh
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Ⅰ. Issue Description

MySQL 5.7.22 表字段类型为 tinyint 长度为 1 时, undo_log 日志中只存储 true 和 false, 引起回滚异常, 例如业务审核状态为 4, 回滚到 1, 结果 undo_log 中都是 true , 导致最终没有回滚.

II. Environment:

  • JDK version : 1.8
  • OS : centos7.4
  • Others: mysql 5.7.22
@ymfs-wyh
Copy link
Author

seata version : 0.9.0

@zjinlei zjinlei added the type: bug Category issues or prs related to bug. label Nov 29, 2019
@ymfs-wyh
Copy link
Author

问题描述: 我数据库中这个字段是审核状态, 状态机流转过程中, 发现 seata 的 undo_log 这个状态的值在大于 0 时一直是 true, 导致 undo_log 记录时对象没有改变, 所以异常没有回滚
image
image
image

@jsbxyyx
Copy link
Member

jsbxyyx commented Dec 3, 2019

tinyInt1isBit=false add to jdbc url

@wangliang181230
Copy link
Contributor

wangliang181230 commented Nov 21, 2023

@ymfs-wyh @qin501 @jsbxyyx 现在已通过代码修复该BUG,PR:#6068

@wangliang181230
Copy link
Contributor

wangliang181230 commented Nov 21, 2023

@ymfs-wyh 使用 mysql 5.x 数据库的朋友,麻烦使用这个PR的代码再测一下吧。
我这边测过了 mysql 8.x,驱动包分别为5.x和8.x,都测试通过。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solution/MySQL Record the solution to the MySQL problem type: bug Category issues or prs related to bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants