Skip to content

Release v1.9.3 #1724

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

Closed
wants to merge 6 commits into from
Closed

Release v1.9.3 #1724

wants to merge 6 commits into from

Conversation

methane
Copy link
Member

@methane methane commented Jun 13, 2025

Description

Checklist

  • Code compiles correctly
  • Created tests which fail without the change (if possible)
  • All tests passing
  • Extended the README / documentation, if necessary
  • Added myself / the copyright holder to the AUTHORS file

methane and others added 6 commits April 21, 2025 17:48
* ensuring performance schema is enabled when testing some performance schema results
* do not use collations affected by MariaDB character_set_collations.
* ensure using IANA timezone in test, since tzinfo depending on system won't have deprecated tz like "US/Central" and "US/Pacific"

Co-authored-by: Diego Dupin <[email protected]>
…r#1702)

If a transaction connection has a cached error, return it instead of
ErrInvalidConn during Commit/Rollback operations.

Fix go-sql-driver#1690

Co-authored-by: brad-defined <[email protected]>
Backport benchmark improvements.
Avoid unnecessary allocation.
Although this is not a bug, this is a regression in 1.9 branch.
This PR fixes performance regression when compression is not used.
@methane methane closed this Jun 13, 2025
Copy link

coderabbitai bot commented Jun 13, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This change refactors internal buffer and packet handling, error reporting in transaction methods, and benchmark tests for clarity and efficiency. It also updates tests for collation, time zones, and connection attributes, and adds new contributors to the AUTHORS file. Changelog and code comments are updated accordingly.

Changes

File(s) Change Summary
AUTHORS Added two individual contributors and one organization to the list.
CHANGELOG.md Added entry for version 1.9.3 with three main fixes and the release date.
benchmark_test.go Refactored and renamed benchmark functions for clarity; improved setup and timing; added compressed/uncompressed 10k row benchmarks; optimized argument reuse and variable scope.
buffer.go Added len() method to buffer; simplified readNext to a direct slice extraction without I/O or error handling.
compress.go Refactored readNext and readCompressedPacket to remove readerFunc parameter; unified sequence number handling for compression; updated debug output.
driver_test.go Updated collation and timezone tests for explicit values; improved connection attribute test to check for performance_schema before running.
packets.go Added mysqlConn.readNext; refactored readPacket to use it; unified sequence number handling; changed debug output to os.Stderr; adjusted command packet writing sequence logic.
transaction.go Refined error handling in Commit and Rollback to return cached connection errors if present, otherwise fallback to ErrInvalidConn.

Sequence Diagram(s)

sequenceDiagram
    participant App as Application
    participant Tx as mysqlTx
    participant Conn as mysqlConn

    App->>Tx: Commit() or Rollback()
    Tx->>Conn: Check if mc is nil
    alt mc is nil
        Tx-->>App: return ErrInvalidConn
    else mc is closed
        Tx->>Conn: mc.error()
        alt error exists
            Tx-->>App: return cached error
        else
            Tx-->>App: return ErrInvalidConn
        end
    else
        Tx->>Conn: Execute COMMIT or ROLLBACK
        Tx-->>App: return result or error
    end
Loading
sequenceDiagram
    participant Conn as mysqlConn
    participant Buffer as buffer

    Conn->>Buffer: readNext(n)
    alt buffer has enough data
        Buffer-->>Conn: return slice of n bytes
    else
        Buffer->>Conn: refill buffer (not in new readNext)
        Buffer-->>Conn: (not applicable, now just returns slice)
    end
    Conn-->>Conn: process packet with received data
Loading

Possibly related PRs


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 76c00e3 and 8c57c41.

⛔ Files ignored due to path filters (1)
  • .github/workflows/test.yml is excluded by !**/*.yml
📒 Files selected for processing (8)
  • AUTHORS (3 hunks)
  • CHANGELOG.md (1 hunks)
  • benchmark_test.go (8 hunks)
  • buffer.go (2 hunks)
  • compress.go (3 hunks)
  • driver_test.go (4 hunks)
  • packets.go (8 hunks)
  • transaction.go (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 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>, please review it.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration 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.

@methane methane deleted the release-v193 branch June 13, 2025 06:20
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