I am trying to test a point with in a bounding box. It keeps coming back with null instead of 0 or 1, what is wrong with what I am doing?
SET @g1 = GEOMFROMTEXT('POLYGON(
(-34.139468536232 18.303737037571,-34.139468536232 18.653342962429
,-33.849613463768 18.303737037571,-33.849613463768 18.653342962429))');
SET @g2 = GEOMFROMTEXT('POINT(-33.994541 18.478540)');
SELECT MBRCONTAINS(@g1,@g2);
In your polygon, if I repeat the first point again at the end (to enclose the polygon) it works:
See this SQLfiddle: http://sqlfiddle.com/#!2/d41d8/6663