I’ve added a POINT column to a rather large existing table. I had to set it null initially as required by MySQL. I then executed successfully:
update geoloc set geoPoint = ST_SRID( POINT( 0, 0 ), 4326)
Next, when I tried to add a spatial index to this column, I got
ERROR 1252: All parts of a SPATIAL index must be NOT NULL
I tried “SELECT * from geoloc where geoPoint is null” and got 0 results.
So there are no null values in the column, but the index fails telling me I can’t have a null. What am I missing?
Jerry Malcolm is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.