List:Commits« Previous MessageNext Message »
From:kevin.lewis Date:April 19 2012 10:41pm
Subject:bzr push into mysql-trunk branch (kevin.lewis:3883 to 3885)
View as plain text  
 3885 kevin.lewis@stripped	2012-04-19
      Local commit.  Another try at fixing PB2 regressions.

    modified:
      mysql-test/suite/innodb/r/innodb-restart.result
      mysql-test/suite/innodb/r/innodb-tablespace.result
      mysql-test/suite/innodb/t/innodb-restart.test
      mysql-test/suite/innodb/t/innodb-tablespace.test
      mysql-test/suite/parts/r/partition_basic_symlink_innodb.result
      mysql-test/suite/parts/t/partition_basic_symlink_innodb.test
      sql/ha_partition.cc
      sql/sql_partition.cc
 3884 kevin.lewis@stripped	2012-04-18
      In order to fix a problem with partition_not_windows.test
      the data directory path for a partition is now fixed in the
      partition handler instead of when it is moved to the
      SHOW CREATE TABLE string.

    modified:
      sql/ha_partition.cc
      sql/ha_partition.h
 3883 kevin.lewis@stripped	2012-04-17
      Fix another PB2 problem in main.partition_not_windows.test

    modified:
      sql/sql_partition.cc
=== modified file 'mysql-test/suite/innodb/r/innodb-restart.result'
--- a/mysql-test/suite/innodb/r/innodb-restart.result	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/innodb/r/innodb-restart.result	revid:kevin.lewis@stripped
@@ -455,9 +455,11 @@ MYSQL_TMP_DIR/alt_dir/test/t7#p#p1#sp#s2
 MYSQL_TMP_DIR/alt_dir/test/t7#p#p1#sp#s3.ibd
 INSERT INTO t5 VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
 INSERT INTO t5 (SELECT 0, c2, c3, c4, c5 FROM t5);
+INSERT INTO t5 (SELECT 0, c2, c3, c4, c5 FROM t5);
+INSERT INTO t5 (SELECT 0, c2, c3, c4, c5 FROM t5);
 SELECT count(*) FROM t5;
 count(*)
-2
+8
 SHOW CREATE TABLE t5;
 Table	Create Table
 t5	CREATE TABLE `t5` (
@@ -467,12 +469,10 @@ t5	CREATE TABLE `t5` (
   `c4` date DEFAULT NULL,
   `c5` text,
   PRIMARY KEY (`c1`)
-) ENGINE=InnoDB AUTO_INCREMENT=1000000002 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
-INSERT INTO t6 (SELECT 0, c2, c3, c4, c5 FROM t6);
-INSERT INTO t6 (SELECT 0, c2, c3, c4, c5 FROM t6);
+) ENGINE=InnoDB AUTO_INCREMENT=1000000012 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
 SELECT count(*) FROM t6;
 count(*)
-84
+21
 SHOW CREATE TABLE t6;
 Table	Create Table
 t6	CREATE TABLE `t6` (
@@ -482,15 +482,14 @@ t6	CREATE TABLE `t6` (
   `c4` date DEFAULT NULL,
   `c5` text,
   PRIMARY KEY (`c1`)
-) ENGINE=InnoDB AUTO_INCREMENT=95 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
+) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
 /*!50100 PARTITION BY HASH (c1)
 (PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
  PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
  PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB) */
-INSERT INTO t7 (SELECT 0, c2, c3, c4, c5 FROM t7);
 SELECT count(*) FROM t7;
 count(*)
