1607
MySQLERRORCommonPartitioningHIGH confidence

Row-based VALUES IN requires parenthesized tuple

Production Risk

Low — the DDL fails; no table is created.

What this means

In a multi-column LIST COLUMNS partition, each VALUES IN element must be a parenthesized tuple, not a bare value.

Why it happens
  1. 1Using bare values in VALUES IN for a multi-column COLUMNS partition instead of tuples.
How to reproduce
trigger — this will error
trigger — this will error
CREATE TABLE t (a INT, b INT)
PARTITION BY LIST COLUMNS(a, b) (
  PARTITION p0 VALUES IN (1, 2) -- should be (1, 2) as tuple
);

expected output

ERROR 1607 (HY000): Row expressions in VALUES IN only allowed for multi-field column partitioning

Fix

Wrap each value set in parentheses

Wrap each value set in parentheses
CREATE TABLE t (a INT, b INT)
PARTITION BY LIST COLUMNS(a, b) (
  PARTITION p0 VALUES IN ((1, 2), (3, 4))
);

Why this works

Multi-column LIST COLUMNS partitions require each value set to be a parenthesized row expression.

Sources
Official documentation ↗

MySQL 8.0 — 1607 ER_ROW_SINGLE_PARTITION_FIELD_ERROR

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

← All MySQL errors