3237
MariaDBERRORNotableGIS / SpatialHIGH confidence

Bounding box geometry needs more points

Production Risk

Low — query error; no data affected.

Why it happens
  1. 1A spatial function that constructs or uses a bounding box received insufficient coordinates.
  2. 2MBR (Minimum Bounding Rectangle) computation requires at least two distinct points.
How to reproduce
trigger — this will error
trigger — this will error
SELECT ST_MakeEnvelope(ST_GeomFromText('POINT(1 1)'), ST_GeomFromText('POINT(1 1)'));

expected output

ERROR 3237 (HY000): Bounding box of geometry has insufficient points.

Fix

Provide two distinct corner points

Provide two distinct corner points
SELECT ST_MakeEnvelope(ST_GeomFromText('POINT(0 0)'), ST_GeomFromText('POINT(1 1)'));

Why this works

The two points must define a non-degenerate bounding rectangle.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 3237 ER_GIS_BOX_NEEDS_MORE_POINTS

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MariaDB errors