You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug#21067378 GEOMETRIC OPERATION RETURNS ERROR INSTEAD OF RESULT
Problem: A query on a geometry column will return an error instead of
a result if there exists a UNIQUE index on the column.
The range optimizer temporarily transforms geometry columns of
specific subtypes to generic geometry columns while using the field
for type transformation. This only happens if the column is of type
MYSQL_TYPE_GEOMETRY and key_part->image_type is Field::itMBR. However,
when there's a spatial index on the column, key_part->image_type is
Field::itRAW, and the column type is not changed to the geometry
supertype. When a value is inserted that doesn't match the subtype, an
error is flagged and the query is aborted.
When the error is avoided, the result is still wrong since the
predicate is not recognized as a spatial operator.
Fix: Temporarily change all geometry columns to the geometry
supertype, regardless of image_type. Add COVERS and COVEREDBY to the
list in is_spatial_operator().
0 commit comments