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

Add support for MariaDB version pattern #204

Merged
merged 1 commit into from
Jan 16, 2024
Merged

Add support for MariaDB version pattern #204

merged 1 commit into from
Jan 16, 2024

Conversation

mirromutth
Copy link
Contributor

@mirromutth mirromutth commented Jan 16, 2024

Motivation:

Should remove fake prefix 5.5.5- for MariaDB 10.x

See also #203

This is why #201 cannot assert that the server supports RETURNING clause.

Modification:

  • Check and remove MariaDB version fake prefix
  • Add isMariaDb to ConnectionContext, it will check either capabilities or server version is present as MariaDB
  • Correct server version checking, like TLS version, @@transaction_isolation/@@tx_isolation

Result:

Driver correctly parses and checks MariaDB server version

@mirromutth mirromutth added the enhancement New feature or request label Jan 16, 2024
@mirromutth mirromutth requested a review from jchrys January 16, 2024 10:14
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.

Nice work! LGTM

@jchrys jchrys added this to the 1.0.7/0.9.8 milestone Jan 16, 2024
@jchrys jchrys merged commit 8752f66 into trunk Jan 16, 2024
12 checks passed
@jchrys jchrys deleted the feature/issues-203 branch January 16, 2024 23:05
jchrys added a commit that referenced this pull request Feb 7, 2024
Motivation:
A NPE was identified when utilizing `SslMode.TUNNEL`, introduced by PR #204. The issue arises when `ConnectionContext#isMariaDb` is invoked from `SslBridgeHandler#isTls13Enabled`, leading to an NPE due to the ConnectionContext not being initialized at that time.

Modification:
We have updated ConnectionContext#isMariaDb to return false if the context has not been initialized, preventing the NPE. (Mainly to restore previous behavior)

Result:
This change addresses the NPE issue, ensuring stability when `SslMode.TUNNEL` is selected. It resolves the problem reported in GoogleCloudPlatform/cloud-sql-jdbc-socket-factory#1828
jchrys added a commit that referenced this pull request Feb 7, 2024
Motivation:
A NPE was identified when utilizing `SslMode.TUNNEL`, introduced by PR #204. The issue arises when `ConnectionContext#isMariaDb` is invoked from `SslBridgeHandler#isTls13Enabled`, leading to an NPE due to the ConnectionContext not being initialized at that time.

Modification:
We have updated ConnectionContext#isMariaDb to return false if the context has not been initialized, preventing the NPE. (Mainly to restore previous behavior)

Result:
This change addresses the NPE issue, ensuring stability when `SslMode.TUNNEL` is selected. It resolves the problem reported in GoogleCloudPlatform/cloud-sql-jdbc-socket-factory#1828
jchrys added a commit that referenced this pull request Feb 7, 2024
Motivation:
A NPE was identified when utilizing `SslMode.TUNNEL`, introduced by PR #204. The issue arises when `ConnectionContext#isMariaDb` is invoked from `SslBridgeHandler#isTls13Enabled`, leading to an NPE due to the ConnectionContext not being initialized at that time.

Modification:
We have updated ConnectionContext#isMariaDb to return false if the context has not been initialized, preventing the NPE. (Mainly to restore previous behavior)

Result:
This change addresses the NPE issue, ensuring stability when `SslMode.TUNNEL` is selected. It resolves the problem reported in GoogleCloudPlatform/cloud-sql-jdbc-socket-factory#1828
jchrys added a commit that referenced this pull request Feb 7, 2024
Motivation:
A NPE was identified when utilizing `SslMode.TUNNEL`, introduced by PR #204. The issue arises when `ConnectionContext#isMariaDb` is invoked from `SslBridgeHandler#isTls13Enabled`, leading to an NPE due to the ConnectionContext not being initialized at that time.

Modification:
We have updated ConnectionContext#isMariaDb to return false if the context has not been initialized, preventing the NPE. (Mainly to restore previous behavior)

Result:
This change addresses the NPE issue, ensuring stability when `SslMode.TUNNEL` is selected. It resolves the problem reported in GoogleCloudPlatform/cloud-sql-jdbc-socket-factory#1828
jchrys added a commit that referenced this pull request Feb 7, 2024
Motivation:
A NPE was identified when utilizing `SslMode.TUNNEL`, introduced by PR #204. The issue arises when `ConnectionContext#isMariaDb` is invoked from `SslBridgeHandler#isTls13Enabled`, leading to an NPE due to the ConnectionContext not being initialized at that time.

Modification:
We have updated ConnectionContext#isMariaDb to return false if the context has not been initialized, preventing the NPE. (Mainly to restore previous behavior)

Result:
This change addresses the NPE issue, ensuring stability when `SslMode.TUNNEL` is selected. It resolves the problem reported in GoogleCloudPlatform/cloud-sql-jdbc-socket-factory#1828
jchrys added a commit that referenced this pull request Feb 7, 2024
Motivation:
A NPE was identified when utilizing `SslMode.TUNNEL`, introduced by PR #204. The issue arises when `ConnectionContext#isMariaDb` is invoked from `SslBridgeHandler#isTls13Enabled`, leading to an NPE due to the ConnectionContext not being initialized at that time.

Modification:
We have updated ConnectionContext#isMariaDb to return false if the context has not been initialized, preventing the NPE. (Mainly to restore previous behavior)

Result:
This change addresses the NPE issue, ensuring stability when `SslMode.TUNNEL` is selected. It resolves the problem reported in GoogleCloudPlatform/cloud-sql-jdbc-socket-factory#1828
jchrys added a commit that referenced this pull request Feb 7, 2024
Motivation:
A NPE was identified when utilizing `SslMode.TUNNEL`, introduced by PR #204. The issue arises when `ConnectionContext#isMariaDb` is invoked from `SslBridgeHandler#isTls13Enabled`, leading to an NPE due to the ConnectionContext not being initialized at that time.

Modification:
We have updated ConnectionContext#isMariaDb to return false if the context has not been initialized, preventing the NPE. (Mainly to restore previous behavior)

Result:
This change addresses the NPE issue, ensuring stability when `SslMode.TUNNEL` is selected.
resolves GoogleCloudPlatform/cloud-sql-jdbc-socket-factory#1828
jchrys added a commit that referenced this pull request Feb 7, 2024
Motivation:
A NPE was identified when utilizing `SslMode.TUNNEL`, introduced by PR #204. The issue arises when `ConnectionContext#isMariaDb` is invoked from `SslBridgeHandler#isTls13Enabled`, leading to an NPE due to the ConnectionContext not being initialized at that time.

Modification:
We have updated ConnectionContext#isMariaDb to return false if the context has not been initialized, preventing the NPE. (Mainly to restore previous behavior)

Result:
This change addresses the NPE issue, ensuring stability when `SslMode.TUNNEL` is selected.
resolves GoogleCloudPlatform/cloud-sql-jdbc-socket-factory#1828
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.

2 participants