-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add MySQL 8.4 unit tests #16440
Add MySQL 8.4 unit tests #16440
Conversation
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Signed-off-by: Dirkjan Bussink <[email protected]>
ee7282d
to
9279fb3
Compare
MySQL 8.4 adds restrict_fk_on_non_standard_key for which the details can be found here: https://dev.mysql.com/doc/refman/8.4/en/server-system-variables.html#sysvar_restrict_fk_on_non_standard_key It prevents the use of non-unique keys or partial keys as foreign keys. For regular MySQL replication though, it does the following: Implication for MySQL Replication. When a foreign key is created on a nonstandard key on the primary because restrict_fk_on_non_standard_key is OFF, the statement succeeds on the replica regardless of any setting on the replica for this variable. Given how this works fir regular replication, we should mirror this behavior for vreplication and always allow this. So we set it up so we can do this with similar logic as to how we disable foreign key checks and we reset it back afterwards. Signed-off-by: Dirkjan Bussink <[email protected]>
9279fb3
to
0110468
Compare
In vitessio#7020 the logic was changed to always map YEAR to binary. But that is wrong, since this breaks the text protocol. Instead, we need to make sure that when we parse the binary data for prepared statements, we treat YEAR there as binary. That ensures we can parse it the way it's encoded in practice in the protocol (and not how it is documented). Signed-off-by: Dirkjan Bussink <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16440 +/- ##
==========================================
- Coverage 68.66% 68.65% -0.02%
==========================================
Files 1548 1549 +1
Lines 199124 199323 +199
==========================================
+ Hits 136731 136838 +107
- Misses 62393 62485 +92 ☔ View full report in Codecov by Sentry. |
There's some small changes for newer MySQL versions around typing information for certain functions etc. This adopts those changes for newer versions. Signed-off-by: Dirkjan Bussink <[email protected]>
Signed-off-by: Dirkjan Bussink <[email protected]>
Signed-off-by: Dirkjan Bussink <[email protected]>
dfa4e32
to
dcfeef5
Compare
Signed-off-by: Dirkjan Bussink <[email protected]>
dcfeef5
to
0f4b635
Compare
Signed-off-by: Dirkjan Bussink <[email protected]>
Didn't mark this specific one as needing release notes etc, since we only want to add those once we've completed the 8.4 stuff. |
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.
We should make sure the MySQL version in CI is the same as the one we ship in our docker images as the default MySQL version.
EDIT: please ignore 😄
I don't understand this comment? This only adds a CI job for MySQL 8.4 and doesn't do anything for Docker etc. yet. |
name: Unit Test (mysql84) | ||
on: [push, pull_request] | ||
concurrency: | ||
group: format('{0}-{1}', ${{ github.ref }}, 'Unit Test (mysql84)') | ||
cancel-in-progress: true |
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.
FYI, we need to mark this workflow as required once the PR is merged.
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.
Nice work!
@@ -42,8 +42,8 @@ type mysqlGRFlavor struct { | |||
} | |||
|
|||
// newMysqlGRFlavor creates a new mysqlGR flavor. | |||
func newMysqlGRFlavor() flavor { | |||
return &mysqlGRFlavor{} | |||
func newMysqlGRFlavor(serverVersion string) flavor { |
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.
We should probably delete this file? WDYT?
Signed-off-by: Dirkjan Bussink <[email protected]>
Description
In order to support MySQL 8.4 in the future, we need to run CI unit tests against it.
Part of #16466
Checklist