DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (id INTEGER NOT NULL, name VARCHAR(30), adate DATE)
PARTITION BY LIST(YEAR(adate))
(
PARTITION p1999 VALUES IN (1995, 1999, 2003)
DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/tc_partition_list_directory/p1999/data'
    INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp/tc_partition_list_directory/p1999/idx',
PARTITION p2000 VALUES IN (1996, 2000, 2004)
DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/tc_partition_list_directory/p2000/data'
    INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp/tc_partition_list_directory/p2000/idx',
PARTITION p2001 VALUES IN (1997, 2001, 2005)
DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp/tc_partition_list_directory/p2001/data'
    INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp/tc_partition_list_directory/p2001/idx'
);
INSERT INTO t1 VALUES(1,'abc','1994-01-01');
ERROR HY000: Table has no partition for value 1994
INSERT INTO t1 VALUES(2,'abc','1995-01-01');
INSERT INTO t1 VALUES(3,'abc','1996-01-01');
INSERT INTO t1 VALUES(4,'abc','1997-01-01');
INSERT INTO t1 VALUES(5,'abc','1998-01-01');
ERROR HY000: Table has no partition for value 1998
INSERT INTO t1 VALUES(6,'abc','1999-01-01');
INSERT INTO t1 VALUES(7,'abc','2000-01-01');
INSERT INTO t1 VALUES(8,'abc','2001-01-01');
INSERT INTO t1 VALUES(9,'abc','2002-01-01');
ERROR HY000: Table has no partition for value 2002
INSERT INTO t1 VALUES(10,'abc','2003-01-01');
INSERT INTO t1 VALUES(11,'abc','2004-01-01');
INSERT INTO t1 VALUES(12,'abc','2005-01-01');
INSERT INTO t1 VALUES(13,'abc','2006-01-01');
ERROR HY000: Table has no partition for value 2006
DROP TABLE t1;
