Bug #1662 ALTER TABLE LIKE ignores DATA/INDEX DIRECTPORY
Submitted: 25 Oct 2003 8:11 Modified: 11 Jul 2006 9:23
Reporter: Victor Vagin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S3 (Non-critical)
Version:4.0 OS:
Assigned to: Sergey Vojtovich CPU Architecture:Any

[25 Oct 2003 8:11] Victor Vagin
Description:
mysql> create table a (a int) MAX_ROWS 12  DATA DIRECTORY ='/home/vva/work/BUG_1317/tmp/' ;
Query OK, 0 rows affected (0.02 sec)

mysql> show create table a;
+-------+--------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                         |
+-------+--------------------------------------------------------------------------------------------------------------------------------------+
| a     | CREATE TABLE `a` (
  `a` int(11) default NULL
) TYPE=MyISAM CHARSET=latin1 MAX_ROWS=12 DATA DIRECTORY='/home/vva/work/BUG_1317/tmp/' |
+-------+--------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)

mysql>
mysql> alter table a DATA DIRECTORY ='/home/vva/work/BUG_1317/tmp2/' MAX_ROWS 11;
Query OK, 0 rows affected (0.03 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> show create table a;
+-------+--------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table                                                                                                                         |
+-------+--------------------------------------------------------------------------------------------------------------------------------------+
| a     | CREATE TABLE `a` (
  `a` int(11) default NULL
) TYPE=MyISAM CHARSET=latin1 MAX_ROWS=11 DATA DIRECTORY='/home/vva/work/BUG_1317/tmp/' |
+-------+--------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)

How to repeat:
create table a (a int) MAX_ROWS 12  DATA DIRECTORY ='/home/vva/work/BUG_1317/tmp/' ;
show create table a;

alter table a DATA DIRECTORY ='/home/vva/work/BUG_1317/tmp2/' MAX_ROWS 11;
show create table a;
[25 Oct 2003 8:12] Victor Vagin
typo fixed
[12 Dec 2003 9:36] Michael Widenius
This is alreay documented as not yet done fature in the symbolic link section in the manual.
[14 May 2006 19:03] Hartmut Holzgraefe
Shouldn't this produce a warning then in 4.1 and above?
[26 Jun 2006 12:31] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/8241
[27 Jun 2006 10:17] Alexander Barkov
The patch looks ok to push.
[27 Jun 2006 10:30] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/8306
[27 Jun 2006 18:16] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/8343
[8 Jul 2006 17:50] Ingo Strüwing
Pushed to 5.1.12 and 5.0.24.
[10 Jul 2006 7:17] Ingo Strüwing
Produce a warning if DATA/INDEX DIRECTORY is specified in
  ALTER TABLE statement.
  
  Ignoring of these options is documented in the symbolic links
  section of the manual.

This will probably not be pushed to 4.x.
[10 Jul 2006 7:31] Ingo Strüwing
Sorry, my fault. It had been pushed to 4.1.20 already.
[11 Jul 2006 9:23] MC Brown
Already documented in the "alter-table" section of the manual. No further additions.