This is a read-only copy of the MariaDB Knowledgebase generated on 2024-12-22. For the latest, interactive version please visit https://mariadb.com/kb/.

Error 3048: Out of range error

Error CodeSQLSTATEErrorDescription
3048ER_STD_OUT_OF_RANGE_ERROROut of range error: %-.256s in function %s.

Possible Causes and Solutions

Function Arguments Outside the Expected Bounds

Functions arguments have an expected range, and this error is returned if this range is exceeded. Follow the documentation for the specific function indicated in the error message. For example, the ST_GeoHash function expects the longitude and latitude parameters to be between -180 and 180. In this case, the longitude argument is invalid:

SELECT ST_GeoHash(181,30,15);                    
ERROR 3048 (HY000): Out of range error: Longitude should be [-180,180] in function ST_GeoHash.

By providing a longitude argument within the expected range, the error is no longer returned:

SELECT ST_GeoHash(180,30,15);
+-----------------------+
| ST_GeoHash(180,30,15) |
+-----------------------+
| xvrfxvrfxvrfxvr       |
+-----------------------+
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.