Description:
Manual says (in CREATE TABLE section):
"If you specify RAID_TYPE=STRIPED for a MyISAM table, MyISAM will create RAID_CHUNKS subdirectories named 00, 01, 02 in the database directory. "
and also (in DROP DATABASE section):
"All subdirectories that consists of 2 digits (RAID directories) are also removed."
But experience shows that numbering is done in hex:
drwx------ 2 guilhem qq 4096 Feb 3 18:45 00/
drwx------ 2 guilhem qq 4096 Feb 3 18:45 01/
drwx------ 2 guilhem qq 4096 Feb 3 18:45 02/
drwx------ 2 guilhem qq 4096 Feb 3 18:45 03/
drwx------ 2 guilhem qq 4096 Feb 3 18:45 04/
drwx------ 2 guilhem qq 4096 Feb 3 18:45 05/
drwx------ 2 guilhem qq 4096 Feb 3 18:45 06/
drwx------ 2 guilhem qq 4096 Feb 3 18:45 07/
drwx------ 2 guilhem qq 4096 Feb 3 18:45 08/
drwx------ 2 guilhem qq 4096 Feb 3 18:45 09/
drwx------ 2 guilhem qq 4096 Feb 3 18:45 0a/
drwx------ 2 guilhem qq 4096 Feb 3 18:45 0b/
drwx------ 2 guilhem qq 4096 Feb 3 18:45 0c/
drwx------ 2 guilhem qq 4096 Feb 3 18:45 0d/
drwx------ 2 guilhem qq 4096 Feb 3 18:45 0e/
And as a consequence, DROP DATABASE on this db silently fails (I mean that some RAID dirs remain:
[guilhem@gbichot2 mydbraid]$ ll
total 20
drwx------ 2 guilhem qq 4096 Feb 3 18:45 0a/
drwx------ 2 guilhem qq 4096 Feb 3 18:45 0b/
drwx------ 2 guilhem qq 4096 Feb 3 18:45 0c/
drwx------ 2 guilhem qq 4096 Feb 3 18:45 0d/
drwx------ 2 guilhem qq 4096 Feb 3 18:45 0e/
and so database's directory is not removed.
This is unexpected because looking at the SQL shown in "how-to-repeat" (CREATE DATABASE + CREATE TABLE + DROP DATABASE) one predicts that everything will be deleted.
How to repeat:
MASTER> create database mydbraid;
Query OK, 1 row affected (0.00 sec)
MASTER> use mydbraid;
Database changed
MASTER> create table mytableraid (a int) raid_type=1 raid_chunks=15 raid_chunksize=1;
Query OK, 0 rows affected (0.07 sec)
MASTER> drop database mydbraid;
Query OK, 1 row affected (0.00 sec)
Some files remain in directory mydbraid and this one is not removed.
Suggested fix:
Decide if numbering must be done in decimal or hexadecimal.
If it's in hex, change manual and fix DROP DATABASE.
If it's in decimal, fix mysys/raid.cc (RaidFd::Create() function), but first ensure that such change (from hex to decimal) will not break existing setups (those which are numbered in hex): will MyISAM still be able to handle existing hex numbering, even if it creates them in decimal??
Advantage of hex is that it allows 256 chunks.