1606
MariaDBERRORCommonPartitioningHIGH confidence
Too many values in VALUES IN for LIST COLUMNS partition
Production Risk
Low — the DDL fails; no table is created.
What this means
A VALUES IN tuple in a LIST COLUMNS partition contains more values than there are columns in the partition definition.
Why it happens
- 1The number of values in a VALUES IN tuple does not match the number of columns in the COLUMNS list.
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, 3)) -- 3 values for 2-column list );
expected output
ERROR 1606 (HY000): Number of rows in VALUES must not be greater than number of columns in partition
Fix
Match the number of values to the number of COLUMNS
Match the number of values to the number of COLUMNS
CREATE TABLE t (a INT, b INT) PARTITION BY LIST COLUMNS(a, b) ( PARTITION p0 VALUES IN ((1, 2)) );
Why this works
Each tuple in VALUES IN must have exactly as many elements as columns in the COLUMNS list.
Sources
Official documentation ↗
MySQL 8.0 — 1606 ER_TOO_MANY_VALUES_ERROR
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev