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 8.0.37 is released #1052

Merged
merged 2 commits into from
May 3, 2024
Merged

MySQL 8.0.37 is released #1052

merged 2 commits into from
May 3, 2024

Conversation

shogo82148
Copy link
Owner

@shogo82148 shogo82148 commented May 2, 2024

Summary by CodeRabbit

  • Chores
    • Updated MySQL version to enhance database performance and security.
  • Refactor
    • Skipped installing .pdb files for GitHub Actions due to large file size.
    • Reverted a specific commit related to bug fix in the mysql_protocol module.

Copy link

coderabbitai bot commented May 2, 2024

Walkthrough

The update involves upgrading MySQL from version "8.0.36" to "8.0.37" and includes adjustments to skip installing .pdb files for GitHub Actions due to their large size. Additionally, a patch reverts a specific commit related to bug fixes and refactors certain files in the mysql_protocol module for better handling.

Changes

File Path Change Summary
versions/mysql.json Updated MySQL version from "8.0.36" to "8.0.37".
patches/mysql/8.0.37/skip-install-pdb.patch Skip installing .pdb files for GitHub Actions.
patches/mysql/8.0.37/windows/revert-cce8da20cb5fc12e831a66e725fdc9c0c43ad7c6.patch Reverts a specific commit and refactors files in mysql_protocol.

🐇✨
In the land of code where the data trees grow,
A tiny version bump, as the winds of change blow.
Skipping .pdb files, a wise decision made,
Bugs reverted, files refactored, a coder's crusade.
Hop, hop, hurray, let's dance in delight,
For each change, both small and bright! 🌟🐰


Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between c28286a and 69c28a8.
Files selected for processing (2)
  • patches/mysql/8.0.37/skip-install-pdb.patch (1 hunks)
  • patches/mysql/8.0.37/windows/revert-cce8da20cb5fc12e831a66e725fdc9c0c43ad7c6.patch (1 hunks)
Files skipped from review due to trivial changes (1)
  • patches/mysql/8.0.37/skip-install-pdb.patch
Additional comments not posted (3)
patches/mysql/8.0.37/windows/revert-cce8da20cb5fc12e831a66e725fdc9c0c43ad7c6.patch (3)

9-24: Reverted logic simplifies the decoding process by removing overloaded function variants.


49-99: Ensure the revised logic in classic_protocol_codec_message.h correctly handles parameter definitions based on new_params_bound.

Verification successful

The search results indicate that the variable new_params_bound is used consistently across multiple versions of the patch files. The logic related to new_params_bound appears to be correctly implemented in the context of these patches, as the changes are consistent across different versions.

Given this information, it seems that the revised logic in classic_protocol_codec_message.h for handling parameter definitions based on new_params_bound is correctly implemented as per the changes described in the patch files. There is no indication of discrepancies or errors in the implementation across the versions checked.

Conclusion:

  • The implementation of new_params_bound in the context of the provided patch files is consistent and aligns with the expected changes.
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that the new logic for handling parameter definitions based on `new_params_bound` is correctly implemented across the codebase.

# Search for usage of `new_params_bound` in relevant files and ensure it aligns with the new logic.
rg --files-with-matches --type cpp 'new_params_bound' | while read file; do
  # Test: Search for the new logic implementation. Expect: Matches.
  ast-grep --lang cpp --pattern $'if ($_ != 1) { $$$ }' "$file"
done

Length of output: 214



Script:

#!/bin/bash
# Description: Re-verify the implementation of `new_params_bound` across the codebase with adjusted search parameters.

# First, ensure all C++ files are being considered in the search.
rg --files --type cpp

# Then, search for the usage of `new_params_bound` in these files to confirm the implementation of the new logic.
rg 'new_params_bound' $(rg --files --type cpp)

Length of output: 3750


227-265: Adjustment in test expectations reflects the updated logic in handling new_params_bound.


Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Out of diff range and nitpick comments (1)
patches/mysql/8.0.37/windows/revert-cce8da20cb5fc12e831a66e725fdc9c0c43ad7c6.patch (1)

162-225: Simplified tracing logic in classic_stmt_execute_forwarder.cc may reduce the granularity of debug information available.

Consider adding conditional logging to provide more detailed trace information when needed.

Comment on lines +103 to +160
@@ -108,57 +108,4 @@ class ClassicFrame {
}
};

-/**
- * receive a StmtExecute message from a channel.
- *
- * specialization of recv_msg<> as StmtExecute needs a the data from the
- * StmtPrepareOk.
- */
-template <>
-inline stdx::expected<classic_protocol::borrowed::message::client::StmtExecute,
- std::error_code>
-ClassicFrame::recv_msg<
- classic_protocol::borrowed::message::client::StmtExecute>(
- Channel *src_channel, ClassicProtocolState *src_protocol,
- classic_protocol::capabilities::value_type caps) {
- using msg_type = classic_protocol::borrowed::message::client::StmtExecute;
-
- auto read_res = ClassicFrame::recv_frame_sequence(src_channel, src_protocol);
- if (!read_res) return stdx::make_unexpected(read_res.error());
-
- const auto &recv_buf = src_channel->recv_plain_view();
-
- auto frame_decode_res = classic_protocol::decode<
- classic_protocol::frame::Frame<classic_protocol::borrowed::wire::String>>(
- net::buffer(recv_buf), caps);
- if (!frame_decode_res) {
- return stdx::make_unexpected(frame_decode_res.error());
- }
-
- src_protocol->seq_id(frame_decode_res->second.seq_id());
-
- auto decode_res = classic_protocol::decode<msg_type>(
- net::buffer(frame_decode_res->second.payload().value()), caps,
- [src_protocol](auto stmt_id)
- -> stdx::expected<std::vector<msg_type::ParamDef>, std::error_code> {
- const auto it = src_protocol->prepared_statements().find(stmt_id);
- if (it == src_protocol->prepared_statements().end()) {
- return stdx::make_unexpected(make_error_code(
- classic_protocol::codec_errc::statement_id_not_found));
- }
-
- std::vector<msg_type::ParamDef> params;
- params.reserve(it->second.parameters.size());
-
- for (const auto &param : it->second.parameters) {
- params.emplace_back(param.type_and_flags);
- }
-
- return params;
- });
- if (!decode_res) return stdx::make_unexpected(decode_res.error());
-
- return decode_res->second;
-}
-
#endif
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed detailed error handling and logging in classic_frame.h, which could impact debugging and error diagnostics.

+  // Restore detailed error handling and logging for better diagnostics
+  if (!decode_res) {
+    log_error("Decode failed with error: ", decode_res.error());
+    return stdx::make_unexpected(decode_res.error());
+  }

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
@@ -108,57 +108,4 @@ class ClassicFrame {
}
};
-/**
- * receive a StmtExecute message from a channel.
- *
- * specialization of recv_msg<> as StmtExecute needs a the data from the
- * StmtPrepareOk.
- */
-template <>
-inline stdx::expected<classic_protocol::borrowed::message::client::StmtExecute,
- std::error_code>
-ClassicFrame::recv_msg<
- classic_protocol::borrowed::message::client::StmtExecute>(
- Channel *src_channel, ClassicProtocolState *src_protocol,
- classic_protocol::capabilities::value_type caps) {
- using msg_type = classic_protocol::borrowed::message::client::StmtExecute;
-
- auto read_res = ClassicFrame::recv_frame_sequence(src_channel, src_protocol);
- if (!read_res) return stdx::make_unexpected(read_res.error());
-
- const auto &recv_buf = src_channel->recv_plain_view();
-
- auto frame_decode_res = classic_protocol::decode<
- classic_protocol::frame::Frame<classic_protocol::borrowed::wire::String>>(
- net::buffer(recv_buf), caps);
- if (!frame_decode_res) {
- return stdx::make_unexpected(frame_decode_res.error());
- }
-
- src_protocol->seq_id(frame_decode_res->second.seq_id());
-
- auto decode_res = classic_protocol::decode<msg_type>(
- net::buffer(frame_decode_res->second.payload().value()), caps,
- [src_protocol](auto stmt_id)
- -> stdx::expected<std::vector<msg_type::ParamDef>, std::error_code> {
- const auto it = src_protocol->prepared_statements().find(stmt_id);
- if (it == src_protocol->prepared_statements().end()) {
- return stdx::make_unexpected(make_error_code(
- classic_protocol::codec_errc::statement_id_not_found));
- }
-
- std::vector<msg_type::ParamDef> params;
- params.reserve(it->second.parameters.size());
-
- for (const auto &param : it->second.parameters) {
- params.emplace_back(param.type_and_flags);
- }
-
- return params;
- });
- if (!decode_res) return stdx::make_unexpected(decode_res.error());
-
- return decode_res->second;
-}
-
#endif
@@ -108,57 +108,4 @@ class ClassicFrame {
}
};
#endif

@shogo82148 shogo82148 merged commit 9b4ff68 into main May 3, 2024
165 checks passed
@shogo82148 shogo82148 deleted the mysql8.0.37-is-released branch May 3, 2024 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant