On 2020-09-01 19:24, Nikolaos Pringouris wrote:
Hi All,
A couple of years ago I worked on jdbc-mysql module and provided support
for the newly introduced ST_ functions in Mysql5.6 & Mysql 5.7. I think
these functions are also supported in Mysql8.0 with the same signature
so I do not think there is an issue of incompatibility.
the problem is the code uses old/removed functions in several places
If you check the
Data Store factory for Mysql (MySQLDataStoreFactory) you will see that
there is a static function isMySqlVersion56(...) which is called during
creation of the dataStore and if figures out that mysql 5.6 or above is
used in enables enhancedSpatialSupport flag automatically and the use of
the corresponding ST_ functions (check also
visitBinarySpatialOperatorEnhanced(...) function in MySQLFilterToSQL
class).
this would/my have worked for 5.7, but not 8 as the old functions have
been removed, this code:
https://github.com/geotools/geotools/blob/3496184670f6bb5a7b3af877fed3f312ce86f9a2/modules/plugin/jdbc/jdbc-mysql/src/main/java/org/geotools/data/mysql/MySQLDialect.java#L225-L238
simply fails with a database error that function asWKB does not exist
same for
https://github.com/geotools/geotools/blob/3496184670f6bb5a7b3af877fed3f312ce86f9a2/modules/plugin/jdbc/jdbc-mysql/src/main/java/org/geotools/data/mysql/MySQLDialectPrepared.java#L194-L205
I can add the enhanced flag around those as a quick scan of the code
seems that it's limited to these instances. maybe this was an oversight
when a different dev worked on the code and didn't know about that flag,
(suggesting the design could be improved)
Of course mysql 8.0 may have additional spatial features (to be honest I
am still using version 5.7.x in my geotools related projects) and
probably the mysql module can still be improved but I am pretty sure
that the module will still be functional when the underline Mysql DB is
v8.0 (in addition to 5.5, 5.6, 5.7).
I don't see any point in supporting 5.5 (EOL December 2018) as it is no
longer part of the support matrix, if you want to use an unsupported
database software you can use an old version of geotools/geoserver as
well IMO.
5.6 will be EOL in a few months (February, 2021)
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel