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 release issues #193

Open
tok-88 opened this issue Jul 31, 2018 · 10 comments
Open

MySql 8.0 release issues #193

tok-88 opened this issue Jul 31, 2018 · 10 comments

Comments

@tok-88
Copy link

tok-88 commented Jul 31, 2018

MySql 8.0 has been released and there has definitely been some focus on the spatial functionality.

Most notably to this library GeomFromText and AsBinary has been deprecated. Instead ST_GeomFromText and ST_AsBinary should be used, which are already available in 5.7, so it shouldn't give any BC breaks.

SRID's are also possible to use in MySql now. So implementing some functionality to support them would be very helpful.

I could start on a PR myself, but would like some confirmation that it can be merged in the near future. Haven't seen much activity here lately :-)

@tok-88 tok-88 closed this as completed Aug 7, 2018
@holtkamp
Copy link

holtkamp commented Aug 7, 2018

Guess a PR would be very welcome 🤓 right @djlambert ?

@tok-88 tok-88 reopened this Aug 7, 2018
@holtkamp
Copy link

Related to #190

I think we should proceed, adopt the ST_ prefixed function and tag a new major / breaking release, so no one will get any suprises.

@djlambert still monitoring this library?

@djlambert
Copy link
Member

PRs are always welcomed. They should include tests to be merged.

@holtkamp
Copy link

holtkamp commented Dec 18, 2018

@djlambert thanks for the response.

Regarding #196, not sure how this can be tested more explicitly: the current test-set already covers it... right? However the automated tests fail...

@Alexandre-T
Copy link

I'm searching a way to be compliant with MySQL5.7 and MySQL8.0. If process knows which version is running, it can adapt function and prevent users from breaking. I forked the project last week and I will push a big update tonight to avoid untested functions initially. But the updates which uses protected methods insteadof protected properties open a way to determinates the name of function depending the MySQL server version.

Perhaps, you could have a look on it.

@holtkamp
Copy link

If process knows which version is running, it can adapt function and prevent users from breaking.

Note that MySQL 5.7 also is aware of the ST_ prefixed functions...

@Alexandre-T
Copy link

I'm not sure that MySQL is aware for all ST_ prefixed functions. Did you? When I launch test on my repo, with my old MySQL 5.7 server version, test throws exceptions because ST_GeomFromText is unknown. And MySQL8.0 server version throws exception because GeomFromText is unknown.

DQL queries should respect the OGC Standard. So, now, DQL should use prefixed ST_ version. I think its a good strategy to target the OGC Standard with DQL. I already updated the Abstract Platform like in doctrine/dbal. Abstract platform detects the server version and now, the DQL are the same for Postgresql, Mysql5 and Mysql8, but the core of the doctrine spatial lib will create the SQL query with the function known by its server. It will be very easy to deploy solutions for MariaDB and Microsoft SQL Server.

@holtkamp
Copy link

I'm not sure that MySQL is aware for all ST_ prefixed functions. Did you? When I launch test on my repo, with my old MySQL 5.7 server version, test throws exceptions because ST_GeomFromText is unknown. And MySQL8.0 server version throws exception because GeomFromText is unknown.

Aah, no, was not sure as well, that makes it a good thing to have these tests in place 👍

Still on vacation, so this was a quick comment without further research, sorry 😄

Your suggested approach seems very flexible, thumbs up!

@mcanepa
Copy link

mcanepa commented Aug 26, 2020

Please, release an update to solve this issue

@mareksuscak
Copy link

I'm not sure that MySQL is aware for all ST_ prefixed functions. Did you? When I launch test on my repo, with my old MySQL 5.7 server version, test throws exceptions because ST_GeomFromText is unknown. And MySQL8.0 server version throws exception because GeomFromText is unknown.

DQL queries should respect the OGC Standard. So, now, DQL should use prefixed ST_ version. I think its a good strategy to target the OGC Standard with DQL. I already updated the Abstract Platform like in doctrine/dbal. Abstract platform detects the server version and now, the DQL are the same for Postgresql, Mysql5 and Mysql8, but the core of the doctrine spatial lib will create the SQL query with the function known by its server. It will be very easy to deploy solutions for MariaDB and Microsoft SQL Server.

According to the official documentation, ST_GeomFromText should be available in MySQL 5.7:
https://dev.mysql.com/doc/refman/5.7/en/gis-wkt-functions.html#function_st-geomfromtext

@planet17 planet17 mentioned this issue Aug 2, 2023
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

No branches or pull requests

6 participants