You are using a deprecated geometry function that will be removed in future MySQL versions.
MySQL error 3196 ER_WARN_USING_GEOMFROMWKB_TO_SET_SRID warns that functions like ST_GeomFromWKB(wkb,srid) are deprecated. Switch to ST_SRID(geometry,srid) or use ST_GeomFromWKB(wkb) and then SET_SRID for long-term compatibility.
ER_WARN_USING_GEOMFROMWKB_TO_SET_SRID
MySQL raises warning 3196 when you call legacy geometry constructors such as ST_GeomFromWKB(wkb,srid) or GeomFromText(text,srid). These overloads both build the geometry object and assign a Spatial Reference System Identifier (SRID) in one step.
Beginning in MySQL 5.7.19 these overloads are marked deprecated. The server suggests replacing them with the new two-step pattern: create the geometry, then set its SRID with ST_SRID or ST_SetSRID. Future versions will remove the old signature entirely, so ignoring the warning risks breakage after an upgrade.
Although 3196 is a warning today, MySQL plans to drop the deprecated overloads. Queries, views, and stored routines that rely on them will fail with an error once removed. Refactoring now guarantees forward compatibility and avoids emergency hot-fixes during a version upgrade.
The warning appears whenever MySQL parses an expression that combines geometry construction and SRID assignment in one call. Typical triggers include ST_GeomFromWKB(wkb,4326), GeomFromText('POINT(0 0)',3857), or similar functions wrapped in GIS workflows, import scripts, ORMs, and migrations.
Running with SQL_MODE that includes STRICT can escalate the warning to an error. Automated test pipelines frequently break after enabling STRICT_ALL_TABLES because the same calls now abort execution.
Rewrite affected statements to use the modern two-step approach. First build the geometry without SRID, then call ST_SRID(geometry, srid) or ST_SetSRID(geometry,srid).
Updating application queries, stored procedures, and migrations removes the warning and future-proofs your code base.
Data import scripts often bulk-insert WKB blobs with SRID in a single call. Replace the legacy function inside the INSERT SELECT or LOAD DATA statement with the new pattern.
Spatial indexes on geometry columns require a consistent SRID. Ensure triggers or application layers that populate the column follow the two-step method to avoid silent SRID mismatch.
Adopt MySQL 8 GIS syntax in all new code: use ST_PointFromWKB or ST_GeomFromText without SRID, then ST_SRID to assign. Store examples in Galaxy Collections so your team reuses the modern pattern.
Enable deprecation_warnings log in staging to surface issues early. Galaxy’s AI copilot will flag outdated functions in code reviews and suggest compliant replacements.
Error 1367 Illegal non-geometry argument to function - occurs when SRID functions receive invalid types. Validate inputs before calling ST_SRID.
Error 3088 ER_WRONG_SRID_FOR_COLUMN - raised when inserting geometry with mismatched SRID. Use ST_SRID(geom, column_srid) to align.
Older applications written before MySQL 5.7 often embed deprecated signatures.
Certain versions of Hibernate Spatial and older PHP GIS libraries still output the old overload.
Custom ETL scripts may call ST_GeomFromWKB with SRID for performance and now trigger the warning.
Generic warning for other deprecated functions that will be removed.
Error 3088 when SRID of geometry does not match the target column SRID.
Error 3037 indicates malformed WKB or WKT input.
No, it is non-fatal unless you run in strict SQL mode, but it will turn into an error in future releases.
The warning was introduced in MySQL 5.7.19. All later 5.7 and 8.0 versions emit it.
Yes, ST_SRID(geometry, srid) exists in 5.7.19+, so you can migrate without upgrading major versions.
Galaxy’s AI copilot autocompletes modern GIS functions and flags deprecated ones during review, helping teams migrate quickly.