1603
MariaDBERRORNotablePartitioningHIGH confidence

Wrong type for column value in partition definition

Production Risk

Low — the DDL fails; no table is created.

What this means

A partition boundary value has a type that does not match the corresponding COLUMNS partition column type.

Why it happens
  1. 1Specifying a string boundary value for an integer COLUMNS partition column.
  2. 2Type mismatch between partition boundary literals and column definitions.
How to reproduce
trigger — this will error
trigger — this will error
CREATE TABLE t (id INT)
PARTITION BY RANGE COLUMNS(id)
(PARTITION p0 VALUES LESS THAN ('ten')); -- string for INT column

expected output

ERROR 1603 (HY000): Wrong type of column/partition value for partition function

Fix

Use boundary values matching the column type

Use boundary values matching the column type
CREATE TABLE t (id INT)
PARTITION BY RANGE COLUMNS(id)
(PARTITION p0 VALUES LESS THAN (10));

Why this works

Partition boundary values must be literals compatible with the corresponding partition column type.

Sources
Official documentation ↗

MySQL 8.0 — 1603 ER_WRONG_TYPE_COLUMN_VALUE_ERROR

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

← All MariaDB errors