-18
+9
 SHOW CREATE TABLE t7;
 Table	Create Table
 t7	CREATE TABLE `t7` (
@@ -500,7 +499,7 @@ t7	CREATE TABLE `t7` (
   `c4` date DEFAULT NULL,
   `c5` text,
   PRIMARY KEY (`c1`)
-) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
 /*!50100 PARTITION BY RANGE (c1)
 SUBPARTITION BY HASH (c1)
 (PARTITION p0 VALUES LESS THAN (10)
@@ -525,10 +524,9 @@ MYSQL_TMP_DIR/alt_dir/test/t7#p#p0#sp#s0
 MYSQL_TMP_DIR/alt_dir/test/t7#p#p0#sp#s1.ibd
 MYSQL_TMP_DIR/alt_dir/test/t7#p#p1#sp#s2.ibd
 MYSQL_TMP_DIR/alt_dir/test/t7#p#p1#sp#s3.ibd
-INSERT INTO t5 (SELECT 0, c2, c3, c4, c5 FROM t5);
 SELECT count(*) FROM t5;
 count(*)
-4
+8
 SHOW CREATE TABLE t5;
 Table	Create Table
 t5	CREATE TABLE `t5` (
@@ -538,11 +536,10 @@ t5	CREATE TABLE `t5` (
   `c4` date DEFAULT NULL,
   `c5` text,
   PRIMARY KEY (`c1`)
-) ENGINE=InnoDB AUTO_INCREMENT=1000000005 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
-INSERT INTO t6 (SELECT 0, c2, c3, c4, c5 FROM t6);
+) ENGINE=InnoDB AUTO_INCREMENT=1000000009 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
 SELECT count(*) FROM t6;
 count(*)
-168
+21
 SHOW CREATE TABLE t6;
 Table	Create Table
 t6	CREATE TABLE `t6` (
@@ -552,15 +549,14 @@ t6	CREATE TABLE `t6` (
   `c4` date DEFAULT NULL,
   `c5` text,
   PRIMARY KEY (`c1`)
-) ENGINE=InnoDB AUTO_INCREMENT=179 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
+) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
 /*!50100 PARTITION BY HASH (c1)
 (PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
  PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
  PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB) */
-INSERT INTO t7 (SELECT 0, c2, c3, c4, c5 FROM t7);
 SELECT count(*) FROM t7;
 count(*)
-36
+9
 SHOW CREATE TABLE t7;
 Table	Create Table
 t7	CREATE TABLE `t7` (
@@ -570,7 +566,7 @@ t7	CREATE TABLE `t7` (
   `c4` date DEFAULT NULL,
   `c5` text,
   PRIMARY KEY (`c1`)
-) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
 /*!50100 PARTITION BY RANGE (c1)
 SUBPARTITION BY HASH (c1)
 (PARTITION p0 VALUES LESS THAN (10)
@@ -644,7 +640,7 @@ MYSQL_TMP_DIR/alt_dir/test/t77#p#p1#sp#s
 INSERT INTO t55 (SELECT 0, c2, c3, c4, c5 FROM t55);
 SELECT count(*) FROM t55;
 count(*)
-8
+16
 SHOW CREATE TABLE t55;
 Table	Create Table
 t55	CREATE TABLE `t55` (
@@ -654,11 +650,11 @@ t55	CREATE TABLE `t55` (
   `c4` date DEFAULT NULL,
   `c5` text,
   PRIMARY KEY (`c1`)
-) ENGINE=InnoDB AUTO_INCREMENT=1000000012 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
+) ENGINE=InnoDB AUTO_INCREMENT=1000000024 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
 INSERT INTO t66 (SELECT 0, c2, c3, c4, c5 FROM t66);
 SELECT count(*) FROM t66;
 count(*)
-336
+42
 SHOW CREATE TABLE t66;
 Table	Create Table
 t66	CREATE TABLE `t66` (
@@ -668,7 +664,7 @@ t66	CREATE TABLE `t66` (
   `c4` date DEFAULT NULL,
   `c5` text,
   PRIMARY KEY (`c1`)
-) ENGINE=InnoDB AUTO_INCREMENT=347 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
+) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
 /*!50100 PARTITION BY HASH (c1)
 (PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
  PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
@@ -676,7 +672,7 @@ t66	CREATE TABLE `t66` (
 INSERT INTO t77 (SELECT 0, c2, c3, c4, c5 FROM t77);
 SELECT count(*) FROM t77;
 count(*)
-72
+18
 SHOW CREATE TABLE t77;
 Table	Create Table
 t77	CREATE TABLE `t77` (
@@ -686,7 +682,7 @@ t77	CREATE TABLE `t77` (
   `c4` date DEFAULT NULL,
   `c5` text,
   PRIMARY KEY (`c1`)
-) ENGINE=InnoDB AUTO_INCREMENT=73 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
 /*!50100 PARTITION BY RANGE (c1)
 SUBPARTITION BY HASH (c1)
 (PARTITION p0 VALUES LESS THAN (10)
@@ -714,7 +710,7 @@ MYSQL_TMP_DIR/alt_dir/test/t77#p#p1#sp#s
 INSERT INTO t55 (SELECT 0, c2, c3, c4, c5 FROM t55);
 SELECT count(*) FROM t55;
 count(*)
-16
+32
 SHOW CREATE TABLE t55;
 Table	Create Table
 t55	CREATE TABLE `t55` (
@@ -724,11 +720,11 @@ t55	CREATE TABLE `t55` (
   `c4` date DEFAULT NULL,
   `c5` text,
   PRIMARY KEY (`c1`)
-) ENGINE=InnoDB AUTO_INCREMENT=1000000024 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
+) ENGINE=InnoDB AUTO_INCREMENT=1000000048 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
 INSERT INTO t66 (SELECT 0, c2, c3, c4, c5 FROM t66);
 SELECT count(*) FROM t66;
 count(*)
-672
+84
 SHOW CREATE TABLE t66;
 Table	Create Table
 t66	CREATE TABLE `t66` (
@@ -738,7 +734,7 @@ t66	CREATE TABLE `t66` (
   `c4` date DEFAULT NULL,
   `c5` text,
   PRIMARY KEY (`c1`)
-) ENGINE=InnoDB AUTO_INCREMENT=683 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
+) ENGINE=InnoDB AUTO_INCREMENT=95 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
 /*!50100 PARTITION BY HASH (c1)
 (PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
  PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
@@ -746,7 +742,7 @@ t66	CREATE TABLE `t66` (
 INSERT INTO t77 (SELECT 0, c2, c3, c4, c5 FROM t77);
 SELECT count(*) FROM t77;
 count(*)
-144
+36
 SHOW CREATE TABLE t77;
 Table	Create Table
 t77	CREATE TABLE `t77` (
@@ -756,7 +752,7 @@ t77	CREATE TABLE `t77` (
   `c4` date DEFAULT NULL,
   `c5` text,
   PRIMARY KEY (`c1`)
-) ENGINE=InnoDB AUTO_INCREMENT=145 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
 /*!50100 PARTITION BY RANGE (c1)
 SUBPARTITION BY HASH (c1)
 (PARTITION p0 VALUES LESS THAN (10)
@@ -794,7 +790,7 @@ t77#p#p0#sp#s0.ibd
 t77#p#p0#sp#s1.ibd
 t77#p#p1#sp#s2.ibd
 t77#p#p1#sp#s3.ibd
-FLUSH TABLE t55,t66 WITH READ LOCK;
+FLUSH TABLE t55,t66,t77 WITH READ LOCK;
 # Moving tablespaces from MYSQL_TMP_DIR/alt_dir to MYSQL_TMP_DIR/new_dir
 UNLOCK TABLES;
 ---- MYSQLD_DATADIR/test
@@ -837,7 +833,7 @@ MYSQL_TMP_DIR/new_dir/test/t77#p#p1#sp#s
 INSERT INTO t55 (SELECT 0, c2, c3, c4, c5 FROM t55);
 SELECT count(*) FROM t55;
 count(*)
-32
+64
 SHOW CREATE TABLE t55;
 Table	Create Table
 t55	CREATE TABLE `t55` (
@@ -847,11 +843,11 @@ t55	CREATE TABLE `t55` (
   `c4` date DEFAULT NULL,
   `c5` text,
   PRIMARY KEY (`c1`)
-) ENGINE=InnoDB AUTO_INCREMENT=1000000048 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/new_dir/'
+) ENGINE=InnoDB AUTO_INCREMENT=1000000096 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC DATA DIRECTORY='MYSQL_TMP_DIR/new_dir/'
 INSERT INTO t66 (SELECT 0, c2, c3, c4, c5 FROM t66);
 SELECT count(*) FROM t66;
 count(*)
-1344
+168
 SHOW CREATE TABLE t66;
 Table	Create Table
 t66	CREATE TABLE `t66` (
@@ -861,7 +857,7 @@ t66	CREATE TABLE `t66` (
   `c4` date DEFAULT NULL,
   `c5` text,
   PRIMARY KEY (`c1`)
-) ENGINE=InnoDB AUTO_INCREMENT=1355 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
+) ENGINE=InnoDB AUTO_INCREMENT=179 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
 /*!50100 PARTITION BY HASH (c1)
 (PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/new_dir' ENGINE = InnoDB,
  PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/new_dir' ENGINE = InnoDB,
@@ -869,7 +865,7 @@ t66	CREATE TABLE `t66` (
 INSERT INTO t77 (SELECT 0, c2, c3, c4, c5 FROM t77);
 SELECT count(*) FROM t77;
 count(*)
-288
+72
 SHOW CREATE TABLE t77;
 Table	Create Table
 t77	CREATE TABLE `t77` (
@@ -879,7 +875,7 @@ t77	CREATE TABLE `t77` (
   `c4` date DEFAULT NULL,
   `c5` text,
   PRIMARY KEY (`c1`)
-) ENGINE=InnoDB AUTO_INCREMENT=289 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+) ENGINE=InnoDB AUTO_INCREMENT=73 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
 /*!50100 PARTITION BY RANGE (c1)
 SUBPARTITION BY HASH (c1)
 (PARTITION p0 VALUES LESS THAN (10)
@@ -917,7 +913,7 @@ t77#p#p0#sp#s0.ibd
 t77#p#p0#sp#s1.ibd
 t77#p#p1#sp#s2.ibd
 t77#p#p1#sp#s3.ibd
-FLUSH TABLE t55 WITH READ LOCK;
+FLUSH TABLE t55,t66,t77 WITH READ LOCK;
 # Moving tablespaces from MYSQL_TMP_DIR/new_dir to MYSQLD_DATADIR
 UNLOCK TABLES;
 ---- MYSQLD_DATADIR/test
@@ -960,7 +956,7 @@ MYSQLD_DATADIR/test/t77#p#p1#sp#s3.ibd
 INSERT INTO t55 (SELECT 0, c2, c3, c4, c5 FROM t55);
 SELECT count(*) FROM t55;
 count(*)
-64
+128
 SHOW CREATE TABLE t55;
 Table	Create Table
 t55	CREATE TABLE `t55` (
@@ -970,11 +966,11 @@ t55	CREATE TABLE `t55` (
   `c4` date DEFAULT NULL,
   `c5` text,
   PRIMARY KEY (`c1`)
-) ENGINE=InnoDB AUTO_INCREMENT=1000000096 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+) ENGINE=InnoDB AUTO_INCREMENT=1000000192 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
 INSERT INTO t66 (SELECT 0, c2, c3, c4, c5 FROM t66);
 SELECT count(*) FROM t66;
 count(*)
-2688
+336
 SHOW CREATE TABLE t66;
 Table	Create Table
 t66	CREATE TABLE `t66` (
@@ -984,7 +980,7 @@ t66	CREATE TABLE `t66` (
   `c4` date DEFAULT NULL,
   `c5` text,
   PRIMARY KEY (`c1`)
-) ENGINE=InnoDB AUTO_INCREMENT=2699 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
+) ENGINE=InnoDB AUTO_INCREMENT=347 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED
 /*!50100 PARTITION BY HASH (c1)
 (PARTITION p0 ENGINE = InnoDB,
  PARTITION p1 ENGINE = InnoDB,
@@ -992,7 +988,7 @@ t66	CREATE TABLE `t66` (
 INSERT INTO t77 (SELECT 0, c2, c3, c4, c5 FROM t77);
 SELECT count(*) FROM t77;
 count(*)
-576
+144
 SHOW CREATE TABLE t77;
 Table	Create Table
 t77	CREATE TABLE `t77` (
@@ -1002,7 +998,7 @@ t77	CREATE TABLE `t77` (
   `c4` date DEFAULT NULL,
   `c5` text,
   PRIMARY KEY (`c1`)
-) ENGINE=InnoDB AUTO_INCREMENT=577 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+) ENGINE=InnoDB AUTO_INCREMENT=145 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
 /*!50100 PARTITION BY RANGE (c1)
 SUBPARTITION BY HASH (c1)
 (PARTITION p0 VALUES LESS THAN (10)

=== modified file 'mysql-test/suite/innodb/r/innodb-tablespace.result'
--- a/mysql-test/suite/innodb/r/innodb-tablespace.result	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/innodb/r/innodb-tablespace.result	revid:kevin.lewis@stripped
@@ -4,18 +4,20 @@ SET default_storage_engine=InnoDB;
 #
 #
 # CREATE TABLE ... DATA DIRECTORY
-#
 # Innodb does not support INDEX DIRECTORY.
+#
 SET SESSION innodb_strict_mode = ON;
-CREATE TABLE t1 (a int KEY, b text) INDEX DIRECTORY='MYSQL_TMP_DIR/alternate_dir';
+CREATE TABLE t1 (a int KEY, b text) INDEX DIRECTORY='MYSQL_TMP_DIR/alt_dir';
 ERROR HY000: Can't create table 'test.t1' (errno: 1478)
 SHOW WARNINGS;
 Level	Code	Message
 Warning	1478	InnoDB: INDEX DIRECTORY is not supported
 Error	1005	Can't create table 'test.t1' (errno: 1478)
+#
 # Without strict mode, INDEX DIRECTORY is just ignored
+#
 SET SESSION innodb_strict_mode = OFF;
-CREATE TABLE t1 (a int KEY, b text) INDEX DIRECTORY='MYSQL_TMP_DIR/alternate_dir';
+CREATE TABLE t1 (a int KEY, b text) INDEX DIRECTORY='MYSQL_TMP_DIR/alt_dir';
 Warnings:
 Warning	1618	<INDEX DIRECTORY> option ignored
 SHOW WARNINGS;
@@ -29,18 +31,22 @@ t1	CREATE TABLE `t1` (
   PRIMARY KEY (`a`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
 DROP TABLE t1;
+#
 # Innodb does not support DATA DIRECTORY without innodb_file_per_table=ON.
+#
 SET SESSION innodb_strict_mode = ON;
 SET GLOBAL innodb_file_per_table=OFF;
-CREATE TABLE t1 (a int KEY, b text) DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir';
+CREATE TABLE t1 (a int KEY, b text) DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir';
 ERROR HY000: Can't create table 'test.t1' (errno: 1478)
 SHOW WARNINGS;
 Level	Code	Message
 Warning	1478	InnoDB: DATA DIRECTORY requires innodb_file_per_table.
 Error	1005	Can't create table 'test.t1' (errno: 1478)
+#
 # Without strict mode, DATA DIRECTORY without innodb_file_per_table=ON is just ignored.
+#
 SET SESSION innodb_strict_mode = OFF;
-CREATE TABLE t1 (a int KEY, b text) DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir';
+CREATE TABLE t1 (a int KEY, b text) DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir';
 Warnings:
 Warning	1478	InnoDB: DATA DIRECTORY requires innodb_file_per_table.
 Warning	1618	<DATA DIRECTORY> option ignored
@@ -58,25 +64,36 @@ t1	CREATE TABLE `t1` (
 DROP TABLE t1;
 # Now set innodb_file_per_table so that DATA DIRECTORY can be tested.
 SET GLOBAL innodb_file_per_table=ON;
-# Create the tablespace in MYSQL_TMP_DIR/alternate_dir
+#
+# Create the tablespace in MYSQL_TMP_DIR/alt_dir
 # InnoDB will create the sub-directories if needed.
-CREATE TABLE t1 (a int KEY, b text) DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir';
+#
+CREATE TABLE t1 (a int KEY, b text) DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir';
 SHOW WARNINGS;
 Level	Code	Message
 INSERT INTO t1 VALUES (1, "Create the tablespace");
 SELECT * FROM t1;
 a	b
 1	Create the tablespace
-# Check if tablespace file exists where we specified in DATA DIRECTORY
+#
 # Check if link file exists  in MYSQLD_DATADIR
+#
+---- MYSQLD_DATADIR/test
+t1.frm
+t1.isl
+# Check if tablespace file exists where we specified in DATA DIRECTORY
+---- MYSQL_TMP_DIR/alt_dir/test
+t1.ibd
+#
 # Check that DATA DIRECTORY shows up in the SHOW CREATE TABLE results.
+#
 SHOW CREATE TABLE t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) NOT NULL,
   `b` text,
   PRIMARY KEY (`a`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/'
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
 # Show that the new system tables have this table in them correctly
 SELECT name,n_cols,file_format,row_format
 FROM information_schema.innodb_sys_tables WHERE name LIKE 'test%';
@@ -88,8 +105,10 @@ name	file_format	row_format
 test/t1	Antelope	Compact or Redundant
 SELECT path FROM information_schema.innodb_sys_datafiles;
 path
-MYSQL_TMP_DIR/alternate_dir/test/t1.ibd
+MYSQL_TMP_DIR/alt_dir/test/t1.ibd
+#
 # Show that the system tables are updated on drop table
+#
 DROP TABLE t1;
 SELECT name,n_cols,file_format,row_format
 FROM information_schema.innodb_sys_tables WHERE name LIKE 'test%';
@@ -99,8 +118,10 @@ FROM information_schema.innodb_sys_table
 name	file_format	row_format
 SELECT path FROM information_schema.innodb_sys_datafiles;
 path
+#
 # Create the same table a second time in the same place
-CREATE TABLE t1 (a int KEY, b text) DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir';
+#
+CREATE TABLE t1 (a int KEY, b text) DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir';
 INSERT INTO t1 VALUES (2, "Create the same table a second time in the same place");
 SELECT * FROM t1;
 a	b
@@ -111,7 +132,7 @@ t1	CREATE TABLE `t1` (
   `a` int(11) NOT NULL,
   `b` text,
   PRIMARY KEY (`a`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/'
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
 SELECT name,n_cols,file_format,row_format
 FROM information_schema.innodb_sys_tables WHERE name LIKE 'test%';
 name	n_cols	file_format	row_format
@@ -122,8 +143,15 @@ name	file_format	row_format
 test/t1	Antelope	Compact or Redundant
 SELECT path FROM information_schema.innodb_sys_datafiles;
 path
-MYSQL_TMP_DIR/alternate_dir/test/t1.ibd
+MYSQL_TMP_DIR/alt_dir/test/t1.ibd
+---- MYSQLD_DATADIR/test
+t1.frm
+t1.isl
+---- MYSQL_TMP_DIR/alt_dir/test
+t1.ibd
+#
 # Truncate the table, then insert and verify
+#
 TRUNCATE TABLE t1;
 INSERT INTO t1 VALUES (3, "Truncate the table, then insert");
 SELECT * FROM t1;
@@ -139,8 +167,15 @@ name	file_format	row_format
 test/t1	Antelope	Compact or Redundant
 SELECT path FROM information_schema.innodb_sys_datafiles;
 path
-MYSQL_TMP_DIR/alternate_dir/test/t1.ibd
+MYSQL_TMP_DIR/alt_dir/test/t1.ibd
+---- MYSQLD_DATADIR/test
+t1.frm
+t1.isl
+---- MYSQL_TMP_DIR/alt_dir/test
+t1.ibd
+#
 # Rename the table, then insert and verify
+#
 RENAME TABLE t1 TO t2;
 INSERT INTO t2 VALUES (4, "Rename the table, then insert");
 SELECT * FROM t2;
@@ -157,8 +192,15 @@ name	file_format	row_format
 test/t2	Antelope	Compact or Redundant
 SELECT path FROM information_schema.innodb_sys_datafiles;
 path
-MYSQL_TMP_DIR/alternate_dir/test/t2.ibd
+MYSQL_TMP_DIR/alt_dir/test/t2.ibd
+---- MYSQLD_DATADIR/test
+t2.frm
+t2.isl
+---- MYSQL_TMP_DIR/alt_dir/test
+t2.ibd
+#
 # CREATE TABLE LIKE does not retain DATA DIRECTORY automatically.
+#
 CREATE TABLE t3 LIKE t2;
 INSERT INTO t3 VALUES (5, "CREATE TABLE LIKE");
 SELECT * FROM t3;
@@ -176,9 +218,16 @@ test/t2	Antelope	Compact or Redundant
 test/t3	Antelope	Compact or Redundant
 SELECT path FROM information_schema.innodb_sys_datafiles;
 path
-MYSQL_TMP_DIR/alternate_dir/test/t2.ibd
+MYSQL_TMP_DIR/alt_dir/test/t2.ibd
 MYSQLD_DATADIR/test/t3.ibd
+---- MYSQLD_DATADIR/test
+t2.frm
+t2.isl
+t3.frm
+t3.ibd
+#
 # Now make sure the tables can be fully dropped.
+#
 DROP TABLE t2, t3;
 SELECT name,n_cols,file_format,row_format
 FROM information_schema.innodb_sys_tables WHERE name LIKE 'test%';
@@ -188,13 +237,17 @@ FROM information_schema.innodb_sys_table
 name	file_format	row_format
 SELECT path FROM information_schema.innodb_sys_datafiles;
 path
+---- MYSQLD_DATADIR/test
+---- MYSQL_TMP_DIR/alt_dir/test
+#
 # Be sure SQL MODE "NO_DIR_IN_CREATE" prevents the use of DATA DIRECTORY
+#
 SET @org_mode=@@sql_mode;
 SET @@sql_mode='NO_DIR_IN_CREATE';
 SELECT @@sql_mode;
 @@sql_mode
 NO_DIR_IN_CREATE
-CREATE TABLE t1 (a int, b text) DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir';
+CREATE TABLE t1 (a int, b text) DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir';
 Warnings:
 Warning	1618	<DATA DIRECTORY> option ignored
 SHOW WARNINGS;
@@ -203,20 +256,22 @@ Warning	1618	<DATA DIRECTORY> option ign
 INSERT INTO t1 VALUES (6, "SQL MODE NO_DIR_IN_CREATE prevents DATA DIRECTORY");
 DROP TABLE t1;
 set @@sql_mode=@org_mode;
+#
 # MySQL engine does not allow DATA DIRECTORY to be
 # within --datadir for any engine, including InnoDB
+#
 CREATE TABLE t1 (a int KEY, b text) DATA DIRECTORY 'MYSQLD_DATADIR/test';
 ERROR HY000: Incorrect arguments to DATA DIRECTORY
 # TEMPORARY tables are incompatible with DATA DIRECTORY
 SET SESSION innodb_strict_mode = ON;
-CREATE TEMPORARY TABLE t1 (a int KEY, b text) engine=InnoDB DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir';
+CREATE TEMPORARY TABLE t1 (a int KEY, b text) engine=InnoDB DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir';
 ERROR HY000: Can't create table 'test.t1' (errno: 1478)
 SHOW WARNINGS;
 Level	Code	Message
 Warning	1478	InnoDB: DATA DIRECTORY cannot be used for TEMPORARY tables.
 Error	1005	Can't create table 'test.t1' (errno: 1478)
 SET SESSION innodb_strict_mode = OFF;
-CREATE TEMPORARY TABLE t1 (a int KEY, b text) engine=InnoDB DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir';
+CREATE TEMPORARY TABLE t1 (a int KEY, b text) engine=InnoDB DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir';
 Warnings:
 Warning	1478	InnoDB: DATA DIRECTORY cannot be used for TEMPORARY tables.
 Warning	1618	<DATA DIRECTORY> option ignored
@@ -232,12 +287,16 @@ t1	CREATE TEMPORARY TABLE `t1` (
   PRIMARY KEY (`a`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
 DROP TABLE t1;
+---- MYSQLD_DATADIR/test
+---- MYSQL_TMP_DIR/alt_dir/test
+#
 # Create the remote table via static DDL statements in a stored procedure
-CREATE PROCEDURE static_proc() BEGIN CREATE TABLE t1 (a int KEY, b text) DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir'; END |
+#
+CREATE PROCEDURE static_proc() BEGIN CREATE TABLE t1 (a int KEY, b text) DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir'; END |
 CALL static_proc;
 SELECT path FROM information_schema.innodb_sys_datafiles;
 path
-MYSQL_TMP_DIR/alternate_dir/test/t1.ibd
+MYSQL_TMP_DIR/alt_dir/test/t1.ibd
 INSERT INTO t1 VALUES (7, "Create the remote table via static DDL statements");
 SELECT * FROM t1;
 a	b
@@ -248,15 +307,22 @@ t1	CREATE TABLE `t1` (
   `a` int(11) NOT NULL,
   `b` text,
   PRIMARY KEY (`a`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/'
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
+---- MYSQLD_DATADIR/test
+t1.frm
+t1.isl
+---- MYSQL_TMP_DIR/alt_dir/test
+t1.ibd
 DROP PROCEDURE static_proc;
 DROP TABLE t1;
+#
 # Create the remote table via dynamic DDL statements in a stored procedure
-CREATE PROCEDURE dynamic_proc() BEGIN PREPARE stmt1 FROM "CREATE TABLE t1 (a int KEY, b text) DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir'"; EXECUTE stmt1; END |
+#
+CREATE PROCEDURE dynamic_proc() BEGIN PREPARE stmt1 FROM "CREATE TABLE t1 (a int KEY, b text) DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir'"; EXECUTE stmt1; END |
 CALL dynamic_proc;
 SELECT path FROM information_schema.innodb_sys_datafiles;
 path
-MYSQL_TMP_DIR/alternate_dir/test/t1.ibd
+MYSQL_TMP_DIR/alt_dir/test/t1.ibd
 INSERT INTO t1 VALUES (8, "Create the remote table via dynamic DDL statements");
 SELECT * FROM t1;
 a	b
@@ -267,7 +333,12 @@ t1	CREATE TABLE `t1` (
   `a` int(11) NOT NULL,
   `b` text,
   PRIMARY KEY (`a`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TMP_DIR/alternate_dir/'
+) ENGINE=InnoDB DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQL_TMP_DIR/alt_dir/'
+---- MYSQLD_DATADIR/test
+t1.frm
+t1.isl
+---- MYSQL_TMP_DIR/alt_dir/test
+t1.ibd
 DROP PROCEDURE dynamic_proc;
 DROP TABLE t1;
 #
@@ -281,11 +352,11 @@ store_id INT
 )
 PARTITION BY LIST(store_id) (
 PARTITION east VALUES IN (10,20,30)
-DATA DIRECTORY = 'MYSQL_TMP_DIR/alt-dir-east',
+DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_east',
 PARTITION north VALUES IN (40,50,60)
-DATA DIRECTORY = 'MYSQL_TMP_DIR/alt-dir-north',
+DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_north',
 PARTITION west VALUES IN (70,80,100)
-DATA DIRECTORY = 'MYSQL_TMP_DIR/alt-dir-west'
+DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_west'
 );
 INSERT INTO emp values(1,'Oracle','NUTT',10);
 INSERT INTO emp values(2,'HUAWEI','BOLT',40);
@@ -299,9 +370,9 @@ emp	CREATE TABLE `emp` (
   `store_id` int(11) DEFAULT NULL
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (store_id)
-(PARTITION east VALUES IN (10,20,30) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt-dir-east' ENGINE = InnoDB,
- PARTITION north VALUES IN (40,50,60) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt-dir-north' ENGINE = InnoDB,
- PARTITION west VALUES IN (70,80,100) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt-dir-west' ENGINE = InnoDB) */
+(PARTITION east VALUES IN (10,20,30) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_east' ENGINE = InnoDB,
+ PARTITION north VALUES IN (40,50,60) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_north' ENGINE = InnoDB,
+ PARTITION west VALUES IN (70,80,100) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_west' ENGINE = InnoDB) */
 SELECT name,n_cols,file_format,row_format
 FROM information_schema.innodb_sys_tables
 WHERE name LIKE 'test%'
@@ -320,15 +391,29 @@ test/emp#p#west	Antelope	Compact or Redu
 SELECT path FROM information_schema.innodb_sys_datafiles
 ORDER BY path;
 path
-MYSQL_TMP_DIR/alt-dir-east/test/emp#p#east.ibd
-MYSQL_TMP_DIR/alt-dir-north/test/emp#p#north.ibd
-MYSQL_TMP_DIR/alt-dir-west/test/emp#p#west.ibd
+MYSQL_TMP_DIR/alt_dir_east/test/emp#p#east.ibd
+MYSQL_TMP_DIR/alt_dir_north/test/emp#p#north.ibd
+MYSQL_TMP_DIR/alt_dir_west/test/emp#p#west.ibd
 SELECT * FROM emp;
 id	store_name	parts	store_id
 1	Oracle	NUTT	10
 2	HUAWEI	BOLT	40
 3	IBM	NAIL	70
+---- MYSQLD_DATADIR/test
+emp#p#east.isl
+emp#p#north.isl
+emp#p#west.isl
+emp.frm
+emp.par
+---- MYSQL_TMP_DIR/alt_dir_east/test
+emp#p#east.ibd
+---- MYSQL_TMP_DIR/alt_dir_north/test
+emp#p#north.ibd
+---- MYSQL_TMP_DIR/alt_dir_west/test
+emp#p#west.ibd
+#
 # DROP one PARTITION.
+#
 ALTER TABLE emp DROP PARTITION west;
 SHOW CREATE TABLE emp;
 Table	Create Table
@@ -339,8 +424,8 @@ emp	CREATE TABLE `emp` (
   `store_id` int(11) DEFAULT NULL
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (store_id)
-(PARTITION east VALUES IN (10,20,30) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt-dir-east' ENGINE = InnoDB,
- PARTITION north VALUES IN (40,50,60) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt-dir-north' ENGINE = InnoDB) */
+(PARTITION east VALUES IN (10,20,30) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_east' ENGINE = InnoDB,
+ PARTITION north VALUES IN (40,50,60) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_north' ENGINE = InnoDB) */
 SELECT name,n_cols,file_format,row_format
 FROM information_schema.innodb_sys_tables
 WHERE name LIKE 'test%'
@@ -357,16 +442,28 @@ test/emp#p#north	Antelope	Compact or Red
 SELECT path FROM information_schema.innodb_sys_datafiles
 ORDER BY path;
 path
-MYSQL_TMP_DIR/alt-dir-east/test/emp#p#east.ibd
-MYSQL_TMP_DIR/alt-dir-north/test/emp#p#north.ibd
+MYSQL_TMP_DIR/alt_dir_east/test/emp#p#east.ibd
+MYSQL_TMP_DIR/alt_dir_north/test/emp#p#north.ibd
 SELECT * FROM emp;
 id	store_name	parts	store_id
 1	Oracle	NUTT	10
 2	HUAWEI	BOLT	40
+---- MYSQLD_DATADIR/test
+emp#p#east.isl
+emp#p#north.isl
+emp.frm
+emp.par
+---- MYSQL_TMP_DIR/alt_dir_east/test
+emp#p#east.ibd
+---- MYSQL_TMP_DIR/alt_dir_north/test
+emp#p#north.ibd
+---- MYSQL_TMP_DIR/alt_dir_west/test
+#
 # ADD the PARTITION back.
+#
 ALTER TABLE emp ADD PARTITION (
 PARTITION west VALUES IN (70,80,100)
-DATA DIRECTORY = 'MYSQL_TMP_DIR/alt-dir-west');
+DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_west');
 SHOW CREATE TABLE emp;
 Table	Create Table
 emp	CREATE TABLE `emp` (
@@ -376,9 +473,9 @@ emp	CREATE TABLE `emp` (
   `store_id` int(11) DEFAULT NULL
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (store_id)
-(PARTITION east VALUES IN (10,20,30) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt-dir-east' ENGINE = InnoDB,
- PARTITION north VALUES IN (40,50,60) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt-dir-north' ENGINE = InnoDB,
- PARTITION west VALUES IN (70,80,100) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt-dir-west' ENGINE = InnoDB) */
+(PARTITION east VALUES IN (10,20,30) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_east' ENGINE = InnoDB,
+ PARTITION north VALUES IN (40,50,60) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_north' ENGINE = InnoDB,
+ PARTITION west VALUES IN (70,80,100) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_west' ENGINE = InnoDB) */
 SELECT name,n_cols,file_format,row_format
 FROM information_schema.innodb_sys_tables
 WHERE name LIKE 'test%'
@@ -397,16 +494,30 @@ test/emp#p#west	Antelope	Compact or Redu
 SELECT path FROM information_schema.innodb_sys_datafiles
 ORDER BY path;
 path
-MYSQL_TMP_DIR/alt-dir-east/test/emp#p#east.ibd
-MYSQL_TMP_DIR/alt-dir-north/test/emp#p#north.ibd
-MYSQL_TMP_DIR/alt-dir-west/test/emp#p#west.ibd
+MYSQL_TMP_DIR/alt_dir_east/test/emp#p#east.ibd
+MYSQL_TMP_DIR/alt_dir_north/test/emp#p#north.ibd
+MYSQL_TMP_DIR/alt_dir_west/test/emp#p#west.ibd
 INSERT INTO emp VALUES(3,'IBM','NAIL',70);
 SELECT * FROM emp;
 id	store_name	parts	store_id
 1	Oracle	NUTT	10
 2	HUAWEI	BOLT	40
 3	IBM	NAIL	70
+---- MYSQLD_DATADIR/test
+emp#p#east.isl
+emp#p#north.isl
+emp#p#west.isl
+emp.frm
+emp.par
+---- MYSQL_TMP_DIR/alt_dir_east/test
+emp#p#east.ibd
+---- MYSQL_TMP_DIR/alt_dir_north/test
+emp#p#north.ibd
+---- MYSQL_TMP_DIR/alt_dir_west/test
+emp#p#west.ibd
+#
 # TRUNCATE one PARTITION.
+#
 ALTER TABLE emp TRUNCATE PARTITION west;
 SHOW CREATE TABLE emp;
 Table	Create Table
@@ -417,9 +528,9 @@ emp	CREATE TABLE `emp` (
   `store_id` int(11) DEFAULT NULL
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY LIST (store_id)
-(PARTITION east VALUES IN (10,20,30) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt-dir-east' ENGINE = InnoDB,
- PARTITION north VALUES IN (40,50,60) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt-dir-north' ENGINE = InnoDB,
- PARTITION west VALUES IN (70,80,100) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt-dir-west' ENGINE = InnoDB) */
+(PARTITION east VALUES IN (10,20,30) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_east' ENGINE = InnoDB,
+ PARTITION north VALUES IN (40,50,60) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_north' ENGINE = InnoDB,
+ PARTITION west VALUES IN (70,80,100) DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir_west' ENGINE = InnoDB) */
 SELECT name,n_cols,file_format,row_format
 FROM information_schema.innodb_sys_tables
 WHERE name LIKE 'test%'
@@ -438,9 +549,9 @@ test/emp#p#west	Antelope	Compact or Redu
 SELECT path FROM information_schema.innodb_sys_datafiles
 ORDER BY path;
 path
-MYSQL_TMP_DIR/alt-dir-east/test/emp#p#east.ibd
-MYSQL_TMP_DIR/alt-dir-north/test/emp#p#north.ibd
-MYSQL_TMP_DIR/alt-dir-west/test/emp#p#west.ibd
+MYSQL_TMP_DIR/alt_dir_east/test/emp#p#east.ibd
+MYSQL_TMP_DIR/alt_dir_north/test/emp#p#north.ibd
+MYSQL_TMP_DIR/alt_dir_west/test/emp#p#west.ibd
 SELECT * FROM emp;
 id	store_name	parts	store_id
 1	Oracle	NUTT	10
@@ -451,6 +562,18 @@ id	store_name	parts	store_id
 1	Oracle	NUTT	10
 2	HUAWEI	BOLT	40
 3	IBM	NAIL	70
+---- MYSQLD_DATADIR/test
+emp#p#east.isl
+emp#p#north.isl
+emp#p#west.isl
+emp.frm
+emp.par
+---- MYSQL_TMP_DIR/alt_dir_east/test
+emp#p#east.ibd
+---- MYSQL_TMP_DIR/alt_dir_north/test
+emp#p#north.ibd
+---- MYSQL_TMP_DIR/alt_dir_west/test
+emp#p#west.ibd
 DROP TABLE emp;
 #
 # Cleanup

=== modified file 'mysql-test/suite/innodb/t/innodb-restart.test'
--- a/mysql-test/suite/innodb/t/innodb-restart.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/innodb/t/innodb-restart.test	revid:kevin.lewis@stripped
@@ -221,17 +221,16 @@ SELECT path FROM information_schema.inno
 
 INSERT INTO t5 VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
 INSERT INTO t5 (SELECT 0, c2, c3, c4, c5 FROM t5);
+INSERT INTO t5 (SELECT 0, c2, c3, c4, c5 FROM t5);
+INSERT INTO t5 (SELECT 0, c2, c3, c4, c5 FROM t5);
 SELECT count(*) FROM t5;
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SHOW CREATE TABLE t5;
 
-INSERT INTO t6 (SELECT 0, c2, c3, c4, c5 FROM t6);
-INSERT INTO t6 (SELECT 0, c2, c3, c4, c5 FROM t6);
 SELECT count(*) FROM t6;
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SHOW CREATE TABLE t6;
 
-INSERT INTO t7 (SELECT 0, c2, c3, c4, c5 FROM t7);
 SELECT count(*) FROM t7;
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SHOW CREATE TABLE t7;
@@ -246,17 +245,14 @@ SHOW VARIABLES LIKE 'innodb_file_per_tab
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SELECT path FROM information_schema.innodb_sys_datafiles ORDER BY path;
 
-INSERT INTO t5 (SELECT 0, c2, c3, c4, c5 FROM t5);
 SELECT count(*) FROM t5;
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SHOW CREATE TABLE t5;
 
-INSERT INTO t6 (SELECT 0, c2, c3, c4, c5 FROM t6);
 SELECT count(*) FROM t6;
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SHOW CREATE TABLE t6;
 
-INSERT INTO t7 (SELECT 0, c2, c3, c4, c5 FROM t7);
 SELECT count(*) FROM t7;
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SHOW CREATE TABLE t7;
@@ -340,7 +336,7 @@ SHOW CREATE TABLE t77;
 --echo ---- MYSQL_TMP_DIR/alt_dir/test
 --replace_regex  /#P#/#p#/  /#SP#/#sp#/
 --list_files $MYSQL_TMP_DIR/alt_dir/test
-FLUSH TABLE t55,t66 WITH READ LOCK;
+FLUSH TABLE t55,t66,t77 WITH READ LOCK;
 --echo # Moving tablespaces from MYSQL_TMP_DIR/alt_dir to MYSQL_TMP_DIR/new_dir
 --mkdir $MYSQL_TMP_DIR/new_dir
 --mkdir $MYSQL_TMP_DIR/new_dir/test
@@ -425,7 +421,7 @@ SHOW CREATE TABLE t77;
 --echo ---- MYSQL_TMP_DIR/new_dir/test
 --replace_regex  /#P#/#p#/  /#SP#/#sp#/
 --list_files $MYSQL_TMP_DIR/new_dir/test
-FLUSH TABLE t55 WITH READ LOCK;
+FLUSH TABLE t55,t66,t77 WITH READ LOCK;
 --echo # Moving tablespaces from MYSQL_TMP_DIR/new_dir to MYSQLD_DATADIR
 --copy_file $MYSQL_TMP_DIR/new_dir/test/t55.ibd $MYSQLD_DATADIR/test/t55.ibd
 --copy_file $MYSQL_TMP_DIR/new_dir/test/t66#P#p0.ibd $MYSQLD_DATADIR/test/t66#P#p0.ibd

=== modified file 'mysql-test/suite/innodb/t/innodb-tablespace.test'
--- a/mysql-test/suite/innodb/t/innodb-tablespace.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/innodb/t/innodb-tablespace.test	revid:kevin.lewis@stripped
@@ -13,8 +13,8 @@ SET default_storage_engine=InnoDB;
 
 # Set up some variables
 LET $MYSQLD_DATADIR = `select @@datadir`;
-LET $data_directory_clause = DATA DIRECTORY='$MYSQL_TMP_DIR/alternate_dir';
-LET $index_directory_clause = INDEX DIRECTORY='$MYSQL_TMP_DIR/alternate_dir';
+LET $data_directory_clause = DATA DIRECTORY='$MYSQL_TMP_DIR/alt_dir';
+LET $index_directory_clause = INDEX DIRECTORY='$MYSQL_TMP_DIR/alt_dir';
 
 # These values can change during the test
 LET $innodb_file_format_orig=`select @@innodb_file_format`;
@@ -23,16 +23,17 @@ LET $innodb_strict_mode_orig=`select @@s
 
 --echo #
 --echo # CREATE TABLE ... DATA DIRECTORY
---echo #
-
 --echo # Innodb does not support INDEX DIRECTORY.
+--echo #
 SET SESSION innodb_strict_mode = ON;
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 --error ER_CANT_CREATE_TABLE
 eval CREATE TABLE t1 (a int KEY, b text) $index_directory_clause;
 SHOW WARNINGS;
 
+--echo #
 --echo # Without strict mode, INDEX DIRECTORY is just ignored
+--echo #
 SET SESSION innodb_strict_mode = OFF;
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 eval CREATE TABLE t1 (a int KEY, b text) $index_directory_clause;
@@ -40,7 +41,9 @@ SHOW WARNINGS;
 SHOW CREATE TABLE t1;
 DROP TABLE t1;
 
+--echo #
 --echo # Innodb does not support DATA DIRECTORY without innodb_file_per_table=ON.
+--echo #
 SET SESSION innodb_strict_mode = ON;
 SET GLOBAL innodb_file_per_table=OFF;
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
@@ -48,7 +51,9 @@ SET GLOBAL innodb_file_per_table=OFF;
 eval CREATE TABLE t1 (a int KEY, b text) $data_directory_clause;
 SHOW WARNINGS;
 
+--echo #
 --echo # Without strict mode, DATA DIRECTORY without innodb_file_per_table=ON is just ignored.
+--echo #
 SET SESSION innodb_strict_mode = OFF;
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 eval CREATE TABLE t1 (a int KEY, b text) $data_directory_clause;
@@ -59,21 +64,28 @@ DROP TABLE t1;
 --echo # Now set innodb_file_per_table so that DATA DIRECTORY can be tested.
 SET GLOBAL innodb_file_per_table=ON;
 
---echo # Create the tablespace in MYSQL_TMP_DIR/alternate_dir
+--echo #
+--echo # Create the tablespace in MYSQL_TMP_DIR/alt_dir
 --echo # InnoDB will create the sub-directories if needed.
+--echo #
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 eval CREATE TABLE t1 (a int KEY, b text) $data_directory_clause;
 SHOW WARNINGS;
 INSERT INTO t1 VALUES (1, "Create the tablespace");
 SELECT * FROM t1;
 
---echo # Check if tablespace file exists where we specified in DATA DIRECTORY
---file_exists $MYSQL_TMP_DIR/alternate_dir/test/t1.ibd
-
+--echo #
 --echo # Check if link file exists  in MYSQLD_DATADIR
---file_exists $MYSQLD_DATADIR/test/t1.isl
+--echo #
+--echo ---- MYSQLD_DATADIR/test
+--list_files $MYSQLD_DATADIR/test
+--echo # Check if tablespace file exists where we specified in DATA DIRECTORY
+--echo ---- MYSQL_TMP_DIR/alt_dir/test
+--list_files $MYSQL_TMP_DIR/alt_dir/test
 
+--echo #
 --echo # Check that DATA DIRECTORY shows up in the SHOW CREATE TABLE results.
+--echo #
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SHOW CREATE TABLE t1;
 
@@ -86,7 +98,9 @@ SELECT name,file_format,row_format
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SELECT path FROM information_schema.innodb_sys_datafiles;
 
+--echo #
 --echo # Show that the system tables are updated on drop table
+--echo #
 DROP TABLE t1;
 SELECT name,n_cols,file_format,row_format
        FROM information_schema.innodb_sys_tables WHERE name LIKE 'test%';
@@ -94,7 +108,9 @@ SELECT name,file_format,row_format
        FROM information_schema.innodb_sys_tablespaces;
 SELECT path FROM information_schema.innodb_sys_datafiles;
 
+--echo #
 --echo # Create the same table a second time in the same place
+--echo #
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 eval CREATE TABLE t1 (a int KEY, b text) $data_directory_clause;
 
@@ -108,12 +124,14 @@ SELECT name,file_format,row_format
        FROM information_schema.innodb_sys_tablespaces;
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SELECT path FROM information_schema.innodb_sys_datafiles;
---file_exists $MYSQL_TMP_DIR/alternate_dir/test/t1.ibd
---file_exists $MYSQLD_DATADIR/test/t1.isl
---error 1
---file_exists $MYSQLD_DATADIR/test/t1.ibd
+--echo ---- MYSQLD_DATADIR/test
+--list_files $MYSQLD_DATADIR/test
+--echo ---- MYSQL_TMP_DIR/alt_dir/test
+--list_files $MYSQL_TMP_DIR/alt_dir/test
 
+--echo #
 --echo # Truncate the table, then insert and verify
+--echo #
 TRUNCATE TABLE t1;
 INSERT INTO t1 VALUES (3, "Truncate the table, then insert");
 SELECT * FROM t1;
@@ -123,10 +141,14 @@ SELECT name,file_format,row_format
        FROM information_schema.innodb_sys_tablespaces;
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SELECT path FROM information_schema.innodb_sys_datafiles;
---file_exists $MYSQL_TMP_DIR/alternate_dir/test/t1.ibd
---file_exists $MYSQLD_DATADIR/test/t1.isl
+--echo ---- MYSQLD_DATADIR/test
+--list_files $MYSQLD_DATADIR/test
+--echo ---- MYSQL_TMP_DIR/alt_dir/test
+--list_files $MYSQL_TMP_DIR/alt_dir/test
 
+--echo #
 --echo # Rename the table, then insert and verify
+--echo #
 RENAME TABLE t1 TO t2;
 INSERT INTO t2 VALUES (4, "Rename the table, then insert");
 SELECT * FROM t2;
@@ -136,12 +158,14 @@ SELECT name,file_format,row_format
        FROM information_schema.innodb_sys_tablespaces;
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SELECT path FROM information_schema.innodb_sys_datafiles;
---file_exists $MYSQL_TMP_DIR/alternate_dir/test/t2.ibd
---file_exists $MYSQLD_DATADIR/test/t2.isl
---error 1
---file_exists $MYSQLD_DATADIR/test/t2.ibd
+--echo ---- MYSQLD_DATADIR/test
+--list_files $MYSQLD_DATADIR/test
+--echo ---- MYSQL_TMP_DIR/alt_dir/test
+--list_files $MYSQL_TMP_DIR/alt_dir/test
 
+--echo #
 --echo # CREATE TABLE LIKE does not retain DATA DIRECTORY automatically.
+--echo #
 CREATE TABLE t3 LIKE t2;
 INSERT INTO t3 VALUES (5, "CREATE TABLE LIKE");
 SELECT * FROM t3;
@@ -151,29 +175,26 @@ SELECT name,file_format,row_format
        FROM information_schema.innodb_sys_tablespaces;
 --replace_result ./ MYSQLD_DATADIR/ $MYSQLD_DATADIR MYSQLD_DATADIR  $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SELECT path FROM information_schema.innodb_sys_datafiles;
---file_exists $MYSQLD_DATADIR/test/t3.ibd
---error 1
---file_exists $MYSQLD_DATADIR/test/t3.isl
+--echo ---- MYSQLD_DATADIR/test
+--list_files $MYSQLD_DATADIR/test
 
+--echo #
 --echo # Now make sure the tables can be fully dropped.
+--echo #
 DROP TABLE t2, t3;
 SELECT name,n_cols,file_format,row_format
        FROM information_schema.innodb_sys_tables WHERE name LIKE 'test%';
 SELECT name,file_format,row_format
        FROM information_schema.innodb_sys_tablespaces;
 SELECT path FROM information_schema.innodb_sys_datafiles;
---error 1
---file_exists $MYSQLD_DATADIR/test/t2.frm
---error 1
---file_exists $MYSQLD_DATADIR/test/t2.isl
---error 1
---file_exists $MYSQL_TMP_DIR/alternate_dir/test/t2.ibd
---error 1
---file_exists $MYSQLD_DATADIR/test/t3.frm
---error 1
---file_exists $MYSQLD_DATADIR/test/t3.ibd
+--echo ---- MYSQLD_DATADIR/test
+--list_files $MYSQLD_DATADIR/test
+--echo ---- MYSQL_TMP_DIR/alt_dir/test
+--list_files $MYSQL_TMP_DIR/alt_dir/test
 
+--echo #
 --echo # Be sure SQL MODE "NO_DIR_IN_CREATE" prevents the use of DATA DIRECTORY
+--echo #
 SET @org_mode=@@sql_mode;
 SET @@sql_mode='NO_DIR_IN_CREATE';
 SELECT @@sql_mode;
@@ -186,8 +207,10 @@ INSERT INTO t1 VALUES (6, "SQL MODE NO_D
 DROP TABLE t1;
 set @@sql_mode=@org_mode;
 
+--echo #
 --echo # MySQL engine does not allow DATA DIRECTORY to be
 --echo # within --datadir for any engine, including InnoDB
+--echo #
 --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
 --error ER_WRONG_ARGUMENTS
 eval CREATE TABLE t1 (a int KEY, b text) DATA DIRECTORY '$MYSQLD_DATADIR/test';
@@ -204,17 +227,14 @@ eval CREATE TEMPORARY TABLE t1 (a int KE
 SHOW WARNINGS;
 SHOW CREATE TABLE t1;
 DROP TABLE t1;
---error 1
---file_exists $MYSQLD_DATADIR/test/t1.frm
---error 1
---file_exists $MYSQLD_DATADIR/test/t1.isl
---error 1
---file_exists $MYSQL_TMP_DIR/alternate_dir/test/t1.ibd
---error 1
---file_exists $MYSQLD_DATADIR/test/t1.ibd
-
+--echo ---- MYSQLD_DATADIR/test
+--list_files $MYSQLD_DATADIR/test
+--echo ---- MYSQL_TMP_DIR/alt_dir/test
+--list_files $MYSQL_TMP_DIR/alt_dir/test
 
+--echo #
 --echo # Create the remote table via static DDL statements in a stored procedure
+--echo #
 DELIMITER |;
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 eval CREATE PROCEDURE static_proc() BEGIN CREATE TABLE t1 (a int KEY, b text) $data_directory_clause; END |
@@ -226,13 +246,16 @@ INSERT INTO t1 VALUES (7, "Create the re
 SELECT * FROM t1;
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SHOW CREATE TABLE t1;
---file_exists $MYSQLD_DATADIR/test/t1.frm
---file_exists $MYSQLD_DATADIR/test/t1.isl
---file_exists $MYSQL_TMP_DIR/alternate_dir/test/t1.ibd
+--echo ---- MYSQLD_DATADIR/test
+--list_files $MYSQLD_DATADIR/test
+--echo ---- MYSQL_TMP_DIR/alt_dir/test
+--list_files $MYSQL_TMP_DIR/alt_dir/test
 DROP PROCEDURE static_proc;
 DROP TABLE t1;
 
+--echo #
 --echo # Create the remote table via dynamic DDL statements in a stored procedure
+--echo #
 DELIMITER |;
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 eval CREATE PROCEDURE dynamic_proc() BEGIN PREPARE stmt1 FROM "CREATE TABLE t1 (a int KEY, b text) $data_directory_clause"; EXECUTE stmt1; END |
@@ -244,9 +267,10 @@ INSERT INTO t1 VALUES (8, "Create the re
 SELECT * FROM t1;
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SHOW CREATE TABLE t1;
---file_exists $MYSQLD_DATADIR/test/t1.frm
---file_exists $MYSQLD_DATADIR/test/t1.isl
---file_exists $MYSQL_TMP_DIR/alternate_dir/test/t1.ibd
+--echo ---- MYSQLD_DATADIR/test
+--list_files $MYSQLD_DATADIR/test
+--echo ---- MYSQL_TMP_DIR/alt_dir/test
+--list_files $MYSQL_TMP_DIR/alt_dir/test
 DROP PROCEDURE dynamic_proc;
 DROP TABLE t1;
 
@@ -262,11 +286,11 @@ eval CREATE TABLE emp (
 )
 PARTITION BY LIST(store_id) (
   PARTITION east VALUES IN (10,20,30)
-    DATA DIRECTORY = '$MYSQL_TMP_DIR/alt-dir-east',
+    DATA DIRECTORY = '$MYSQL_TMP_DIR/alt_dir_east',
   PARTITION north VALUES IN (40,50,60)
-    DATA DIRECTORY = '$MYSQL_TMP_DIR/alt-dir-north',
+    DATA DIRECTORY = '$MYSQL_TMP_DIR/alt_dir_north',
   PARTITION west VALUES IN (70,80,100)
-    DATA DIRECTORY = '$MYSQL_TMP_DIR/alt-dir-west'
+    DATA DIRECTORY = '$MYSQL_TMP_DIR/alt_dir_west'
 );
 
 INSERT INTO emp values(1,'Oracle','NUTT',10);
@@ -290,17 +314,22 @@ SELECT name,file_format,row_format
 SELECT path FROM information_schema.innodb_sys_datafiles
        ORDER BY path;
 SELECT * FROM emp;
---file_exists $MYSQLD_DATADIR/test/emp.frm
---file_exists $MYSQLD_DATADIR/test/emp.par
---file_exists $MYSQLD_DATADIR/test/emp#P#east.isl
---file_exists $MYSQLD_DATADIR/test/emp#P#north.isl
---file_exists $MYSQLD_DATADIR/test/emp#P#west.isl
---file_exists $MYSQL_TMP_DIR/alt-dir-east/test/emp#P#east.ibd
---file_exists $MYSQL_TMP_DIR/alt-dir-north/test/emp#P#north.ibd
---file_exists $MYSQL_TMP_DIR/alt-dir-west/test/emp#P#west.ibd
-
+--echo ---- MYSQLD_DATADIR/test
+--replace_regex /emp#P#/emp#p#/
+--list_files $MYSQLD_DATADIR/test
+--echo ---- MYSQL_TMP_DIR/alt_dir_east/test
+--replace_regex /emp#P#/emp#p#/
+--list_files $MYSQL_TMP_DIR/alt_dir_east/test
+--echo ---- MYSQL_TMP_DIR/alt_dir_north/test
+--replace_regex /emp#P#/emp#p#/
+--list_files $MYSQL_TMP_DIR/alt_dir_north/test
+--echo ---- MYSQL_TMP_DIR/alt_dir_west/test
+--replace_regex /emp#P#/emp#p#/
+--list_files $MYSQL_TMP_DIR/alt_dir_west/test
 
+--echo #
 --echo # DROP one PARTITION.
+--echo #
 ALTER TABLE emp DROP PARTITION west;
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SHOW CREATE TABLE emp;
@@ -318,23 +347,26 @@ SELECT name,file_format,row_format
 SELECT path FROM information_schema.innodb_sys_datafiles
        ORDER BY path;
 SELECT * FROM emp;
---file_exists $MYSQLD_DATADIR/test/emp.frm
---file_exists $MYSQLD_DATADIR/test/emp.par
---file_exists $MYSQLD_DATADIR/test/emp#P#east.isl
---file_exists $MYSQLD_DATADIR/test/emp#P#north.isl
---error 1
---file_exists $MYSQLD_DATADIR/test/emp#P#west.isl
---file_exists $MYSQL_TMP_DIR/alt-dir-east/test/emp#P#east.ibd
---file_exists $MYSQL_TMP_DIR/alt-dir-north/test/emp#P#north.ibd
---error 1
---file_exists $MYSQL_TMP_DIR/alt-dir-west/test/emp#P#west.ibd
-
+--echo ---- MYSQLD_DATADIR/test
+--replace_regex /emp#P#/emp#p#/
+--list_files $MYSQLD_DATADIR/test
+--echo ---- MYSQL_TMP_DIR/alt_dir_east/test
+--replace_regex /emp#P#/emp#p#/
+--list_files $MYSQL_TMP_DIR/alt_dir_east/test
+--echo ---- MYSQL_TMP_DIR/alt_dir_north/test
+--replace_regex /emp#P#/emp#p#/
+--list_files $MYSQL_TMP_DIR/alt_dir_north/test
+--echo ---- MYSQL_TMP_DIR/alt_dir_west/test
+--replace_regex /emp#P#/emp#p#/
+--list_files $MYSQL_TMP_DIR/alt_dir_west/test
 
+--echo #
 --echo # ADD the PARTITION back.
+--echo #
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 eval ALTER TABLE emp ADD PARTITION (
   PARTITION west VALUES IN (70,80,100)
-    DATA DIRECTORY = '$MYSQL_TMP_DIR/alt-dir-west');
+    DATA DIRECTORY = '$MYSQL_TMP_DIR/alt_dir_west');
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SHOW CREATE TABLE emp;
 --replace_regex /emp#P#/emp#p#/
@@ -352,16 +384,22 @@ SELECT path FROM information_schema.inno
        ORDER BY path;
 INSERT INTO emp VALUES(3,'IBM','NAIL',70);
 SELECT * FROM emp;
---file_exists $MYSQLD_DATADIR/test/emp.frm
---file_exists $MYSQLD_DATADIR/test/emp.par
---file_exists $MYSQLD_DATADIR/test/emp#P#east.isl
---file_exists $MYSQLD_DATADIR/test/emp#P#north.isl
---file_exists $MYSQLD_DATADIR/test/emp#P#west.isl
---file_exists $MYSQL_TMP_DIR/alt-dir-east/test/emp#P#east.ibd
---file_exists $MYSQL_TMP_DIR/alt-dir-north/test/emp#P#north.ibd
---file_exists $MYSQL_TMP_DIR/alt-dir-west/test/emp#P#west.ibd
+--echo ---- MYSQLD_DATADIR/test
+--replace_regex /emp#P#/emp#p#/
+--list_files $MYSQLD_DATADIR/test
+--echo ---- MYSQL_TMP_DIR/alt_dir_east/test
+--replace_regex /emp#P#/emp#p#/
+--list_files $MYSQL_TMP_DIR/alt_dir_east/test
+--echo ---- MYSQL_TMP_DIR/alt_dir_north/test
+--replace_regex /emp#P#/emp#p#/
+--list_files $MYSQL_TMP_DIR/alt_dir_north/test
+--echo ---- MYSQL_TMP_DIR/alt_dir_west/test
+--replace_regex /emp#P#/emp#p#/
+--list_files $MYSQL_TMP_DIR/alt_dir_west/test
 
+--echo #
 --echo # TRUNCATE one PARTITION.
+--echo #
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 ALTER TABLE emp TRUNCATE PARTITION west;
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
@@ -382,14 +420,18 @@ SELECT path FROM information_schema.inno
 SELECT * FROM emp;
 INSERT INTO emp VALUES(3,'IBM','NAIL',70);
 SELECT * FROM emp;
---file_exists $MYSQLD_DATADIR/test/emp.frm
---file_exists $MYSQLD_DATADIR/test/emp.par
---file_exists $MYSQLD_DATADIR/test/emp#P#east.isl
---file_exists $MYSQLD_DATADIR/test/emp#P#north.isl
---file_exists $MYSQLD_DATADIR/test/emp#P#west.isl
---file_exists $MYSQL_TMP_DIR/alt-dir-east/test/emp#P#east.ibd
---file_exists $MYSQL_TMP_DIR/alt-dir-north/test/emp#P#north.ibd
---file_exists $MYSQL_TMP_DIR/alt-dir-west/test/emp#P#west.ibd
+--echo ---- MYSQLD_DATADIR/test
+--replace_regex /emp#P#/emp#p#/
+--list_files $MYSQLD_DATADIR/test
+--echo ---- MYSQL_TMP_DIR/alt_dir_east/test
+--replace_regex /emp#P#/emp#p#/
+--list_files $MYSQL_TMP_DIR/alt_dir_east/test
+--echo ---- MYSQL_TMP_DIR/alt_dir_north/test
+--replace_regex /emp#P#/emp#p#/
+--list_files $MYSQL_TMP_DIR/alt_dir_north/test
+--echo ---- MYSQL_TMP_DIR/alt_dir_west/test
+--replace_regex /emp#P#/emp#p#/
+--list_files $MYSQL_TMP_DIR/alt_dir_west/test
 
 DROP TABLE emp;
 
@@ -397,14 +439,14 @@ DROP TABLE emp;
 --echo # Cleanup
 --echo #
 
---rmdir $MYSQL_TMP_DIR/alternate_dir/test
---rmdir $MYSQL_TMP_DIR/alternate_dir
---rmdir $MYSQL_TMP_DIR/alt-dir-east/test
---rmdir $MYSQL_TMP_DIR/alt-dir-east
---rmdir $MYSQL_TMP_DIR/alt-dir-north/test
---rmdir $MYSQL_TMP_DIR/alt-dir-north
---rmdir $MYSQL_TMP_DIR/alt-dir-west/test
---rmdir $MYSQL_TMP_DIR/alt-dir-west
+--rmdir $MYSQL_TMP_DIR/alt_dir/test
+--rmdir $MYSQL_TMP_DIR/alt_dir
+--rmdir $MYSQL_TMP_DIR/alt_dir_east/test
+--rmdir $MYSQL_TMP_DIR/alt_dir_east
+--rmdir $MYSQL_TMP_DIR/alt_dir_north/test
+--rmdir $MYSQL_TMP_DIR/alt_dir_north
+--rmdir $MYSQL_TMP_DIR/alt_dir_west/test
+--rmdir $MYSQL_TMP_DIR/alt_dir_west
 
 --disable_query_log
 EVAL SET GLOBAL innodb_file_format=$innodb_file_format_orig;

=== modified file 'mysql-test/suite/parts/r/partition_basic_symlink_innodb.result'
--- a/mysql-test/suite/parts/r/partition_basic_symlink_innodb.result	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/parts/r/partition_basic_symlink_innodb.result	revid:kevin.lewis@stripped
@@ -29,6 +29,8 @@ Error	6	Error on delete of 'MYSQLD_DATAD
 # the tablespace can be re-located on any OS. Also, instead of
 # putting the file directly into the DATA DIRECTORY,
 # it adds a folder under it with the name of the database.
+# Since strict mode is off, InnoDB ignores the INDEX DIRECTORY
+# and it is no longer part of the definition.
 #
 SET SESSION innodb_strict_mode = OFF;
 SET GLOBAL innodb_file_per_table = ON;
@@ -49,7 +51,18 @@ Level	Code	Message
 Warning	1618	<INDEX DIRECTORY> option ignored
 Warning	1618	<INDEX DIRECTORY> option ignored
 # Verifying .frm, .par, .isl & .ibd files
-# Verifying that there are no MyISAM files
+---- MYSQLD_DATADIR/test
+t1#P#p0.isl
+t1#P#p1.isl
+t1.frm
+t1.par
+---- MYSQLTEST_VARDIR/mysql-test-data-dir/test
+t1#P#p0.ibd
+t1#P#p1.ibd
+# The ibd tablespaces should not be directly under the DATA DIRECTORY
+---- MYSQLTEST_VARDIR/mysql-test-data-dir
+test
+---- MYSQLTEST_VARDIR/mysql-test-idx-dir
 FLUSH TABLES;
 SHOW CREATE TABLE t1;
 Table	Create Table
@@ -57,8 +70,8 @@ t1	CREATE TABLE `t1` (
   `c1` int(11) DEFAULT NULL
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY HASH (c1)
-(PARTITION p0 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = InnoDB,
- PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = InnoDB) */
+(PARTITION p0 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = InnoDB,
+ PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = InnoDB) */
 #
 # Verify that the DATA/INDEX DIRECTORY is stored and used if we
 # ALTER TABLE to MyISAM.
@@ -70,37 +83,47 @@ t1	CREATE TABLE `t1` (
   `c1` int(11) DEFAULT NULL
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY HASH (c1)
-(PARTITION p0 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM,
- PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */
+(PARTITION p0 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = MyISAM,
+ PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = MyISAM) */
 # Verifying .frm, .par and MyISAM files (.MYD, MYI)
+---- MYSQLD_DATADIR/test
+t1#P#p0.MYD
+t1#P#p0.MYI
+t1#P#p1.MYD
+t1#P#p1.MYI
+t1.frm
+t1.par
+---- MYSQLTEST_VARDIR/mysql-test-data-dir
+t1#P#p0.MYD
+t1#P#p1.MYD
+test
+---- MYSQLTEST_VARDIR/mysql-test-idx-dir
 #
 # Now verify that the DATA DIRECTORY is used again if we
-# ALTER TABLE back to InnoDB.  First try stict mode which
-# will fail since INDEX DIRECTORY is part of the definition.
+# ALTER TABLE back to InnoDB.
 #
 SET SESSION innodb_strict_mode = ON;
 ALTER TABLE t1 engine=InnoDB;
-ERROR HY000: Can't create table 'test.#sql-temporary' (errno: 1478)
-SHOW WARNINGS;
-Level	Code	Message
-Warning	1478	InnoDB: INDEX DIRECTORY is not supported
-Error	1005	Can't create table 'test.#sql-temporary' (errno: 1478)
-Error	6	Error on delete of 'MYSQLD_DATADIR/test/#sql-temporary.par' (Errcode: 2 - No such file or directory)
-# Now use non-stict mode so that the INDEX DIRECTORY is ignored.
-SET SESSION innodb_strict_mode = OFF;
-ALTER TABLE t1 engine=InnoDB;
-Warnings:
-Warning	1618	<INDEX DIRECTORY> option ignored
-Warning	1618	<INDEX DIRECTORY> option ignored
 SHOW CREATE TABLE t1;
 Table	Create Table
 t1	CREATE TABLE `t1` (
   `c1` int(11) DEFAULT NULL
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
 /*!50100 PARTITION BY HASH (c1)
-(PARTITION p0 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = InnoDB,
- PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = InnoDB) */
+(PARTITION p0 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = InnoDB,
+ PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = InnoDB) */
 # Verifying .frm, .par, .isl and InnoDB .ibd files
+---- MYSQLD_DATADIR/test
+t1#P#p0.isl
+t1#P#p1.isl
+t1.frm
+t1.par
+---- MYSQLTEST_VARDIR/mysql-test-data-dir
+test
+---- MYSQLTEST_VARDIR/mysql-test-idx-dir
+---- MYSQLTEST_VARDIR/mysql-test-data-dir/test
+t1#P#p0.ibd
+t1#P#p1.ibd
 DROP TABLE t1;
 #
 # Cleanup

=== modified file 'mysql-test/suite/parts/t/partition_basic_symlink_innodb.test'
--- a/mysql-test/suite/parts/t/partition_basic_symlink_innodb.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/parts/t/partition_basic_symlink_innodb.test	revid:kevin.lewis@stripped
@@ -80,6 +80,8 @@ SHOW WARNINGS;
 --echo # the tablespace can be re-located on any OS. Also, instead of
 --echo # putting the file directly into the DATA DIRECTORY,
 --echo # it adds a folder under it with the name of the database.
+--echo # Since strict mode is off, InnoDB ignores the INDEX DIRECTORY
+--echo # and it is no longer part of the definition.
 --echo #
 SET SESSION innodb_strict_mode = OFF;
 SET GLOBAL innodb_file_per_table = ON;
@@ -96,35 +98,16 @@ PARTITION BY HASH (c1)
 SHOW WARNINGS;
 
 --echo # Verifying .frm, .par, .isl & .ibd files
---file_exists $MYSQLD_DATADIR/test/t1.frm
---file_exists $MYSQLD_DATADIR/test/t1.par
---file_exists $MYSQLD_DATADIR/test/t1#P#p0.isl
---file_exists $MYSQLD_DATADIR/test/t1#P#p1.isl
---file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/test/t1#P#p0.ibd
---file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/test/t1#P#p1.ibd
-
---echo # Verifying that there are no MyISAM files
---error 1
---file_exists $MYSQLD_DATADIR/test/t1#P#p0.MYD
---error 1
---file_exists $MYSQLD_DATADIR/test/t1#P#p0.MYI
---error 1
---file_exists $MYSQLD_DATADIR/test/t1#P#p1.MYD
---error 1
---file_exists $MYSQLD_DATADIR/test/t1#P#p1.MYI
---error 1
---file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p0.MYD
---error 1
---file_exists $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p0.MYI
---error 1
---file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.MYD
---error 1
---file_exists $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p1.MYI
-# The ibd tablespaces should not be directly under the DATA DIRECTORY
---error 1
---file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p0.ibd
---error 1
---file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.ibd
+--echo ---- MYSQLD_DATADIR/test
+--list_files $MYSQLD_DATADIR/test
+--echo ---- MYSQLTEST_VARDIR/mysql-test-data-dir/test
+--list_files $MYSQLTEST_VARDIR/mysql-test-data-dir/test
+--echo # The ibd tablespaces should not be directly under the DATA DIRECTORY
+--echo ---- MYSQLTEST_VARDIR/mysql-test-data-dir
+--list_files $MYSQLTEST_VARDIR/mysql-test-data-dir
+--echo ---- MYSQLTEST_VARDIR/mysql-test-idx-dir
+--list_files $MYSQLTEST_VARDIR/mysql-test-idx-dir
+
 FLUSH TABLES;
 --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
 SHOW CREATE TABLE t1;
@@ -137,72 +120,30 @@ ALTER TABLE t1 engine=MyISAM;
 --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
 SHOW CREATE TABLE t1;
 --echo # Verifying .frm, .par and MyISAM files (.MYD, MYI)
---file_exists $MYSQLD_DATADIR/test/t1.frm
---file_exists $MYSQLD_DATADIR/test/t1.par
---file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p0.myd
---file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.myd
---file_exists $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p0.myi
---file_exists $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p1.myi
-
---error 1
---file_exists $MYSQLD_DATADIR/test/t1#P#p0.isl
---error 1
---file_exists $MYSQLD_DATADIR/test/t1#P#p1.isl
---error 1
---file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p0.ibd
---error 1
---file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.ibd
---error 1
---file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/test/t1#P#p0.ibd
---error 1
---file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/test/t1#P#p1.ibd
+--echo ---- MYSQLD_DATADIR/test
+--list_files $MYSQLD_DATADIR/test
+--echo ---- MYSQLTEST_VARDIR/mysql-test-data-dir
+--list_files $MYSQLTEST_VARDIR/mysql-test-data-dir
+--echo ---- MYSQLTEST_VARDIR/mysql-test-idx-dir
+--list_files $MYSQLTEST_VARDIR/mysql-test-idx-dir
 
 --echo #
 --echo # Now verify that the DATA DIRECTORY is used again if we
---echo # ALTER TABLE back to InnoDB.  First try stict mode which
---echo # will fail since INDEX DIRECTORY is part of the definition.
+--echo # ALTER TABLE back to InnoDB.
 --echo #
 SET SESSION innodb_strict_mode = ON;
---replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
---error ER_CANT_CREATE_TABLE
-ALTER TABLE t1 engine=InnoDB;
---replace_result ./ MYSQLD_DATADIR/  $MYSQLD_DATADIR MYSQLD_DATADIR
---replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
-SHOW WARNINGS;
-
---echo # Now use non-stict mode so that the INDEX DIRECTORY is ignored.
-SET SESSION innodb_strict_mode = OFF;
 ALTER TABLE t1 engine=InnoDB;
 --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
 SHOW CREATE TABLE t1;
 --echo # Verifying .frm, .par, .isl and InnoDB .ibd files
---file_exists $MYSQLD_DATADIR/test/t1.frm
---file_exists $MYSQLD_DATADIR/test/t1.par
---file_exists $MYSQLD_DATADIR/test/t1#P#p0.isl
---file_exists $MYSQLD_DATADIR/test/t1#P#p1.isl
---file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/test/t1#P#p0.ibd
---file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/test/t1#P#p1.ibd
-
---error 1
---file_exists $MYSQLD_DATADIR/test/t1#P#p0.myd
---error 1
---file_exists $MYSQLD_DATADIR/test/t1#P#p1.myd
---error 1
---file_exists $MYSQLD_DATADIR/test/t1#P#p0.myi
---error 1
---file_exists $MYSQLD_DATADIR/test/t1#P#p1.myi
---error 1
---file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p0.myd
---error 1
---file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.myd
---error 1
---file_exists $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p0.myi
---error 1
---file_exists $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p1.myi
---error 1
---file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p0.ibd
---error 1
---file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.ibd
+--echo ---- MYSQLD_DATADIR/test
+--list_files $MYSQLD_DATADIR/test
+--echo ---- MYSQLTEST_VARDIR/mysql-test-data-dir
+--list_files $MYSQLTEST_VARDIR/mysql-test-data-dir
+--echo ---- MYSQLTEST_VARDIR/mysql-test-idx-dir
+--list_files $MYSQLTEST_VARDIR/mysql-test-idx-dir
+--echo ---- MYSQLTEST_VARDIR/mysql-test-data-dir/test
+--list_files $MYSQLTEST_VARDIR/mysql-test-data-dir/test
 
 DROP TABLE t1;
 

=== modified file 'sql/ha_partition.cc'
--- a/sql/ha_partition.cc	revid:kevin.lewis@stripped
+++ b/sql/ha_partition.cc	revid:kevin.lewis@stripped
@@ -1945,7 +1945,6 @@ init_error:
   DBUG_RETURN(result);
 }
 
-
 /*
   Update create info as part of ALTER TABLE
 
@@ -2045,25 +2044,38 @@ void ha_partition::update_create_info(HA
         DBUG_ASSERT(sub_elem);
         part= i * num_subparts + j;
         DBUG_ASSERT(part < m_file_tot_parts && m_file[part]);
-        dummy_info.data_file_name = sub_elem->data_file_name;
-        dummy_info.index_file_name = sub_elem->index_file_name;
-        m_file[part]->update_create_info(&dummy_info);
-        if (dummy_info.data_file_name || sub_elem->data_file_name)
-          sub_elem->data_file_name = (char*) dummy_info.data_file_name;
-        if (dummy_info.index_file_name || sub_elem->index_file_name)
-          sub_elem->index_file_name = (char*) dummy_info.index_file_name;
+        if (ha_legacy_type(m_file[part]->ht) == DB_TYPE_INNODB)
+        {
+          dummy_info.data_file_name= dummy_info.index_file_name = NULL;
+          m_file[part]->update_create_info(&dummy_info);
+
+          if (dummy_info.data_file_name || sub_elem->data_file_name)
+          {
+            sub_elem->data_file_name = (char*) dummy_info.data_file_name;
+          }
+          if (dummy_info.index_file_name || sub_elem->index_file_name)
+          {
+            sub_elem->index_file_name = (char*) dummy_info.index_file_name;
+          }
+        }
       }
     }
     else
     {
       DBUG_ASSERT(m_file[i]);
-      dummy_info.data_file_name = part_elem->data_file_name;
-      dummy_info.index_file_name = part_elem->index_file_name;
-      m_file[i]->update_create_info(&dummy_info);
-      if (dummy_info.data_file_name || part_elem->data_file_name)
-        part_elem->data_file_name = (char*) dummy_info.data_file_name;
-      if (dummy_info.index_file_name || part_elem->index_file_name)
-        part_elem->index_file_name = (char*) dummy_info.index_file_name;
+      if (ha_legacy_type(m_file[i]->ht) == DB_TYPE_INNODB)
+      {
+        dummy_info.data_file_name= dummy_info.index_file_name= NULL;
+        m_file[i]->update_create_info(&dummy_info);
+        if (dummy_info.data_file_name || part_elem->data_file_name)
+        {
+          part_elem->data_file_name = (char*) dummy_info.data_file_name;
+        }
+        if (dummy_info.index_file_name || part_elem->index_file_name)
+        {
+          part_elem->index_file_name = (char*) dummy_info.index_file_name;
+        }
+      }
     }
   }
   DBUG_VOID_RETURN;

=== modified file 'sql/ha_partition.h'
--- a/sql/ha_partition.h	revid:kevin.lewis@stripped
+++ b/sql/ha_partition.h	revid:kevin.lewis@stripped
@@ -381,6 +381,7 @@ private:
   bool populate_partition_name_hash();
   Partition_share *get_share();
   bool set_ha_share_ref(Handler_share **ha_share);
+  void fix_data_dir(char* path);
 
 public:
 

=== modified file 'sql/sql_partition.cc'
--- a/sql/sql_partition.cc	revid:kevin.lewis@stripped
+++ b/sql/sql_partition.cc	revid:kevin.lewis@stripped
@@ -2111,10 +2111,14 @@ static int add_keyword_path(File fptr, c
   char* last_slash= strrchr(temp_path, '/');
   if (last_slash)
   {
-    char* pound= strchr(last_slash, '#');
-    if (pound && (pound[1] == 'P' || pound[1] == 'p') && pound[2] == '#')
+    for (char* pound= strchr(last_slash, '#');
+         pound; pound = strchr(pound + 1, '#'))
     {
-      last_slash[0] = '\0';	/* truncate the file name */
+      if ((pound[1] == 'P' || pound[1] == 'p') && pound[2] == '#')
+      {
+        last_slash[0] = '\0';	/* truncate the file name */
+        break;
+      }
     }
   }
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (kevin.lewis:3883 to 3885) kevin.lewis20 Apr