Description:
I'm using mysql-6.0-backup.
I create a MyISAM table with INDEX DIRECTORY clause.
I alter the table to InnoDB.
The INDEX DIRECTORY clause disappears.
I create a partitioned MyISAM table with INDEX DIRECTORY clauses.
I alter the table to InnoDB.
The INDEX DIRECTORY clauses do not disappear.
I believe that's not intentional behaviour.
How to repeat:
mysql> create table t1 (s1 int) index directory '/usr/local/mysql/var';
Query OK, 0 rows affected (0.11 sec)
mysql> show create table t1;
+-------+--------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+--------------------------------------------------------------------------------------------------------------------------------+
| t1 | CREATE TABLE `t1` (
`s1` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 INDEX DIRECTORY='/usr/local/mysql/var/' |
+-------+--------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> alter table t1 engine=innodb;
Query OK, 0 rows affected (0.09 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> show create table t1;
+-------+----------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+----------------------------------------------------------------------------------------+
| t1 | CREATE TABLE `t1` (
`s1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
+-------+----------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> create table t2 (s1 int) partition by list (s1) (partition p1 values in (1) index directory '/usr/local/mysql/var');
Query OK, 0 rows affected (0.14 sec)
mysql> show create table t2;
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| t2 | CREATE TABLE `t2` (
`s1` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (s1) (PARTITION p1 VALUES IN (1) INDEX DIRECTORY = '/usr/local/mysql/var' ENGINE = MyISAM) */ |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)
mysql> alter table t2 engine=innodb;
Query OK, 0 rows affected (0.13 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> show create table t2;
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| t2 | CREATE TABLE `t2` (
`s1` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (s1) (PARTITION p1 VALUES IN (1) INDEX DIRECTORY = '/usr/local/mysql/var' ENGINE = InnoDB) */ |
+-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)