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

Fix for MariaDB Compatibility with ST_SRID Function #32

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

tkaratug
Copy link
Collaborator

This pull request addresses an issue reported in #31 where MariaDB does not support the second parameter for the ST_SRID() function, as documented here.

The issue caused errors like the following when using the package with Laravel’s MariaDB driver:

SQLSTATE[42000]: Syntax error or access violation:
1582 Incorrect parameter count in the call to native function 'ST_SRID'

Changes Made:

  • Updated the usage of ST_SRID() to exclude the second parameter when the connection is identified as MariaDB.
  • Ensured compatibility across all affected scopes in the HasSpatial trait.

Impact:

This fix resolves compatibility issues with MariaDB and ensures the package functions seamlessly for users relying on MariaDB drivers.

Thank you @jangaraev for your feedback and for highlighting this issue! Your support and use of the package are greatly appreciated.

@frkcn frkcn merged commit b8abe0b into main Dec 9, 2024
24 checks passed
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.

3 participants