-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
[Fix-13972][dao] set default value for command #14612
Conversation
dolphinscheduler-bom/pom.xml
Outdated
@@ -56,7 +56,7 @@ | |||
<hadoop.version>3.2.4</hadoop.version> | |||
<cron-utils.version>9.1.6</cron-utils.version> | |||
<h2.version>2.2.220</h2.version> | |||
<mysql-connector.version>8.0.16</mysql-connector.version> | |||
<mysql-connector.version>8.0.33</mysql-connector.version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a significant change for users. We should disscuss it. @ruanwenjun @zhongjiajie @EricGao888
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seem 8.0.33 is compatible with 8.0.16, But I want to know is why should we upgrade the version of mysql jdbc? I think we can fix this issue without this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The upgrade is to ensure that the fields in the database are null and the objects are also null, rather than enumerating 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The enums are parsed by Mybatis-plus, I don't think this should be related to MySQL driver, is there any related doc?
BTW, if there is a reason to upgrade the MySQL driver, it's needed to use a single PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bug is caused by both the MySQL driver and mybatisplus. The driver returned 0 when the database field was null, and mybatisplus did not correctly use wasnull
to determine. You can refer to this link specifically: baomidou/mybatis-plus#5266
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a serious bug, MySQL stores null but the driver returns 0.
I find the bug is ResultSetImpl.getObject()
will return a non null value. But I havn't test this.
https://dev.mysql.com/doc/relnotes/connector-j/8.0/en/news-8-0-17.html
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/entity/Command.java
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## dev #14612 +/- ##
============================================
- Coverage 38.71% 38.69% -0.03%
+ Complexity 4628 4625 -3
============================================
Files 1285 1285
Lines 43976 43973 -3
Branches 4859 4859
============================================
- Hits 17025 17014 -11
- Misses 25071 25079 +8
Partials 1880 1880
... and 3 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
7ced8b7
to
74995f7
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
(cherry picked from commit dde45db)
Purpose of the pull request
close #13972
Brief change log