I don't understand this. I've dropped the table and recreated it multiple times, and it's the same every time. When I run this query:
SELECT * FROM `squares` WHERE MBRContains(PolyFromText('Polygon((-34 166, -34 171, -41 171, -41 166, -34 166))'), `coordinate`);
I'm returned over 250,000 results, which is correct. When I try and alter the query to delete this based on my where clause, like so:
DELETE FROM `squares` WHERE MBRContains(PolyFromText('Polygon((-34 166, -34 171, -41 171, -41 166, -34 166))'), `coordinate`);
MySQL sees fit to only delete a single row at a time. I'm not going to click 'Go' 250K+ times. Why is this? Here's the table structure...
`squares` (
`square_id` int(7) unsigned NOT NULL,
`ref_coord_lat` double(8,6) NOT NULL,
`ref_coord_long` double(9,6) NOT NULL,
`coordinate` point NOT NULL,
PRIMARY KEY (`square_id`),
KEY `ref_coord_lat` (`ref_coord_lat`),
KEY `ref_coord_long` (`ref_coord_long`),
SPATIAL `coordinate` (`coordinate`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
If it's any use, this is MySQL 5.5.27, running on phpMyAdmin 3.5.2.2. Any ideas?