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

Implement Lifecycle for MySqlConnection #171

Merged
merged 1 commit into from
Dec 21, 2023
Merged

Implement Lifecycle for MySqlConnection #171

merged 1 commit into from
Dec 21, 2023

Conversation

mirromutth
Copy link
Contributor

@mirromutth mirromutth commented Dec 20, 2023

Motivation:

Implement Lifecycle for MySqlConnection. See also #64

Modification:

The MySqlConnection.

Result:

The MySqlConnection implements Lifecycle and will rollback in preRelease.

@mirromutth mirromutth added the enhancement New feature or request label Dec 20, 2023
Copy link
Collaborator

@jchrys jchrys left a comment

Choose a reason for hiding this comment

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

LGTM

@mirromutth
Copy link
Contributor Author

I re-implement it with COM_RESET_CONNECTION, which will reset all state, not just rollback transaction. That should make more sense.

@mirromutth
Copy link
Contributor Author

mirromutth commented Dec 21, 2023

Looks like MySQL 5.6.x and below does not support COM_RESET_CONNECTION.

Then I found that the reset status of COM_RESET_CONNECTION seemed a bit unexpected. It will clean up all prepared statements (server-preparing), which will leave our PrepareCache in an error state.

So I reset the commit, sorry for that.

Copy link
Collaborator

@jchrys jchrys left a comment

Choose a reason for hiding this comment

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

lgtm

@jchrys jchrys merged commit d4a9fe0 into trunk Dec 21, 2023
20 checks passed
@jchrys jchrys deleted the feature/issues-64 branch December 21, 2023 12:33
jchrys pushed a commit that referenced this pull request Dec 21, 2023
Motivation:

Implement `Lifecycle` for `MySqlConnection`. See also #64 and #171

Modification:

The `MySqlConnection`.

Result:

The `MySqlConnection` implements `Lifecycle` and will rollback in
`preRelease`.
@jchrys jchrys added this to the 1.0.6/0.9.7 milestone Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants