3224
MariaDBERRORNotablePartitioningHIGH confidence

Duplicate constant value in LIST partition definition

Production Risk

Low — DDL error.

Why it happens
  1. 1The same constant value appears in more than one partition's VALUES IN list.
  2. 2LIST partitioning requires each value to belong to exactly one partition.
How to reproduce
trigger — this will error
trigger — this will error
CREATE TABLE t1 (id INT) PARTITION BY LIST(id) (PARTITION p1 VALUES IN (1,2), PARTITION p2 VALUES IN (2,3));

expected output

ERROR 3224 (HY000): Multiple definition of same constant in list partitioning.

Fix

Remove duplicate values from partition definitions

Remove duplicate values from partition definitions
CREATE TABLE t1 (id INT) PARTITION BY LIST(id) (PARTITION p1 VALUES IN (1,2), PARTITION p2 VALUES IN (3,4));

Why this works

Each value must appear in exactly one partition's VALUES IN list.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 3224 ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR

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

← All MariaDB errors