Bug #88955 Drop partition case a error
Submitted: 18 Dec 2017 8:44 Modified: 18 Dec 2017 12:27
Reporter: hao chang Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DDL Severity:S3 (Non-critical)
Version:5.5/5.6/5.7 OS:Any
Assigned to: CPU Architecture:Any
Tags: partition table

[18 Dec 2017 8:44] hao chang
Description:
Error occurred while attempting to drop table partitions.
The table structure is:
  CREATE TABLE `/a/a` (
    `EXT_DATE_TIME` datetime NOT NULL,
    `ext_ogg_seq` bigint(20) NOT NULL AUTO_INCREMENT,
    KEY `KEY_SEQ` (`EXT_OGG_SEQ`)
    ) PARTITION BY RANGE  COLUMNS(ext_date_time)(
      PARTITION p201708 VALUES LESS THAN ('2017-09-01 00:00:00'), 
      PARTITION p201709 VALUES LESS THAN ('2017-10-01 00:00:00')) ;

Operation is:
alter table `/a/a` drop partition p201708;

How to repeat:
Switch to the test database
sql> use test

sql>  CREATE TABLE `/a/a` (
    `EXT_DATE_TIME` datetime NOT NULL,
    `ext_ogg_seq` bigint(20) NOT NULL AUTO_INCREMENT,
    KEY `KEY_SEQ` (`EXT_OGG_SEQ`)
    ) PARTITION BY RANGE  COLUMNS(ext_date_time)(
      PARTITION p201708 VALUES LESS THAN ('2017-09-01 00:00:00'), 
      PARTITION p201709 VALUES LESS THAN ('2017-10-01 00:00:00')) ;
Query OK, 0 rows affected (3.12 sec)

sql>alter table `/a/a` drop partition p201708;
ERROR 1049 (42000): Unknown database 'test'
[18 Dec 2017 12:27] MySQL Verification Team
Thank you for the bug report. Affected versions 5.5/5.6/5.7 but not 8.0.