1992
MariaDBWARNINGCriticalSchemaHIGH confidence

Converting column to a different type

Production Risk

Low — schema may differ from intention; existing data is unaffected.

What this means

MySQL automatically converted a column definition to a different but compatible type during a CREATE TABLE or ALTER TABLE. For example, a CHAR column too wide may be silently promoted to TEXT.

Why it happens
  1. 1Column length exceeds the maximum for the requested type.
  2. 2Implicit type promotion rules triggered by the storage engine or character set.
  3. 3Creating a column with a type that the storage engine normalises.
How to reproduce
trigger — this will error
trigger — this will error
CREATE TABLE t (col CHAR(300));

expected output

Warning 1292: Incorrect datetime value. (similar auto-convert warning for other types)

Fix 1

Use the intended type explicitly to avoid silent promotion

Use the intended type explicitly to avoid silent promotion
CREATE TABLE t (col TEXT); -- if large text is needed

Why this works

Explicit typing prevents unexpected schema changes.

Fix 2

Review SHOW WARNINGS after DDL

Review SHOW WARNINGS after DDL
SHOW WARNINGS;

Why this works

Auto-convert warnings are surfaced here.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 1992 ER_AUTO_CONVERT

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

← All MariaDB errors