Bug #88639 ERROR 1030 (HY000): Got error -1 from storage engine on PARTITION CREATE TABLE
Submitted: 24 Nov 2017 7:05 Modified: 27 Nov 2017 9:44
Reporter: Roel Van de Paar (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Partitions Severity:S1 (Critical)
Version:5.6.38/5.7/8.0 OS:Any
Assigned to: CPU Architecture:Any

[24 Nov 2017 7:05] Roel Van de Paar
Description:
5.6.38>CREATE TABLE th (id INT, name VARCHAR(30), adate DATE)
    -> PARTITION BY LIST(YEAR(adate))
    -> (
    ->   PARTITION p1999 VALUES IN (1995, 1999, 2003)
    ->     DATA DIRECTORY = '/var/appdata/95/data'
    ->     INDEX DIRECTORY = '/var/appdata/95/idx',
    ->   PARTITION p2000 VALUES IN (1996, 2000, 2004)
    ->     DATA DIRECTORY = '/var/appdata/96/data'
    ->     INDEX DIRECTORY = '/var/appdata/96/idx',
    ->   PARTITION p2001 VALUES IN (1997, 2001, 2005)
    ->     DATA DIRECTORY = '/var/appdata/97/data'
    ->     INDEX DIRECTORY = '/var/appdata/97/idx',
    ->   PARTITION p2002 VALUES IN (1998, 2002, 2006)
    ->     DATA DIRECTORY = '/var/appdata/98/data'
    ->     INDEX DIRECTORY = '/var/appdata/98/idx'
    -> );
ERROR 1030 (HY000): Got error -1 from storage engine

How to repeat:
CREATE TABLE th (id INT, name VARCHAR(30), adate DATE)
PARTITION BY LIST(YEAR(adate))
(
  PARTITION p1999 VALUES IN (1995, 1999, 2003)
    DATA DIRECTORY = '/var/appdata/95/data'
    INDEX DIRECTORY = '/var/appdata/95/idx',
  PARTITION p2000 VALUES IN (1996, 2000, 2004)
    DATA DIRECTORY = '/var/appdata/96/data'
    INDEX DIRECTORY = '/var/appdata/96/idx',
  PARTITION p2001 VALUES IN (1997, 2001, 2005)
    DATA DIRECTORY = '/var/appdata/97/data'
    INDEX DIRECTORY = '/var/appdata/97/idx',
  PARTITION p2002 VALUES IN (1998, 2002, 2006)
    DATA DIRECTORY = '/var/appdata/98/data'
    INDEX DIRECTORY = '/var/appdata/98/idx'
);

This is the example shown on https://dev.mysql.com/doc/refman/5.7/en/create-table.html 

Suggested fix:
5.5.58 gives "Query OK, 0 rows affected (0.07 sec)"
[27 Nov 2017 9:44] Miguel Solorzano
Thank you for the bug report.