1283
MariaDBerrorddlhigh confidence

Inconsistency in usage of column lists for partitioning

Production Risk

Low — DDL fails; no data affected.

What this means

COLUMNS partitioning was specified but the column list is inconsistent — for example mixing RANGE COLUMNS with a non-column expression.

Why it happens
  1. 1Using PARTITION BY RANGE COLUMNS with expressions instead of plain column names
  2. 2Mismatch between column list lengths in different PARTITION definitions
How to reproduce
trigger — this will error
trigger — this will error
CREATE TABLE t (a INT) PARTITION BY RANGE COLUMNS(a+1) (PARTITION p0 VALUES LESS THAN (10));

expected output

ERROR 1283 (HY000): Inconsistency in usage of column lists for partitioning

Fix

Use plain column references

Use plain column references
CREATE TABLE t (a INT) PARTITION BY RANGE COLUMNS(a) (PARTITION p0 VALUES LESS THAN (10));

Why this works

RANGE/LIST COLUMNS requires bare column names, not expressions.

What not to do

Version notes

Sources
Official documentation ↗

MySQL 8.0 — 1283 ER_PARTITION_COLUMN_LIST_ERROR

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

← All MariaDB errors