Skip to content

MySql 8.0 release issues #193

@tok-88

Description

@tok-88

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 :-)

Activity

holtkamp

holtkamp commented on Aug 7, 2018

@holtkamp

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

reopened this on Aug 7, 2018
holtkamp

holtkamp commented on Dec 15, 2018

@holtkamp

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

djlambert commented on Dec 17, 2018

@djlambert
Member

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

holtkamp

holtkamp commented on Dec 18, 2018

@holtkamp

@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

Alexandre-T commented on Feb 26, 2020

@Alexandre-T

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

holtkamp commented on Feb 28, 2020

@holtkamp

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

Alexandre-T commented on Feb 28, 2020

@Alexandre-T

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

holtkamp commented on Feb 28, 2020

@holtkamp

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

mcanepa commented on Aug 26, 2020

@mcanepa

Please, release an update to solve this issue

mareksuscak

mareksuscak commented on Oct 27, 2020

@mareksuscak

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @mareksuscak@holtkamp@djlambert@Alexandre-T@mcanepa

        Issue actions

          MySql 8.0 release issues · Issue #193 · creof/doctrine2-spatial