Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.1.21, 10.0(EOL), 10.1(EOL)
Description
Executing ALTER TABLE ADD CHECK on a partitioned InnoDB table leaves an orphaned .par file behind. To reproduce, execute the following:
drop database if exists orphan_par_test;
|
create database orphan_par_test;
|
use orphan_par_test;
|
drop table if exists t;
|
create table t(id int, d DATE NOT NULL, manual_override BOOL NOT NULL DEFAULT 0, primary key(id,d))
|
PARTITION BY RANGE COLUMNS (d) (
|
PARTITION p20161017 VALUES LESS THAN ('2016-10-18'),
|
PARTITION p20161018 VALUES LESS THAN ('2016-10-19'));
|
ALTER TABLE t ADD CHECK (b IN (0, 1));
|
And then execute the following:
drop database orphan_par_test;
|
The statement will fail with the following error:
MariaDB [orphan_par_test]> drop database orphan_par_test;
|
ERROR 1010 (HY000): Error dropping database (can't rmdir './orphan_par_test', errno: 39 "Directory not empty")
|
And we can see that the directory is non-empty because of the orphaned .par file:
[ec2-user@ip-172-30-0-32 ~]$ sudo ls -l /var/lib/mysql/orphan_par_test/
|
total 4
|
-rw-rw---- 1 mysql mysql 48 Mar 28 19:01 #sql-32a_6.par
|
Attachments
Issue Links
- relates to
-
MDEV-12923 MyISAM allows CHECK constraint violation in ALTER TABLE
- Closed