List:Commits« Previous MessageNext Message »
From:kevin.lewis Date:April 17 2012 9:23pm
Subject:bzr push into mysql-trunk branch (kevin.lewis:3880 to 3882)
View as plain text  
 3882 kevin.lewis@stripped	2012-04-17 [merge]
      Merge

    added:
      mysql-test/r/mysql_embedded_client_test.result
      mysql-test/t/mysql_embedded_client_test.test
    modified:
      mysql-test/extra/rpl_tests/rpl_loaddata.test
      mysql-test/suite/engines/funcs/t/crash_manytables_number.test
      mysql-test/suite/engines/funcs/t/ld_all_number_string_calendar_types.test
      mysql-test/suite/engines/funcs/t/se_join_cross.test
      mysql-test/suite/engines/funcs/t/se_join_default.test
      mysql-test/suite/engines/funcs/t/se_join_inner.test
      mysql-test/suite/engines/funcs/t/se_join_left.test
      mysql-test/suite/engines/funcs/t/se_join_natural_left.test
      mysql-test/suite/engines/funcs/t/se_join_natural_left_outer.test
      mysql-test/suite/engines/funcs/t/se_join_natural_right.test
      mysql-test/suite/engines/funcs/t/se_join_natural_right_outer.test
      mysql-test/suite/engines/funcs/t/se_join_right.test
      mysql-test/suite/engines/funcs/t/se_join_right_outer.test
      mysql-test/suite/engines/funcs/t/se_join_straight.test
      mysql-test/suite/engines/funcs/t/se_string_limit.test
      mysql-test/suite/engines/iuds/t/update_delete_number.test
      mysql-test/suite/innodb/t/innodb_bug30423.test
      mysql-test/suite/innodb/t/innodb_bug53290.test
      mysql-test/suite/parts/t/partition_float_myisam.test
      mysql-test/suite/rpl/r/rpl_binlog_index.result
      mysql-test/suite/rpl/r/rpl_loaddata.result
      mysql-test/suite/rpl/r/rpl_parallel_start_stop.result
      mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result
      mysql-test/suite/rpl/t/rpl_binlog_index.test
      mysql-test/suite/rpl/t/rpl_innodb_bug28430.test
      mysql-test/suite/rpl/t/rpl_parallel_innodb.test
      mysql-test/suite/rpl/t/rpl_parallel_start_stop.test
      mysql-test/suite/rpl/t/rpl_rotate_purge_deadlock.test
      mysql-test/suite/rpl/t/rpl_row_img_blobs.test
      mysql-test/suite/rpl/t/rpl_row_img_eng_full.test
      mysql-test/suite/rpl/t/rpl_row_img_idx_full.test
      mysql-test/suite/rpl/t/rpl_stop_slave.test
      mysql-test/suite/rpl/t/rpl_typeconv.test
      mysql-test/t/disabled.def
      mysql-test/t/index_merge_innodb.test
      mysql-test/t/innodb_explain_json_non_select_all.test
      mysql-test/t/innodb_explain_non_select_all.test
      mysql-test/t/innodb_explain_non_select_none.test
      mysql-test/t/mysql_client_test_embedded.test
      sql/handler.cc
      sql/item.cc
      sql/item.h
      sql/item_create.cc
      sql/item_strfunc.cc
      sql/item_strfunc.h
      sql/item_subselect.cc
      sql/item_xmlfunc.cc
      sql/log_event.cc
      sql/sp_head.cc
      sql/sql_base.cc
      sql/sql_class.cc
      sql/sql_optimizer.cc
      sql/sql_parse.cc
      sql/sql_show.cc
      sql/sql_string.h
      sql/sql_table.cc
      sql/sql_yacc.yy
      storage/innobase/buf/buf0flu.cc
 3881 kevin.lewis@stripped	2012-04-17
      local commit for pb2
      Fixed problem with SHOW CREATE TABLE after relocating subpartitions.
      Added a whole series of tests with a sub-partitioned table to innodb-restart.

    modified:
      mysql-test/suite/innodb/r/innodb-restart.result
      mysql-test/suite/innodb/t/innodb-restart.test
      sql/ha_partition.cc
      sql/handler.cc
      sql/sql_partition.cc
      storage/innobase/sync/sync0sync.cc
 3880 kevin.lewis@stripped	2012-04-16
      local commit, worklog  5980, Fis a pushbuild and add test files not added in the last patch.

    added:
      mysql-test/r/partition_innodb_tablespace.result
      mysql-test/suite/innodb/r/innodb-tablespace.result
      mysql-test/suite/innodb/t/innodb-tablespace.test
      mysql-test/t/partition_innodb_tablespace.test
    modified:
      mysql-test/suite/parts/t/partition_basic_symlink_innodb.test
=== modified file 'mysql-test/extra/rpl_tests/rpl_loaddata.test'
--- a/mysql-test/extra/rpl_tests/rpl_loaddata.test	revid:kevin.lewis@stripped
+++ b/mysql-test/extra/rpl_tests/rpl_loaddata.test	revid:kevin.lewis@stripped
@@ -161,7 +161,7 @@ if (`SELECT @@global.binlog_format != 'R
   # Query causes error on master but not on slave. This causes the slave to
   # stop with error code 0 (which is wrong: see BUG#57287)
   # ER_MTS_INCONSISTENT_DATA
-  --let $slave_sql_errno= 0,1754
+  --let $slave_sql_errno= 0,1755
   --source include/wait_for_slave_sql_error.inc
   drop table t1, t2;
 }

=== added file 'mysql-test/r/mysql_embedded_client_test.result'
--- a/mysql-test/r/mysql_embedded_client_test.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/mysql_embedded_client_test.result	revid:kevin.lewis@stripped
@@ -0,0 +1,5 @@
+#
+# Bug#13541194 : MTR TEST TO RUN EMBEDDED SERVER CLIENT TESTS IN MYSQL_CLIENT_TEST.C.
+#
+stopped the current server
+# 7. Restart the server and cleanup

=== modified file 'mysql-test/suite/engines/funcs/t/crash_manytables_number.test'
--- a/mysql-test/suite/engines/funcs/t/crash_manytables_number.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/engines/funcs/t/crash_manytables_number.test	revid:kevin.lewis@stripped
@@ -1,3 +1,6 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
+
 --disable_warnings
 DROP TABLE IF EXISTS t1;
 --enable_warnings

=== modified file 'mysql-test/suite/engines/funcs/t/ld_all_number_string_calendar_types.test'
--- a/mysql-test/suite/engines/funcs/t/ld_all_number_string_calendar_types.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/engines/funcs/t/ld_all_number_string_calendar_types.test	revid:kevin.lewis@stripped
@@ -1,3 +1,5 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
 --disable_warnings
 DROP TABLE IF EXISTS t1;
 --enable_warnings

=== modified file 'mysql-test/suite/engines/funcs/t/se_join_cross.test'
--- a/mysql-test/suite/engines/funcs/t/se_join_cross.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/engines/funcs/t/se_join_cross.test	revid:kevin.lewis@stripped
@@ -1,3 +1,5 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
 --disable_warnings
 DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6;
 --enable_warnings

=== modified file 'mysql-test/suite/engines/funcs/t/se_join_default.test'
--- a/mysql-test/suite/engines/funcs/t/se_join_default.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/engines/funcs/t/se_join_default.test	revid:kevin.lewis@stripped
@@ -1,3 +1,5 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
 --disable_warnings
 DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6;
 --enable_warnings

=== modified file 'mysql-test/suite/engines/funcs/t/se_join_inner.test'
--- a/mysql-test/suite/engines/funcs/t/se_join_inner.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/engines/funcs/t/se_join_inner.test	revid:kevin.lewis@stripped
@@ -1,3 +1,5 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
 --disable_warnings
 DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6;
 --enable_warnings

=== modified file 'mysql-test/suite/engines/funcs/t/se_join_left.test'
--- a/mysql-test/suite/engines/funcs/t/se_join_left.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/engines/funcs/t/se_join_left.test	revid:kevin.lewis@stripped
@@ -1,3 +1,5 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
 --disable_warnings
 DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6;
 --enable_warnings

=== modified file 'mysql-test/suite/engines/funcs/t/se_join_natural_left.test'
--- a/mysql-test/suite/engines/funcs/t/se_join_natural_left.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/engines/funcs/t/se_join_natural_left.test	revid:kevin.lewis@stripped
@@ -1,3 +1,5 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
 --disable_warnings
 DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6;
 --enable_warnings

=== modified file 'mysql-test/suite/engines/funcs/t/se_join_natural_left_outer.test'
--- a/mysql-test/suite/engines/funcs/t/se_join_natural_left_outer.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/engines/funcs/t/se_join_natural_left_outer.test	revid:kevin.lewis@stripped
@@ -1,3 +1,5 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
 --disable_warnings
 DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6;
 --enable_warnings

=== modified file 'mysql-test/suite/engines/funcs/t/se_join_natural_right.test'
--- a/mysql-test/suite/engines/funcs/t/se_join_natural_right.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/engines/funcs/t/se_join_natural_right.test	revid:kevin.lewis@stripped
@@ -1,3 +1,5 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
 --disable_warnings
 DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6;
 --enable_warnings

=== modified file 'mysql-test/suite/engines/funcs/t/se_join_natural_right_outer.test'
--- a/mysql-test/suite/engines/funcs/t/se_join_natural_right_outer.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/engines/funcs/t/se_join_natural_right_outer.test	revid:kevin.lewis@stripped
@@ -1,3 +1,5 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
 --disable_warnings
 DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6;
 --enable_warnings

=== modified file 'mysql-test/suite/engines/funcs/t/se_join_right.test'
--- a/mysql-test/suite/engines/funcs/t/se_join_right.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/engines/funcs/t/se_join_right.test	revid:kevin.lewis@stripped
@@ -1,3 +1,5 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
 --disable_warnings
 DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6;
 --enable_warnings

=== modified file 'mysql-test/suite/engines/funcs/t/se_join_right_outer.test'
--- a/mysql-test/suite/engines/funcs/t/se_join_right_outer.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/engines/funcs/t/se_join_right_outer.test	revid:kevin.lewis@stripped
@@ -1,3 +1,5 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
 --disable_warnings
 DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6;
 --enable_warnings

=== modified file 'mysql-test/suite/engines/funcs/t/se_join_straight.test'
--- a/mysql-test/suite/engines/funcs/t/se_join_straight.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/engines/funcs/t/se_join_straight.test	revid:kevin.lewis@stripped
@@ -1,3 +1,5 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
 --disable_warnings
 DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6;
 --enable_warnings

=== modified file 'mysql-test/suite/engines/funcs/t/se_string_limit.test'
--- a/mysql-test/suite/engines/funcs/t/se_string_limit.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/engines/funcs/t/se_string_limit.test	revid:kevin.lewis@stripped
@@ -1,3 +1,5 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
 --disable_warnings
 DROP TABLE IF EXISTS t1;
 --enable_warnings

=== modified file 'mysql-test/suite/engines/iuds/t/update_delete_number.test'
--- a/mysql-test/suite/engines/iuds/t/update_delete_number.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/engines/iuds/t/update_delete_number.test	revid:kevin.lewis@stripped
@@ -1,3 +1,6 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
+
 --disable_warnings
 DROP TABLE IF EXISTS t1,t2;
 --enable_warnings

=== 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
@@ -153,6 +153,49 @@ t6	CREATE TABLE `t6` (
 SELECT count(*) FROM t6;
 count(*)
 16
+#
+# Create and insert records into a subpartitioned table that uses
+# a remote DATA DIRECTORY for each subpartition.
+#
+CREATE TABLE t7(
+c1 INT AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+ROW_FORMAT=DYNAMIC  ENGINE=InnoDB
+PARTITION BY RANGE(c1) SUBPARTITION BY HASH(c1) (
+PARTITION p0 VALUES LESS THAN (10) (
+SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir',
+SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir'),
+PARTITION p1 VALUES LESS THAN MAXVALUE (
+SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir',
+SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir'));
+INSERT INTO t7 VALUES (0, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t7 (SELECT 0, c2, c3, c4, c5 FROM t7);
+INSERT INTO t7 (SELECT 0, c2, c3, c4, c5 FROM t7);
+INSERT INTO t7 (SELECT 0, c2, c3, c4, c5 FROM t7);
+INSERT INTO t7 (SELECT 0, c2, c3, c4, c5 FROM t7);
+SHOW CREATE TABLE t7;
+Table	Create Table
+t7	CREATE TABLE `t7` (
+  `c1` int(11) NOT NULL AUTO_INCREMENT,
+  `c2` char(10) DEFAULT NULL,
+  `c3` varchar(100) DEFAULT NULL,
+  `c4` date DEFAULT NULL,
+  `c5` text,
+  PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+/*!50100 PARTITION BY RANGE (c1)
+SUBPARTITION BY HASH (c1)
+(PARTITION p0 VALUES LESS THAN (10)
+ (SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+  SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB),
+ PARTITION p1 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+  SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB)) */
+SELECT count(*) FROM t7;
+count(*)
+16
+#
+# Show these 7 tables in information_schema and list the OD files.
+#
 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
@@ -164,6 +207,10 @@ test/t5	8	Barracuda	Dynamic
 test/t6#p#p0	8	Barracuda	Compressed
 test/t6#p#p1	8	Barracuda	Compressed
 test/t6#p#p2	8	Barracuda	Compressed
+test/t7#p#p0#sp#s0	8	Barracuda	Dynamic
+test/t7#p#p0#sp#s1	8	Barracuda	Dynamic
+test/t7#p#p1#sp#s2	8	Barracuda	Dynamic
+test/t7#p#p1#sp#s3	8	Barracuda	Dynamic
 SELECT name,file_format,row_format
 FROM information_schema.innodb_sys_tablespaces;
 name	file_format	row_format
@@ -175,6 +222,10 @@ test/t5	Barracuda	Dynamic
 test/t6#p#p0	Barracuda	Compressed
 test/t6#p#p1	Barracuda	Compressed
 test/t6#p#p2	Barracuda	Compressed
+test/t7#p#p0#sp#s0	Barracuda	Dynamic
+test/t7#p#p0#sp#s1	Barracuda	Dynamic
+test/t7#p#p1#sp#s2	Barracuda	Dynamic
+test/t7#p#p1#sp#s3	Barracuda	Dynamic
 SELECT path FROM information_schema.innodb_sys_datafiles ORDER BY path;
 path
 MYSQLD_DATADIR/test/t1.ibd
@@ -185,6 +236,10 @@ MYSQL_TMP_DIR/alt_dir/test/t5.ibd
 MYSQL_TMP_DIR/alt_dir/test/t6#p#p0.ibd
 MYSQL_TMP_DIR/alt_dir/test/t6#p#p1.ibd
 MYSQL_TMP_DIR/alt_dir/test/t6#p#p2.ibd
+MYSQL_TMP_DIR/alt_dir/test/t7#p#p0#sp#s0.ibd
+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
 ---- MYSQLD_DATADIR/test
 t1.frm
 t1.ibd
@@ -201,6 +256,12 @@ t6#p#p1.isl
 t6#p#p2.isl
 t6.frm
 t6.par
+t7#p#p0#sp#s0.isl
+t7#p#p0#sp#s1.isl
+t7#p#p1#sp#s2.isl
+t7#p#p1#sp#s3.isl
+t7.frm
+t7.par
 ---- MYSQL_TMP_DIR/alt_dir
 test
 ---- MYSQL_TMP_DIR/alt_dir/test
@@ -208,6 +269,10 @@ t5.ibd
 t6#p#p0.ibd
 t6#p#p1.ibd
 t6#p#p2.ibd
+t7#p#p0#sp#s0.ibd
+t7#p#p0#sp#s1.ibd
+t7#p#p1#sp#s2.ibd
+t7#p#p1#sp#s3.ibd
 #
 # Restart the server and show that tables are still visible and accessible.
 #
@@ -278,12 +343,31 @@ t6	CREATE TABLE `t6` (
 (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) */
+SHOW CREATE TABLE t7;
+Table	Create Table
+t7	CREATE TABLE `t7` (
+  `c1` int(11) NOT NULL AUTO_INCREMENT,
+  `c2` char(10) DEFAULT NULL,
+  `c3` varchar(100) DEFAULT NULL,
+  `c4` date DEFAULT NULL,
+  `c5` text,
+  PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+/*!50100 PARTITION BY RANGE (c1)
+SUBPARTITION BY HASH (c1)
+(PARTITION p0 VALUES LESS THAN (10)
+ (SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+  SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB),
+ PARTITION p1 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+  SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB)) */
 INSERT INTO t1 (SELECT 0, c2, c3, c4, c5 FROM t1);
 INSERT INTO t2 (SELECT 0, c2, c3, c4, c5 FROM t2);
 INSERT INTO t3 (SELECT 0, c2, c3, c4, c5 FROM t3);
 INSERT INTO t4 (SELECT 0, c2, c3, c4, c5 FROM t4);
 INSERT INTO t5 (SELECT 0, c2, c3, c4, c5 FROM t5);
 INSERT INTO t6 (SELECT 0, c2, c3, c4, c5 FROM t6);
+INSERT INTO t7 (SELECT 0, c2, c3, c4, c5 FROM t7);
 SELECT count(*) FROM t1;
 count(*)
 32
@@ -302,6 +386,9 @@ count(*)
 SELECT count(*) FROM t6;
 count(*)
 32
+SELECT count(*) FROM t7;
+count(*)
+32
 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
@@ -313,6 +400,10 @@ test/t5	8	Barracuda	Dynamic
 test/t6#p#p0	8	Barracuda	Compressed
 test/t6#p#p1	8	Barracuda	Compressed
 test/t6#p#p2	8	Barracuda	Compressed
+test/t7#p#p0#sp#s0	8	Barracuda	Dynamic
+test/t7#p#p0#sp#s1	8	Barracuda	Dynamic
+test/t7#p#p1#sp#s2	8	Barracuda	Dynamic
+test/t7#p#p1#sp#s3	8	Barracuda	Dynamic
 SELECT name,file_format,row_format
 FROM information_schema.innodb_sys_tablespaces;
 name	file_format	row_format
@@ -324,6 +415,10 @@ test/t5	Barracuda	Dynamic
 test/t6#p#p0	Barracuda	Compressed
 test/t6#p#p1	Barracuda	Compressed
 test/t6#p#p2	Barracuda	Compressed
+test/t7#p#p0#sp#s0	Barracuda	Dynamic
+test/t7#p#p0#sp#s1	Barracuda	Dynamic
+test/t7#p#p1#sp#s2	Barracuda	Dynamic
+test/t7#p#p1#sp#s3	Barracuda	Dynamic
 SELECT path FROM information_schema.innodb_sys_datafiles ORDER BY path;
 path
 MYSQLD_DATADIR/test/t1.ibd
@@ -334,6 +429,10 @@ MYSQL_TMP_DIR/alt_dir/test/t5.ibd
 MYSQL_TMP_DIR/alt_dir/test/t6#p#p0.ibd
 MYSQL_TMP_DIR/alt_dir/test/t6#p#p1.ibd
 MYSQL_TMP_DIR/alt_dir/test/t6#p#p2.ibd
+MYSQL_TMP_DIR/alt_dir/test/t7#p#p0#sp#s0.ibd
+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
 DROP TABLE t1;
 DROP TABLE t2;
 DROP TABLE t3;
@@ -343,12 +442,17 @@ DROP TABLE t4;
 #
 TRUNCATE TABLE t5;
 ALTER TABLE t6 TRUNCATE PARTITION p2;
+ALTER TABLE t7 TRUNCATE PARTITION p1;
 SELECT path FROM information_schema.innodb_sys_datafiles ORDER BY path;
 path
 MYSQL_TMP_DIR/alt_dir/test/t5.ibd
 MYSQL_TMP_DIR/alt_dir/test/t6#p#p0.ibd
 MYSQL_TMP_DIR/alt_dir/test/t6#p#p1.ibd
 MYSQL_TMP_DIR/alt_dir/test/t6#p#p2.ibd
+MYSQL_TMP_DIR/alt_dir/test/t7#p#p0#sp#s0.ibd
+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 VALUES (1000000000, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
 INSERT INTO t5 (SELECT 0, c2, c3, c4, c5 FROM t5);
 SELECT count(*) FROM t5;
@@ -383,6 +487,28 @@ t6	CREATE TABLE `t6` (
 (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
+SHOW CREATE TABLE t7;
+Table	Create Table
+t7	CREATE TABLE `t7` (
+  `c1` int(11) NOT NULL AUTO_INCREMENT,
+  `c2` char(10) DEFAULT NULL,
+  `c3` varchar(100) DEFAULT NULL,
+  `c4` date DEFAULT NULL,
+  `c5` text,
+  PRIMARY KEY (`c1`)
+) 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)
+ (SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+  SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB),
+ PARTITION p1 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+  SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB)) */
 #
 # Restart the server
 #
@@ -395,6 +521,10 @@ MYSQL_TMP_DIR/alt_dir/test/t5.ibd
 MYSQL_TMP_DIR/alt_dir/test/t6#p#p0.ibd
 MYSQL_TMP_DIR/alt_dir/test/t6#p#p1.ibd
 MYSQL_TMP_DIR/alt_dir/test/t6#p#p2.ibd
+MYSQL_TMP_DIR/alt_dir/test/t7#p#p0#sp#s0.ibd
+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(*)
@@ -427,6 +557,28 @@ t6	CREATE TABLE `t6` (
 (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
+SHOW CREATE TABLE t7;
+Table	Create Table
+t7	CREATE TABLE `t7` (
+  `c1` int(11) NOT NULL AUTO_INCREMENT,
+  `c2` char(10) DEFAULT NULL,
+  `c3` varchar(100) DEFAULT NULL,
+  `c4` date DEFAULT NULL,
+  `c5` text,
+  PRIMARY KEY (`c1`)
+) 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)
+ (SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+  SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB),
+ PARTITION p1 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+  SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB)) */
 #
 # Rename file table and tablespace, then restart
 #
@@ -438,13 +590,24 @@ t6#p#p1.isl
 t6#p#p2.isl
 t6.frm
 t6.par
+t7#p#p0#sp#s0.isl
+t7#p#p0#sp#s1.isl
+t7#p#p1#sp#s2.isl
+t7#p#p1#sp#s3.isl
+t7.frm
+t7.par
 ---- MYSQL_TMP_DIR/alt_dir/test
 t5.ibd
 t6#p#p0.ibd
 t6#p#p1.ibd
 t6#p#p2.ibd
+t7#p#p0#sp#s0.ibd
+t7#p#p0#sp#s1.ibd
+t7#p#p1#sp#s2.ibd
+t7#p#p1#sp#s3.ibd
 RENAME TABLE t5 TO t55;
 RENAME TABLE t6 TO t66;
+RENAME TABLE t7 TO t77;
 ---- MYSQLD_DATADIR/test
 t55.frm
 t55.isl
@@ -453,17 +616,31 @@ t66#p#p1.isl
 t66#p#p2.isl
 t66.frm
 t66.par
+t77#p#p0#sp#s0.isl
+t77#p#p0#sp#s1.isl
+t77#p#p1#sp#s2.isl
+t77#p#p1#sp#s3.isl
+t77.frm
+t77.par
 ---- MYSQL_TMP_DIR/alt_dir/test
 t55.ibd
 t66#p#p0.ibd
 t66#p#p1.ibd
 t66#p#p2.ibd
+t77#p#p0#sp#s0.ibd
+t77#p#p0#sp#s1.ibd
+t77#p#p1#sp#s2.ibd
+t77#p#p1#sp#s3.ibd
 SELECT path FROM information_schema.innodb_sys_datafiles ORDER BY path;
 path
 MYSQL_TMP_DIR/alt_dir/test/t55.ibd
 MYSQL_TMP_DIR/alt_dir/test/t66#p#p0.ibd
 MYSQL_TMP_DIR/alt_dir/test/t66#p#p1.ibd
 MYSQL_TMP_DIR/alt_dir/test/t66#p#p2.ibd
+MYSQL_TMP_DIR/alt_dir/test/t77#p#p0#sp#s0.ibd
+MYSQL_TMP_DIR/alt_dir/test/t77#p#p0#sp#s1.ibd
+MYSQL_TMP_DIR/alt_dir/test/t77#p#p1#sp#s2.ibd
+MYSQL_TMP_DIR/alt_dir/test/t77#p#p1#sp#s3.ibd
 INSERT INTO t55 (SELECT 0, c2, c3, c4, c5 FROM t55);
 SELECT count(*) FROM t55;
 count(*)
@@ -496,6 +673,28 @@ t66	CREATE TABLE `t66` (
 (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 t77 (SELECT 0, c2, c3, c4, c5 FROM t77);
+SELECT count(*) FROM t77;
+count(*)
+72
+SHOW CREATE TABLE t77;
+Table	Create Table
+t77	CREATE TABLE `t77` (
+  `c1` int(11) NOT NULL AUTO_INCREMENT,
+  `c2` char(10) DEFAULT NULL,
+  `c3` varchar(100) DEFAULT NULL,
+  `c4` date DEFAULT NULL,
+  `c5` text,
+  PRIMARY KEY (`c1`)
+) 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)
+ (SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+  SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB),
+ PARTITION p1 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+  SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB)) */
 #
 # Restart the server
 #
@@ -508,6 +707,10 @@ MYSQL_TMP_DIR/alt_dir/test/t55.ibd
 MYSQL_TMP_DIR/alt_dir/test/t66#p#p0.ibd
 MYSQL_TMP_DIR/alt_dir/test/t66#p#p1.ibd
 MYSQL_TMP_DIR/alt_dir/test/t66#p#p2.ibd
+MYSQL_TMP_DIR/alt_dir/test/t77#p#p0#sp#s0.ibd
+MYSQL_TMP_DIR/alt_dir/test/t77#p#p0#sp#s1.ibd
+MYSQL_TMP_DIR/alt_dir/test/t77#p#p1#sp#s2.ibd
+MYSQL_TMP_DIR/alt_dir/test/t77#p#p1#sp#s3.ibd
 INSERT INTO t55 (SELECT 0, c2, c3, c4, c5 FROM t55);
 SELECT count(*) FROM t55;
 count(*)
@@ -540,6 +743,28 @@ t66	CREATE TABLE `t66` (
 (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 t77 (SELECT 0, c2, c3, c4, c5 FROM t77);
+SELECT count(*) FROM t77;
+count(*)
+144
+SHOW CREATE TABLE t77;
+Table	Create Table
+t77	CREATE TABLE `t77` (
+  `c1` int(11) NOT NULL AUTO_INCREMENT,
+  `c2` char(10) DEFAULT NULL,
+  `c3` varchar(100) DEFAULT NULL,
+  `c4` date DEFAULT NULL,
+  `c5` text,
+  PRIMARY KEY (`c1`)
+) 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)
+ (SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+  SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB),
+ PARTITION p1 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB,
+  SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/alt_dir' ENGINE = InnoDB)) */
 #
 # Restart the server
 #
@@ -554,11 +779,21 @@ t66#p#p1.isl
 t66#p#p2.isl
 t66.frm
 t66.par
+t77#p#p0#sp#s0.isl
+t77#p#p0#sp#s1.isl
+t77#p#p1#sp#s2.isl
+t77#p#p1#sp#s3.isl
+t77.frm
+t77.par
 ---- MYSQL_TMP_DIR/alt_dir/test
 t55.ibd
 t66#p#p0.ibd
 t66#p#p1.ibd
 t66#p#p2.ibd
+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;
 # Moving tablespaces from MYSQL_TMP_DIR/alt_dir to MYSQL_TMP_DIR/new_dir
 UNLOCK TABLES;
@@ -570,11 +805,21 @@ t66#p#p1.isl
 t66#p#p2.isl
 t66.frm
 t66.par
+t77#p#p0#sp#s0.isl
+t77#p#p0#sp#s1.isl
+t77#p#p1#sp#s2.isl
+t77#p#p1#sp#s3.isl
+t77.frm
+t77.par
 ---- MYSQL_TMP_DIR/new_dir/test
 t55.ibd
 t66#p#p0.ibd
 t66#p#p1.ibd
 t66#p#p2.ibd
+t77#p#p0#sp#s0.ibd
+t77#p#p0#sp#s1.ibd
+t77#p#p1#sp#s2.ibd
+t77#p#p1#sp#s3.ibd
 #
 # Restart the server, remove old tablespaces and check tablespaces.
 #
@@ -585,6 +830,10 @@ MYSQL_TMP_DIR/new_dir/test/t55.ibd
 MYSQL_TMP_DIR/new_dir/test/t66#p#p0.ibd
 MYSQL_TMP_DIR/new_dir/test/t66#p#p1.ibd
 MYSQL_TMP_DIR/new_dir/test/t66#p#p2.ibd
+MYSQL_TMP_DIR/new_dir/test/t77#p#p0#sp#s0.ibd
+MYSQL_TMP_DIR/new_dir/test/t77#p#p0#sp#s1.ibd
+MYSQL_TMP_DIR/new_dir/test/t77#p#p1#sp#s2.ibd
+MYSQL_TMP_DIR/new_dir/test/t77#p#p1#sp#s3.ibd
 INSERT INTO t55 (SELECT 0, c2, c3, c4, c5 FROM t55);
 SELECT count(*) FROM t55;
 count(*)
@@ -617,6 +866,28 @@ t66	CREATE TABLE `t66` (
 (PARTITION p0 DATA DIRECTORY = 'MYSQL_TMP_DIR/new_dir' ENGINE = InnoDB,
  PARTITION p1 DATA DIRECTORY = 'MYSQL_TMP_DIR/new_dir' ENGINE = InnoDB,
  PARTITION p2 DATA DIRECTORY = 'MYSQL_TMP_DIR/new_dir' ENGINE = InnoDB) */
+INSERT INTO t77 (SELECT 0, c2, c3, c4, c5 FROM t77);
+SELECT count(*) FROM t77;
+count(*)
+288
+SHOW CREATE TABLE t77;
+Table	Create Table
+t77	CREATE TABLE `t77` (
+  `c1` int(11) NOT NULL AUTO_INCREMENT,
+  `c2` char(10) DEFAULT NULL,
+  `c3` varchar(100) DEFAULT NULL,
+  `c4` date DEFAULT NULL,
+  `c5` text,
+  PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=289 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+/*!50100 PARTITION BY RANGE (c1)
+SUBPARTITION BY HASH (c1)
+(PARTITION p0 VALUES LESS THAN (10)
+ (SUBPARTITION s0 DATA DIRECTORY = 'MYSQL_TMP_DIR/new_dir' ENGINE = InnoDB,
+  SUBPARTITION s1 DATA DIRECTORY = 'MYSQL_TMP_DIR/new_dir' ENGINE = InnoDB),
+ PARTITION p1 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION s2 DATA DIRECTORY = 'MYSQL_TMP_DIR/new_dir' ENGINE = InnoDB,
+  SUBPARTITION s3 DATA DIRECTORY = 'MYSQL_TMP_DIR/new_dir' ENGINE = InnoDB)) */
 #
 # Restart the server
 #
@@ -631,11 +902,21 @@ t66#p#p1.isl
 t66#p#p2.isl
 t66.frm
 t66.par
+t77#p#p0#sp#s0.isl
+t77#p#p0#sp#s1.isl
+t77#p#p1#sp#s2.isl
+t77#p#p1#sp#s3.isl
+t77.frm
+t77.par
 ---- MYSQL_TMP_DIR/new_dir/test
 t55.ibd
 t66#p#p0.ibd
 t66#p#p1.ibd
 t66#p#p2.ibd
+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;
 # Moving tablespaces from MYSQL_TMP_DIR/new_dir to MYSQLD_DATADIR
 UNLOCK TABLES;
@@ -647,11 +928,21 @@ t66#p#p1.ibd
 t66#p#p2.ibd
 t66.frm
 t66.par
+t77#p#p0#sp#s0.ibd
+t77#p#p0#sp#s1.ibd
+t77#p#p1#sp#s2.ibd
+t77#p#p1#sp#s3.ibd
+t77.frm
+t77.par
 ---- MYSQL_TMP_DIR/new_dir/test
 t55.ibd
 t66#p#p0.ibd
 t66#p#p1.ibd
 t66#p#p2.ibd
+t77#p#p0#sp#s0.ibd
+t77#p#p0#sp#s1.ibd
+t77#p#p1#sp#s2.ibd
+t77#p#p1#sp#s3.ibd
 # 
 # Restart the server, remove old tablespaces and check tablespaces.
 # 
@@ -662,6 +953,10 @@ MYSQLD_DATADIR/test/t55.ibd
 MYSQLD_DATADIR/test/t66#p#p0.ibd
 MYSQLD_DATADIR/test/t66#p#p1.ibd
 MYSQLD_DATADIR/test/t66#p#p2.ibd
+MYSQLD_DATADIR/test/t77#p#p0#sp#s0.ibd
+MYSQLD_DATADIR/test/t77#p#p0#sp#s1.ibd
+MYSQLD_DATADIR/test/t77#p#p1#sp#s2.ibd
+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(*)
@@ -694,8 +989,31 @@ t66	CREATE TABLE `t66` (
 (PARTITION p0 ENGINE = InnoDB,
  PARTITION p1 ENGINE = InnoDB,
  PARTITION p2 ENGINE = InnoDB) */
+INSERT INTO t77 (SELECT 0, c2, c3, c4, c5 FROM t77);
+SELECT count(*) FROM t77;
+count(*)
+576
+SHOW CREATE TABLE t77;
+Table	Create Table
+t77	CREATE TABLE `t77` (
+  `c1` int(11) NOT NULL AUTO_INCREMENT,
+  `c2` char(10) DEFAULT NULL,
+  `c3` varchar(100) DEFAULT NULL,
+  `c4` date DEFAULT NULL,
+  `c5` text,
+  PRIMARY KEY (`c1`)
+) ENGINE=InnoDB AUTO_INCREMENT=577 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+/*!50100 PARTITION BY RANGE (c1)
+SUBPARTITION BY HASH (c1)
+(PARTITION p0 VALUES LESS THAN (10)
+ (SUBPARTITION s0 ENGINE = InnoDB,
+  SUBPARTITION s1 ENGINE = InnoDB),
+ PARTITION p1 VALUES LESS THAN MAXVALUE
+ (SUBPARTITION s2 ENGINE = InnoDB,
+  SUBPARTITION s3 ENGINE = InnoDB)) */
 #
 # Cleanup
 #
 DROP TABLE t55;
 DROP TABLE t66;
+DROP TABLE t77;

=== 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
@@ -100,12 +100,12 @@ SELECT count(*) FROM t5;
 --echo #
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 eval CREATE TABLE t6(
-	c1 INT AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
-	ROW_FORMAT=COMPRESSED  ENGINE=InnoDB
-        PARTITION BY HASH(c1) (
-	  PARTITION p0  DATA DIRECTORY = '$MYSQL_TMP_DIR/alt_dir',
-	  PARTITION p1  DATA DIRECTORY = '$MYSQL_TMP_DIR/alt_dir',
-	  PARTITION p2  DATA DIRECTORY = '$MYSQL_TMP_DIR/alt_dir');
+  c1 INT AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+  ROW_FORMAT=COMPRESSED  ENGINE=InnoDB
+  PARTITION BY HASH(c1) (
+    PARTITION p0  DATA DIRECTORY = '$MYSQL_TMP_DIR/alt_dir',
+    PARTITION p1  DATA DIRECTORY = '$MYSQL_TMP_DIR/alt_dir',
+    PARTITION p2  DATA DIRECTORY = '$MYSQL_TMP_DIR/alt_dir');
 INSERT INTO t6 VALUES (0, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
 INSERT INTO t6 (SELECT 0, c2, c3, c4, c5 FROM t6);
 INSERT INTO t6 (SELECT 0, c2, c3, c4, c5 FROM t6);
@@ -115,22 +115,49 @@ INSERT INTO t6 (SELECT 0, c2, c3, c4, c5
 SHOW CREATE TABLE t6;
 SELECT count(*) FROM t6;
 
---replace_regex /#P#/#p#/
+--echo #
+--echo # Create and insert records into a subpartitioned table that uses
+--echo # a remote DATA DIRECTORY for each subpartition.
+--echo #
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+eval CREATE TABLE t7(
+	c1 INT AUTO_INCREMENT KEY, c2 CHAR(10), c3 VARCHAR(100), c4 DATE, c5 TEXT)
+	ROW_FORMAT=DYNAMIC  ENGINE=InnoDB
+        PARTITION BY RANGE(c1) SUBPARTITION BY HASH(c1) (
+          PARTITION p0 VALUES LESS THAN (10) (
+	    SUBPARTITION s0 DATA DIRECTORY = '$MYSQL_TMP_DIR/alt_dir',
+	    SUBPARTITION s1 DATA DIRECTORY = '$MYSQL_TMP_DIR/alt_dir'),
+	  PARTITION p1 VALUES LESS THAN MAXVALUE (
+	    SUBPARTITION s2 DATA DIRECTORY = '$MYSQL_TMP_DIR/alt_dir',
+	    SUBPARTITION s3 DATA DIRECTORY = '$MYSQL_TMP_DIR/alt_dir'));
+INSERT INTO t7 VALUES (0, 'MySQL', 'InnoDB', '2011-11-11', 'Read this after reboot');
+INSERT INTO t7 (SELECT 0, c2, c3, c4, c5 FROM t7);
+INSERT INTO t7 (SELECT 0, c2, c3, c4, c5 FROM t7);
+INSERT INTO t7 (SELECT 0, c2, c3, c4, c5 FROM t7);
+INSERT INTO t7 (SELECT 0, c2, c3, c4, c5 FROM t7);
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t7;
+SELECT count(*) FROM t7;
+
+--echo #
+--echo # Show these 7 tables in information_schema and list the OD files.
+--echo #
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/
 SELECT name,n_cols,file_format,row_format
        FROM information_schema.innodb_sys_tables WHERE name like 'test%';
---replace_regex /#P#/#p#/
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/
 SELECT name,file_format,row_format
        FROM information_schema.innodb_sys_tablespaces;
---replace_regex /#P#/#p#/
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/
 --replace_result ./ MYSQLD_DATADIR/  $MYSQLD_DATADIR MYSQLD_DATADIR  $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SELECT path FROM information_schema.innodb_sys_datafiles ORDER BY path;
 --echo ---- MYSQLD_DATADIR/test
---replace_regex /#P#/#p#/
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/
 --list_files $MYSQLD_DATADIR/test
 --echo ---- MYSQL_TMP_DIR/alt_dir
 --list_files $MYSQL_TMP_DIR/alt_dir
 --echo ---- MYSQL_TMP_DIR/alt_dir/test
---replace_regex /#P#/#p#/
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/
 --list_files $MYSQL_TMP_DIR/alt_dir/test
 
 --echo #
@@ -147,6 +174,8 @@ SHOW CREATE TABLE t4;
 SHOW CREATE TABLE t5;
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SHOW CREATE TABLE t6;
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t7;
 
 INSERT INTO t1 (SELECT 0, c2, c3, c4, c5 FROM t1);
 INSERT INTO t2 (SELECT 0, c2, c3, c4, c5 FROM t2);
@@ -154,6 +183,7 @@ INSERT INTO t3 (SELECT 0, c2, c3, c4, c5
 INSERT INTO t4 (SELECT 0, c2, c3, c4, c5 FROM t4);
 INSERT INTO t5 (SELECT 0, c2, c3, c4, c5 FROM t5);
 INSERT INTO t6 (SELECT 0, c2, c3, c4, c5 FROM t6);
+INSERT INTO t7 (SELECT 0, c2, c3, c4, c5 FROM t7);
 
 SELECT count(*) FROM t1;
 SELECT count(*) FROM t2;
@@ -161,14 +191,15 @@ SELECT count(*) FROM t3;
 SELECT count(*) FROM t4;
 SELECT count(*) FROM t5;
 SELECT count(*) FROM t6;
+SELECT count(*) FROM t7;
 
---replace_regex /#P#/#p#/
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/
 SELECT name,n_cols,file_format,row_format
        FROM information_schema.innodb_sys_tables WHERE name like 'test%';
---replace_regex /#P#/#p#/
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/
 SELECT name,file_format,row_format
        FROM information_schema.innodb_sys_tablespaces;
---replace_regex /#P#/#p#/
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/
 --replace_result ./ MYSQLD_DATADIR/  $MYSQLD_DATADIR MYSQLD_DATADIR  $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SELECT path FROM information_schema.innodb_sys_datafiles ORDER BY path;
 
@@ -182,8 +213,9 @@ DROP TABLE t4;
 --echo #
 TRUNCATE TABLE t5;
 ALTER TABLE t6 TRUNCATE PARTITION p2;
+ALTER TABLE t7 TRUNCATE PARTITION p1;
 
---replace_regex /#P#/#p#/
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SELECT path FROM information_schema.innodb_sys_datafiles ORDER BY path;
 
@@ -199,13 +231,18 @@ 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;
+
 --echo #
 --echo # Restart the server
 --echo #
 --source include/restart_mysqld.inc
 SHOW VARIABLES LIKE 'innodb_file_per_table';
 
---replace_regex /#P#/#p#/
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SELECT path FROM information_schema.innodb_sys_datafiles ORDER BY path;
 
@@ -219,26 +256,32 @@ 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;
+
 
 --echo #
 --echo # Rename file table and tablespace, then restart
 --echo #
 --echo ---- MYSQLD_DATADIR/test
---replace_regex /#P#/#p#/
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/  /#SP#/#sp#/
 --list_files $MYSQLD_DATADIR/test
 --echo ---- MYSQL_TMP_DIR/alt_dir/test
---replace_regex /#P#/#p#/
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/
 --list_files $MYSQL_TMP_DIR/alt_dir/test
 RENAME TABLE t5 TO t55;
 RENAME TABLE t6 TO t66;
+RENAME TABLE t7 TO t77;
 --echo ---- MYSQLD_DATADIR/test
---replace_regex /#P#/#p#/
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/
 --list_files $MYSQLD_DATADIR/test
 --echo ---- MYSQL_TMP_DIR/alt_dir/test
---replace_regex /#P#/#p#/
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/
 --list_files $MYSQL_TMP_DIR/alt_dir/test
 
---replace_regex /#P#/#p#/
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SELECT path FROM information_schema.innodb_sys_datafiles ORDER BY path;
 
@@ -252,6 +295,11 @@ SELECT count(*) FROM t66;
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SHOW CREATE TABLE t66;
 
+INSERT INTO t77 (SELECT 0, c2, c3, c4, c5 FROM t77);
+SELECT count(*) FROM t77;
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t77;
+
 
 --echo #
 --echo # Restart the server
@@ -259,7 +307,7 @@ SHOW CREATE TABLE t66;
 --source include/restart_mysqld.inc
 SHOW VARIABLES LIKE 'innodb_file_per_table';
 
---replace_regex /#P#/#p#/
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR  $MYSQLD_DATADIR MYSQLD_DATADIR  ./ MYSQLD_DATADIR/
 SELECT path FROM information_schema.innodb_sys_datafiles ORDER BY path;
 
@@ -273,6 +321,11 @@ SELECT count(*) FROM t66;
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SHOW CREATE TABLE t66;
 
+INSERT INTO t77 (SELECT 0, c2, c3, c4, c5 FROM t77);
+SELECT count(*) FROM t77;
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t77;
+
 --echo #
 --echo # Restart the server
 --echo #
@@ -282,10 +335,10 @@ SHOW CREATE TABLE t66;
 --echo # Move the remote tablespaces to a new location and change the ISL file
 --echo #
 --echo ---- MYSQLD_DATADIR/test
---replace_regex /#P#/#p#/
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/
 --list_files $MYSQLD_DATADIR/test
 --echo ---- MYSQL_TMP_DIR/alt_dir/test
---replace_regex /#P#/#p#/
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/
 --list_files $MYSQL_TMP_DIR/alt_dir/test
 FLUSH TABLE t55,t66 WITH READ LOCK;
 --echo # Moving tablespaces from MYSQL_TMP_DIR/alt_dir to MYSQL_TMP_DIR/new_dir
@@ -295,20 +348,32 @@ FLUSH TABLE t55,t66 WITH READ LOCK;
 --copy_file $MYSQL_TMP_DIR/alt_dir/test/t66#P#p0.ibd $MYSQL_TMP_DIR/new_dir/test/t66#P#p0.ibd
 --copy_file $MYSQL_TMP_DIR/alt_dir/test/t66#P#p1.ibd $MYSQL_TMP_DIR/new_dir/test/t66#P#p1.ibd
 --copy_file $MYSQL_TMP_DIR/alt_dir/test/t66#P#p2.ibd $MYSQL_TMP_DIR/new_dir/test/t66#P#p2.ibd
+--copy_file $MYSQL_TMP_DIR/alt_dir/test/t77#P#p0#SP#s0.ibd $MYSQL_TMP_DIR/new_dir/test/t77#P#p0#SP#s0.ibd
+--copy_file $MYSQL_TMP_DIR/alt_dir/test/t77#P#p0#SP#s1.ibd $MYSQL_TMP_DIR/new_dir/test/t77#P#p0#SP#s1.ibd
+--copy_file $MYSQL_TMP_DIR/alt_dir/test/t77#P#p1#SP#s2.ibd $MYSQL_TMP_DIR/new_dir/test/t77#P#p1#SP#s2.ibd
+--copy_file $MYSQL_TMP_DIR/alt_dir/test/t77#P#p1#SP#s3.ibd $MYSQL_TMP_DIR/new_dir/test/t77#P#p1#SP#s3.ibd
 --remove_file $MYSQLD_DATADIR/test/t55.isl
 --remove_file $MYSQLD_DATADIR/test/t66#P#p0.isl
 --remove_file $MYSQLD_DATADIR/test/t66#P#p1.isl
 --remove_file $MYSQLD_DATADIR/test/t66#P#p2.isl
+--remove_file $MYSQLD_DATADIR/test/t77#P#p0#SP#s0.isl
+--remove_file $MYSQLD_DATADIR/test/t77#P#p0#SP#s1.isl
+--remove_file $MYSQLD_DATADIR/test/t77#P#p1#SP#s2.isl
+--remove_file $MYSQLD_DATADIR/test/t77#P#p1#SP#s3.isl
 --exec echo $MYSQL_TMP_DIR/new_dir/test/t55.ibd > $MYSQLD_DATADIR/test/t55.isl
 --exec echo $MYSQL_TMP_DIR/new_dir/test/t66#P#p0.ibd > $MYSQLD_DATADIR/test/t66#P#p0.isl
 --exec echo $MYSQL_TMP_DIR/new_dir/test/t66#P#p1.ibd > $MYSQLD_DATADIR/test/t66#P#p1.isl
 --exec echo $MYSQL_TMP_DIR/new_dir/test/t66#P#p2.ibd > $MYSQLD_DATADIR/test/t66#P#p2.isl
+--exec echo $MYSQL_TMP_DIR/new_dir/test/t77#P#p0#SP#s0.ibd > $MYSQLD_DATADIR/test/t77#P#p0#SP#s0.isl
+--exec echo $MYSQL_TMP_DIR/new_dir/test/t77#P#p0#SP#s1.ibd > $MYSQLD_DATADIR/test/t77#P#p0#SP#s1.isl
+--exec echo $MYSQL_TMP_DIR/new_dir/test/t77#P#p1#SP#s2.ibd > $MYSQLD_DATADIR/test/t77#P#p1#SP#s2.isl
+--exec echo $MYSQL_TMP_DIR/new_dir/test/t77#P#p1#SP#s3.ibd > $MYSQLD_DATADIR/test/t77#P#p1#SP#s3.isl
 UNLOCK TABLES;
 --echo ---- MYSQLD_DATADIR/test
---replace_regex /#P#/#p#/
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/
 --list_files $MYSQLD_DATADIR/test
 --echo ---- MYSQL_TMP_DIR/new_dir/test
---replace_regex /#P#/#p#/
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/
 --list_files $MYSQL_TMP_DIR/new_dir/test
 
 --echo #
@@ -320,10 +385,14 @@ UNLOCK TABLES;
 --remove_file $MYSQL_TMP_DIR/alt_dir/test/t66#P#p0.ibd
 --remove_file $MYSQL_TMP_DIR/alt_dir/test/t66#P#p1.ibd
 --remove_file $MYSQL_TMP_DIR/alt_dir/test/t66#P#p2.ibd
+--remove_file $MYSQL_TMP_DIR/alt_dir/test/t77#P#p0#SP#s0.ibd
+--remove_file $MYSQL_TMP_DIR/alt_dir/test/t77#P#p0#SP#s1.ibd
+--remove_file $MYSQL_TMP_DIR/alt_dir/test/t77#P#p1#SP#s2.ibd
+--remove_file $MYSQL_TMP_DIR/alt_dir/test/t77#P#p1#SP#s3.ibd
 --echo ---- MYSQL_TMP_DIR/alt_dir/test
 --list_files $MYSQL_TMP_DIR/alt_dir/test
 
---replace_regex /#P#/#p#/
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SELECT path FROM information_schema.innodb_sys_datafiles ORDER BY path;
 
@@ -337,6 +406,11 @@ SELECT count(*) FROM t66;
 --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
 SHOW CREATE TABLE t66;
 
+INSERT INTO t77 (SELECT 0, c2, c3, c4, c5 FROM t77);
+SELECT count(*) FROM t77;
+--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
+SHOW CREATE TABLE t77;
+
 --echo #
 --echo # Restart the server
 --echo #
@@ -346,10 +420,10 @@ SHOW CREATE TABLE t66;
 --echo # Move the remote tablespace back to the default datadir and delete the ISL file.
 --echo #
 --echo ---- MYSQLD_DATADIR/test
---replace_regex /#P#/#p#/
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/
 --list_files $MYSQLD_DATADIR/test
 --echo ---- MYSQL_TMP_DIR/new_dir/test
---replace_regex /#P#/#p#/
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/
 --list_files $MYSQL_TMP_DIR/new_dir/test
 FLUSH TABLE t55 WITH READ LOCK;
 --echo # Moving tablespaces from MYSQL_TMP_DIR/new_dir to MYSQLD_DATADIR
@@ -357,16 +431,24 @@ FLUSH TABLE t55 WITH READ LOCK;
 --copy_file $MYSQL_TMP_DIR/new_dir/test/t66#P#p0.ibd $MYSQLD_DATADIR/test/t66#P#p0.ibd
 --copy_file $MYSQL_TMP_DIR/new_dir/test/t66#P#p1.ibd $MYSQLD_DATADIR/test/t66#P#p1.ibd
 --copy_file $MYSQL_TMP_DIR/new_dir/test/t66#P#p2.ibd $MYSQLD_DATADIR/test/t66#P#p2.ibd
+--copy_file $MYSQL_TMP_DIR/new_dir/test/t77#P#p0#SP#s0.ibd $MYSQLD_DATADIR/test/t77#P#p0#SP#s0.ibd
+--copy_file $MYSQL_TMP_DIR/new_dir/test/t77#P#p0#SP#s1.ibd $MYSQLD_DATADIR/test/t77#P#p0#SP#s1.ibd
+--copy_file $MYSQL_TMP_DIR/new_dir/test/t77#P#p1#SP#s2.ibd $MYSQLD_DATADIR/test/t77#P#p1#SP#s2.ibd
+--copy_file $MYSQL_TMP_DIR/new_dir/test/t77#P#p1#SP#s3.ibd $MYSQLD_DATADIR/test/t77#P#p1#SP#s3.ibd
 --remove_file $MYSQLD_DATADIR/test/t55.isl
 --remove_file $MYSQLD_DATADIR/test/t66#P#p0.isl
 --remove_file $MYSQLD_DATADIR/test/t66#P#p1.isl
 --remove_file $MYSQLD_DATADIR/test/t66#P#p2.isl
+--remove_file $MYSQLD_DATADIR/test/t77#P#p0#SP#s0.isl
+--remove_file $MYSQLD_DATADIR/test/t77#P#p0#SP#s1.isl
+--remove_file $MYSQLD_DATADIR/test/t77#P#p1#SP#s2.isl
+--remove_file $MYSQLD_DATADIR/test/t77#P#p1#SP#s3.isl
 UNLOCK TABLES;
 --echo ---- MYSQLD_DATADIR/test
---replace_regex /#P#/#p#/
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/
 --list_files $MYSQLD_DATADIR/test
 --echo ---- MYSQL_TMP_DIR/new_dir/test
---replace_regex /#P#/#p#/
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/
 --list_files $MYSQL_TMP_DIR/new_dir/test
 
 --echo # 
@@ -378,10 +460,14 @@ UNLOCK TABLES;
 --remove_file $MYSQL_TMP_DIR/new_dir/test/t66#P#p0.ibd
 --remove_file $MYSQL_TMP_DIR/new_dir/test/t66#P#p1.ibd
 --remove_file $MYSQL_TMP_DIR/new_dir/test/t66#P#p2.ibd
+--remove_file $MYSQL_TMP_DIR/new_dir/test/t77#P#p0#SP#s0.ibd
+--remove_file $MYSQL_TMP_DIR/new_dir/test/t77#P#p0#SP#s1.ibd
+--remove_file $MYSQL_TMP_DIR/new_dir/test/t77#P#p1#SP#s2.ibd
+--remove_file $MYSQL_TMP_DIR/new_dir/test/t77#P#p1#SP#s3.ibd
 --echo ---- MYSQL_TMP_DIR/new_dir/test
 --list_files $MYSQL_TMP_DIR/new_dir/test
 
---replace_regex /#P#/#p#/
+--replace_regex  /#P#/#p#/  /#SP#/#sp#/
 --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR ./ MYSQLD_DATADIR/
 SELECT path FROM information_schema.innodb_sys_datafiles ORDER BY path;
 
@@ -395,6 +481,11 @@ SELECT count(*) FROM t66;
 --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR ./ MYSQLD_DATADIR/
 SHOW CREATE TABLE t66;
 
+INSERT INTO t77 (SELECT 0, c2, c3, c4, c5 FROM t77);
+SELECT count(*) FROM t77;
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR ./ MYSQLD_DATADIR/
+SHOW CREATE TABLE t77;
+
 
 --echo #
 --echo # Cleanup
@@ -402,6 +493,7 @@ SHOW CREATE TABLE t66;
 
 DROP TABLE t55;
 DROP TABLE t66;
+DROP TABLE t77;
 
 --rmdir $MYSQL_TMP_DIR/alt_dir/test
 --rmdir $MYSQL_TMP_DIR/alt_dir

=== modified file 'mysql-test/suite/innodb/t/innodb_bug30423.test'
--- a/mysql-test/suite/innodb/t/innodb_bug30423.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/innodb/t/innodb_bug30423.test	revid:kevin.lewis@stripped
@@ -1,3 +1,5 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
 # Test for Bug #30423, InnoDBs treatment of NULL in index stats causes
 # bad "rows examined" estimates.
 # Implemented InnoDB system variable "innodb_stats_method" with

=== modified file 'mysql-test/suite/innodb/t/innodb_bug53290.test'
--- a/mysql-test/suite/innodb/t/innodb_bug53290.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/innodb/t/innodb_bug53290.test	revid:kevin.lewis@stripped
@@ -1,3 +1,6 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
+
 -- source include/have_innodb.inc
 
 create table bug53290 (x bigint) engine=innodb;

=== modified file 'mysql-test/suite/parts/t/partition_float_myisam.test'
--- a/mysql-test/suite/parts/t/partition_float_myisam.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/parts/t/partition_float_myisam.test	revid:kevin.lewis@stripped
@@ -1,3 +1,5 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
 ################################################################################
 # t/partition_float_myisam.test                                                #
 #                                                                              #

=== modified file 'mysql-test/suite/rpl/r/rpl_binlog_index.result'
--- a/mysql-test/suite/rpl/r/rpl_binlog_index.result	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/rpl/r/rpl_binlog_index.result	revid:kevin.lewis@stripped
@@ -6,20 +6,22 @@ Note	####	Storing MySQL user name or pas
 CREATE TABLE t1 (a INT);
 FLUSH BINARY LOGS;
 INSERT INTO t1 VALUES (1);
+include/stop_slave.inc
 # Shutdown master
 include/rpl_stop_server.inc [server_number=1]
 # Move the master binlog files and the index file to a new place
 # Restart master with log-bin option set to the new path
 # Master has restarted successfully
+include/start_slave.inc
 # Create the master-bin.index file with the old format
+include/stop_slave.inc
 # Shutdown master
 include/rpl_stop_server.inc [server_number=1]
 # Move back the master binlog files
 # Remove the unneeded master-bin.index file
 # Restart master with log-bin option set to default
 # Master has restarted successfully
-# stop slave
-include/stop_slave.inc
+include/start_slave.inc
 include/rpl_stop_server.inc [server_number=2]
 # relocate  binlogs
 # relocate  relay logs

=== modified file 'mysql-test/suite/rpl/r/rpl_loaddata.result'
--- a/mysql-test/suite/rpl/r/rpl_loaddata.result	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/rpl/r/rpl_loaddata.result	revid:kevin.lewis@stripped
@@ -82,7 +82,7 @@ load data infile '../../std_data/rpl_loa
 terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
 '\n##\n' starting by '>' ignore 1 lines;
 ERROR 23000: Duplicate entry '2003-03-22' for key 'day'
-include/wait_for_slave_sql_error.inc [errno=0,1754]
+include/wait_for_slave_sql_error.inc [errno=0,1755]
 drop table t1, t2;
 drop table t1, t2;
 CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB;

=== modified file 'mysql-test/suite/rpl/r/rpl_parallel_start_stop.result'
--- a/mysql-test/suite/rpl/r/rpl_parallel_start_stop.result	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/rpl/r/rpl_parallel_start_stop.result	revid:kevin.lewis@stripped
@@ -90,10 +90,6 @@ start slave until sql_after_mts_gaps mas
 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'master_log_pos=0' at line 1
 start slave until sql_after_mts_gaps SQL_BEFORE_GTIDS='dummy';
 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SQL_BEFORE_GTIDS='dummy'' at line 1
-start slave until sql_after_mts_gaps;
-show warnings;
-Level	Code	Message
-Error	1064	You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SQL_BEFORE_GTIDS='dummy'' at line 1
 call mtr.add_suppression('Slave SQL: Could not execute Update_rows event on table d1.t1; Deadlock found when trying to get lock');
 include/start_slave.inc
 create database d1;

=== modified file 'mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result'
--- a/mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result	revid:kevin.lewis@stripped
@@ -98,7 +98,7 @@ load data CONCURRENT infile '../../std_d
 terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
 '\n##\n' starting by '>' ignore 1 lines;
 ERROR 23000: Duplicate entry '2003-03-22' for key 'day'
-include/wait_for_slave_sql_error.inc [errno=0,1754]
+include/wait_for_slave_sql_error.inc [errno=0,1755]
 drop table t1, t2;
 drop table t1, t2;
 CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB;

=== modified file 'mysql-test/suite/rpl/t/rpl_binlog_index.test'
--- a/mysql-test/suite/rpl/t/rpl_binlog_index.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/rpl/t/rpl_binlog_index.test	revid:kevin.lewis@stripped
@@ -43,7 +43,7 @@ FLUSH BINARY LOGS;
 INSERT INTO t1 VALUES (1);
 
 sync_slave_with_master;
-
+--source include/stop_slave.inc
 #
 # Test on master
 #
@@ -64,7 +64,9 @@ source include/rpl_start_server.inc;
 --let $include_silent=0
 
 --echo # Master has restarted successfully
-
+--connection slave
+--source include/start_slave.inc
+--connection master
 #
 # Test master can handle old format with directory path in index file
 #
@@ -85,6 +87,9 @@ if (!$is_windows)
 --disable_query_log
 source include/write_var_to_file.inc;
 --enable_query_log
+--sync_slave_with_master
+--source include/stop_slave.inc
+--connection master
 
 --echo # Shutdown master
 --let $rpl_server_number=1
@@ -106,9 +111,10 @@ source include/rpl_start_server.inc;
 
 --echo # Master has restarted successfully
 
-connection slave;
---echo # stop slave
---source include/stop_slave.inc
+--connection slave
+--source include/start_slave.inc
+--sync_with_master
+--connection master
 --let $rpl_server_number= 2
 --source include/rpl_stop_server.inc
 

=== modified file 'mysql-test/suite/rpl/t/rpl_innodb_bug28430.test'
--- a/mysql-test/suite/rpl/t/rpl_innodb_bug28430.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/rpl/t/rpl_innodb_bug28430.test	revid:kevin.lewis@stripped
@@ -1,3 +1,6 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
+
 --source include/have_innodb.inc
 --source include/have_partition.inc
 --source include/have_binlog_format_mixed_or_row.inc

=== modified file 'mysql-test/suite/rpl/t/rpl_parallel_innodb.test'
--- a/mysql-test/suite/rpl/t/rpl_parallel_innodb.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/rpl/t/rpl_parallel_innodb.test	revid:kevin.lewis@stripped
@@ -1,3 +1,5 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
 #
 # WL#5569 MTS
 #

=== modified file 'mysql-test/suite/rpl/t/rpl_parallel_start_stop.test'
--- a/mysql-test/suite/rpl/t/rpl_parallel_start_stop.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/rpl/t/rpl_parallel_start_stop.test	revid:kevin.lewis@stripped
@@ -310,10 +310,6 @@ start slave until sql_after_mts_gaps mas
 --error 1064
 start slave until sql_after_mts_gaps SQL_BEFORE_GTIDS='dummy';
 
-# check out a "blank" run which leaves an info line into error-log
-start slave until sql_after_mts_gaps;
-
-show warnings;
 call mtr.add_suppression('Slave SQL: Could not execute Update_rows event on table d1.t1; Deadlock found when trying to get lock');
 
 # regular start now

=== modified file 'mysql-test/suite/rpl/t/rpl_rotate_purge_deadlock.test'
--- a/mysql-test/suite/rpl/t/rpl_rotate_purge_deadlock.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/rpl/t/rpl_rotate_purge_deadlock.test	revid:kevin.lewis@stripped
@@ -1,3 +1,5 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
 #
 # Bug#11763573 - 56299: MUTEX DEADLOCK WITH COM_BINLOG_DUMP, BINLOG PURGE, AND PROCESSLIST/KILL
 #

=== modified file 'mysql-test/suite/rpl/t/rpl_row_img_blobs.test'
--- a/mysql-test/suite/rpl/t/rpl_row_img_blobs.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/rpl/t/rpl_row_img_blobs.test	revid:kevin.lewis@stripped
@@ -1,3 +1,6 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
+
 #
 # This file contains tests for WL#5096.
 #

=== modified file 'mysql-test/suite/rpl/t/rpl_row_img_eng_full.test'
--- a/mysql-test/suite/rpl/t/rpl_row_img_eng_full.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/rpl/t/rpl_row_img_eng_full.test	revid:kevin.lewis@stripped
@@ -1,3 +1,5 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
 #
 # This file contains tests for WL#5096 and bug fixes. 
 #

=== modified file 'mysql-test/suite/rpl/t/rpl_row_img_idx_full.test'
--- a/mysql-test/suite/rpl/t/rpl_row_img_idx_full.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/rpl/t/rpl_row_img_idx_full.test	revid:kevin.lewis@stripped
@@ -1,3 +1,5 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
 #
 # This file contains tests for WL#5096.
 #

=== modified file 'mysql-test/suite/rpl/t/rpl_stop_slave.test'
--- a/mysql-test/suite/rpl/t/rpl_stop_slave.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/rpl/t/rpl_stop_slave.test	revid:kevin.lewis@stripped
@@ -1,3 +1,6 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
+
 source include/master-slave.inc;
 source include/have_innodb.inc;
 source include/have_debug.inc;

=== modified file 'mysql-test/suite/rpl/t/rpl_typeconv.test'
--- a/mysql-test/suite/rpl/t/rpl_typeconv.test	revid:kevin.lewis@stripped
+++ b/mysql-test/suite/rpl/t/rpl_typeconv.test	revid:kevin.lewis@stripped
@@ -1,3 +1,6 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
+
 --source include/have_binlog_format_row.inc
 --source include/master-slave.inc
 

=== modified file 'mysql-test/t/disabled.def'
--- a/mysql-test/t/disabled.def	revid:kevin.lewis@stripped
+++ b/mysql-test/t/disabled.def	revid:kevin.lewis@stripped
@@ -16,3 +16,4 @@ archive-big              : Bug#11817185 
 log_tables-big           : Bug#11756699 2010-11-15 mattiasj report already exists
 ds_mrr-big @solaris      : Hemant disabled since this leads to timeout on Solaris on slow sparc servers
 partition_locking_4	 : Bug#13924750 2012-04-04 lost connection.
+mysql_embedded_client_test	: Bug#13964673 2012-04-16 amitbha since most of the test cases are failing

=== modified file 'mysql-test/t/index_merge_innodb.test'
--- a/mysql-test/t/index_merge_innodb.test	revid:kevin.lewis@stripped
+++ b/mysql-test/t/index_merge_innodb.test	revid:kevin.lewis@stripped
@@ -1,3 +1,5 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
 # t/index_merge_innodb.test
 #
 # Index merge tests

=== modified file 'mysql-test/t/innodb_explain_json_non_select_all.test'
--- a/mysql-test/t/innodb_explain_json_non_select_all.test	revid:kevin.lewis@stripped
+++ b/mysql-test/t/innodb_explain_json_non_select_all.test	revid:kevin.lewis@stripped
@@ -1,3 +1,6 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
+
 # 
 # Run explain_non_select.inc on InnoDB with all of the so-called 6.0 features.
 #

=== modified file 'mysql-test/t/innodb_explain_non_select_all.test'
--- a/mysql-test/t/innodb_explain_non_select_all.test	revid:kevin.lewis@stripped
+++ b/mysql-test/t/innodb_explain_non_select_all.test	revid:kevin.lewis@stripped
@@ -1,3 +1,6 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
+
 # 
 # Run explain_non_select.inc on InnoDB with all of the so-called 6.0 features.
 #

=== modified file 'mysql-test/t/innodb_explain_non_select_none.test'
--- a/mysql-test/t/innodb_explain_non_select_none.test	revid:kevin.lewis@stripped
+++ b/mysql-test/t/innodb_explain_non_select_none.test	revid:kevin.lewis@stripped
@@ -1,3 +1,5 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
 # 
 # Run explain_non_select.inc on InnoDB without any of the socalled 6.0 features.
 #

=== modified file 'mysql-test/t/mysql_client_test_embedded.test'
--- a/mysql-test/t/mysql_client_test_embedded.test	revid:kevin.lewis@stripped
+++ b/mysql-test/t/mysql_client_test_embedded.test	revid:kevin.lewis@stripped
@@ -1,3 +1,6 @@
+#Want to skip this test from daily Valgrind execution
+--source include/no_valgrind_without_big.inc
+
 --source include/is_embedded.inc
 
 --echo # Run the start/stop test 17 times (* 64 = 1088 restarts)

=== added file 'mysql-test/t/mysql_embedded_client_test.test'
--- a/mysql-test/t/mysql_embedded_client_test.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/mysql_embedded_client_test.test	revid:kevin.lewis@stripped
@@ -0,0 +1,50 @@
+-- source include/not_embedded.inc
+
+--echo #
+--echo # Bug#13541194 : MTR TEST TO RUN EMBEDDED SERVER CLIENT TESTS IN MYSQL_CLIENT_TEST.C.
+--echo #
+
+# Stop the server
+let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
+--exec echo "wait" > $restart_file
+--shutdown_server 10
+--source include/wait_until_disconnected.inc
+--echo stopped the current server
+
+perl;
+my $cli_string = $ENV{'MYSQL_CLIENT_TEST'};
+my $filestring = 'file';
+$cli_string =~ s/mysql_client_test/mysql_client_test_embedded/;
+if ($cli_string =~ /(.+?)\s/) {
+$filestring = $1;
+}
+my $emb_cli = 0;
+if (-e $filestring){
+  open (ISLINK, ">" . $ENV{'MYSQL_TMP_DIR'} . "/embedded_cli");
+  $emb_cli = 1;
+  print ISLINK "let \$emb_client = $cli_string;\n";
+  print ISLINK "let \$emb_cli_exists = $emb_cli;\n";
+  close ISLINK;
+}
+else {
+  open (ISLINK, ">" . $ENV{'MYSQL_TMP_DIR'} . "/embedded_cli");
+  print ISLINK "let \$emb_client = $cli_string;\n";
+  close ISLINK;
+}
+
+EOF
+
+--source $MYSQL_TMP_DIR/embedded_cli
+--remove_file $MYSQL_TMP_DIR/embedded_cli
+
+if (! $emb_cli_exists){
+  --skip Test only works with embedded server
+}
+
+--exec $emb_client --silent >> $MYSQLTEST_VARDIR/log/mysql_embedded_client_test.out.log 2>&1
+
+--echo # 7. Restart the server and cleanup
+#-----------------------------------------
+--enable_reconnect
+--exec echo "restart" > $restart_file
+--source include/wait_until_connected_again.inc

=== modified file 'sql/ha_partition.cc'
--- a/sql/ha_partition.cc	revid:kevin.lewis@stripped
+++ b/sql/ha_partition.cc	revid:kevin.lewis@stripped
@@ -1988,51 +1988,84 @@ void ha_partition::update_create_info(HA
 
   /*
     send Handler::update_create_info() to the storage engine for each
-    partition using a dummy HA_CREATE_INFO structure.
+    partition that currently has a handler object.  Using a dummy
+    HA_CREATE_INFO structure to collect DATA and INDEX DIRECTORYs.
   */
 
   List_iterator<partition_element> part_it(m_part_info->partitions);
+  partition_element *part_elem, *sub_elem;
   uint num_subparts= m_part_info->num_subparts;
-  uint i= 0;
+  uint num_parts = num_subparts ? m_file_tot_parts / num_subparts
+                                : m_file_tot_parts;
   HA_CREATE_INFO dummy_info;
   memset(&dummy_info, 0, sizeof(dummy_info));
 
-  do
+  /*
+  Since update_create_info() can be called from mysql_prepare_alter_table()
+  when not all handlers are set up, we look for that condition first.
+  If all handlers are not available, do not call update)create_indfo for any.
+  */
+  uint i, j, part;
+  for (i= 0; i < num_parts; i++)
   {
-    partition_element *part_elem= part_it++;
-    if (part_elem)
+    part_elem= part_it++;
+    if (!part_elem)
+      DBUG_VOID_RETURN;
+    if (m_is_sub_partitioned)
     {
-      if (m_is_sub_partitioned)
+      List_iterator<partition_element> subpart_it(part_elem->subpartitions);
+      for (j= 0; j < num_subparts; j++)
       {
-        List_iterator<partition_element> subpart_it(part_elem->subpartitions);
-        partition_element *sub_elem;
-        uint j= 0, part;
-        do
-        {
-          sub_elem= subpart_it++;
-          if (sub_elem)
-          {
-            part= i * num_subparts + j;
-            if (part < m_file_tot_parts && m_file[part])
-            {
-              m_file[part]->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;
-            }
-          }
-        } while (++j < num_subparts);
+        sub_elem= subpart_it++;
+        if (!sub_elem)
+          DBUG_VOID_RETURN;
+        part= i * num_subparts + j;
+        if (part >= m_file_tot_parts || !m_file[part])
+          DBUG_VOID_RETURN;
       }
-      else
+    }
+    else
+    {
+      if (!m_file[i])
+        DBUG_VOID_RETURN;
+    }
+  }
+  part_it.rewind();
+
+  for (i= 0; i < num_parts; i++)
+  {
+    part_elem= part_it++;
+    DBUG_ASSERT(part_elem);
+    if (m_is_sub_partitioned)
+    {
+      List_iterator<partition_element> subpart_it(part_elem->subpartitions);
+      for (j= 0; j < num_subparts; j++)
       {
-        if (m_file[i])
-        {
-          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;
-        }
+        sub_elem= subpart_it++;
+        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;
       }
     }
-  } while (++i < m_file_tot_parts);
+    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;
+    }
+  }
   DBUG_VOID_RETURN;
 }
 

=== modified file 'sql/handler.cc'
--- a/sql/handler.cc	revid:kevin.lewis@stripped
+++ b/sql/handler.cc	revid:kevin.lewis@stripped
@@ -181,7 +181,7 @@ struct st_sys_tbl_chk_params
       and is supported by SE.
     */
     SUPPORTED_SYSTEM_TABLE
-  }status;                                    // OUT param
+  } status;                                    // OUT param
 };
 
 
@@ -1827,9 +1827,9 @@ bool mysql_xa_recover(THD *thd)
   XID_STATE *xs;
   DBUG_ENTER("mysql_xa_recover");
 
-  field_list.push_back(new Item_int("formatID", 0, MY_INT32_NUM_DECIMAL_DIGITS));
-  field_list.push_back(new Item_int("gtrid_length", 0, MY_INT32_NUM_DECIMAL_DIGITS));
-  field_list.push_back(new Item_int("bqual_length", 0, MY_INT32_NUM_DECIMAL_DIGITS));
+  field_list.push_back(new Item_int(NAME_STRING("formatID"), 0, MY_INT32_NUM_DECIMAL_DIGITS));
+  field_list.push_back(new Item_int(NAME_STRING("gtrid_length"), 0, MY_INT32_NUM_DECIMAL_DIGITS));
+  field_list.push_back(new Item_int(NAME_STRING("bqual_length"), 0, MY_INT32_NUM_DECIMAL_DIGITS));
   field_list.push_back(new Item_empty_string("data",XIDDATASIZE));
 
   if (protocol->send_result_set_metadata(&field_list,

=== modified file 'sql/item.cc'
--- a/sql/item.cc	revid:kevin.lewis@stripped
+++ b/sql/item.cc	revid:kevin.lewis@stripped
@@ -958,7 +958,7 @@ bool Item::check_cols(uint c)
 }
 
 
-NameString null_name_string(NULL, 0);
+const NameString null_name_string(NULL, 0);
 
 
 void NameString::copy(const char *str, uint length, const CHARSET_INFO *cs)
@@ -2997,20 +2997,6 @@ void Item_int::print(String *str, enum_q
 }
 
 
-Item_uint::Item_uint(const char *str_arg, uint length):
-  Item_int(str_arg, length)
-{
-  unsigned_flag= 1;
-}
-
-
-Item_uint::Item_uint(const char *str_arg, longlong i, uint length):
-  Item_int(str_arg, i, length)
-{
-  unsigned_flag= 1;
-}
-
-
 String *Item_uint::val_str(String *str)
 {
   // following assert is redundant, because fixed=1 assigned in constructor
@@ -3065,11 +3051,12 @@ Item_decimal::Item_decimal(double val, i
 }
 
 
-Item_decimal::Item_decimal(const char *str, const my_decimal *val_arg,
+Item_decimal::Item_decimal(const NameString &name_arg,
+                           const my_decimal *val_arg,
                            uint decimal_par, uint length)
 {
   my_decimal2decimal(val_arg, &decimal_value);
-  item_name.set(str);
+  item_name= name_arg;
   decimals= (uint8) decimal_par;
   max_length= length;
   fixed= 1;
@@ -3996,13 +3983,13 @@ Item_param::clone_item()
   /* see comments in the header file */
   switch (state) {
   case NULL_VALUE:
-    return new Item_null(item_name.ptr());
+    return new Item_null(item_name);
   case INT_VALUE:
     return (unsigned_flag ?
-            new Item_uint(item_name.ptr(), value.integer, max_length) :
-            new Item_int(item_name.ptr(), value.integer, max_length));
+            new Item_uint(item_name, value.integer, max_length) :
+            new Item_int(item_name, value.integer, max_length));
   case REAL_VALUE:
-    return new Item_float(item_name.ptr(), value.real, decimals, max_length);
+    return new Item_float(item_name, value.real, decimals, max_length);
   case STRING_VALUE:
   case LONG_DATA_VALUE:
     return new Item_string(item_name, str_value.c_ptr_quick(), str_value.length(),
@@ -6253,8 +6240,8 @@ Item *Item_int_with_ref::clone_item()
     parameter markers.
   */
   return (ref->unsigned_flag ?
-          new Item_uint(ref->item_name.ptr(), ref->val_int(), ref->max_length) :
-          new Item_int(ref->item_name.ptr(), ref->val_int(), ref->max_length));
+          new Item_uint(ref->item_name, ref->val_int(), ref->max_length) :
+          new Item_int(ref->item_name, ref->val_int(), ref->max_length));
 }
 
 
@@ -6265,7 +6252,7 @@ Item *Item_time_with_ref::clone_item()
     We need to evaluate the constant to make sure it works with
     parameter markers.
   */
-  return new Item_temporal(MYSQL_TYPE_TIME, ref->item_name.ptr(),
+  return new Item_temporal(MYSQL_TYPE_TIME, ref->item_name,
                            ref->val_time_temporal(), ref->max_length);
 }
 
@@ -6277,7 +6264,7 @@ Item *Item_datetime_with_ref::clone_item
     We need to evaluate the constant to make sure it works with
     parameter markers.
   */
-  return new Item_temporal(MYSQL_TYPE_DATETIME, ref->item_name.ptr(),
+  return new Item_temporal(MYSQL_TYPE_DATETIME, ref->item_name,
                            ref->val_date_temporal(), ref->max_length);
 }
 
@@ -8163,8 +8150,6 @@ void resolve_const_item(THD *thd, Item *
     return;                                     // Can't be better
   Item_result res_type=item_cmp_type(comp_item->result_type(),
 				     item->result_type());
-  const char *name= item->item_name.ptr(); // Alloced by sql_alloc
-
   switch (res_type) {
   case STRING_RESULT:
   {
@@ -8172,7 +8157,7 @@ void resolve_const_item(THD *thd, Item *
     String tmp(buff,sizeof(buff),&my_charset_bin),*result;
     result=item->val_str(&tmp);
     if (item->null_value)
-      new_item= new Item_null(name);
+      new_item= new Item_null(item->item_name);
     else if (item->is_temporal())
     {
       enum_field_types type= item->field_type() == MYSQL_TYPE_TIMESTAMP ?
@@ -8193,8 +8178,8 @@ void resolve_const_item(THD *thd, Item *
     longlong result=item->val_int();
     uint length=item->max_length;
     bool null_value=item->null_value;
-    new_item= (null_value ? (Item*) new Item_null(name) :
-               (Item*) new Item_int(name, result, length));
+    new_item= (null_value ? (Item*) new Item_null(item->item_name) :
+               (Item*) new Item_int(item->item_name, result, length));
     break;
   }
   case ROW_RESULT:
@@ -8232,19 +8217,19 @@ void resolve_const_item(THD *thd, Item *
     double result= item->val_real();
     uint length=item->max_length,decimals=item->decimals;
     bool null_value=item->null_value;
-    new_item= (null_value ? (Item*) new Item_null(name) : (Item*)
-               new Item_float(name, result, decimals, length));
+    new_item= (null_value ? (Item*) new Item_null(item->item_name) : (Item*)
+               new Item_float(item->item_name, result, decimals, length));
     break;
   }
   case DECIMAL_RESULT:
   {
     my_decimal decimal_value;
     my_decimal *result= item->val_decimal(&decimal_value);
-    uint length= item->max_length, decimals= item->decimals;
     bool null_value= item->null_value;
     new_item= (null_value ?
-               (Item*) new Item_null(name) :
-               (Item*) new Item_decimal(name, result, length, decimals));
+               (Item*) new Item_null(item->item_name) :
+               (Item*) new Item_decimal(item->item_name, result,
+                                        item->max_length, item->decimals));
     break;
   }
   default:

=== modified file 'sql/item.h'
--- a/sql/item.h	revid:kevin.lewis@stripped
+++ b/sql/item.h	revid:kevin.lewis@stripped
@@ -147,6 +147,11 @@ public:
 /**
   Storage for name strings.
   Enpowers SimpleCString with allocation routines from the sql_strmake family.
+
+  This class must stay as small as possible as we often 
+  pass it into functions using call-by-value evaluation.
+
+  Don't add new members or virual methods into this class!
 */
 class NameString: public SimpleCString
 {
@@ -160,6 +165,11 @@ private:
   }
 public:
   NameString(): SimpleCString() {}
+  /*
+    Please do NOT add constructor NameString(const char *str) !
+    It will involve hidden strlen() call, which can affect
+    performance negatively. Use NameString(str, len) instead.
+  */
   NameString(const char *str, uint length):
     SimpleCString(str, length) {}
   NameString(const LEX_STRING str): SimpleCString(str) {}
@@ -226,7 +236,10 @@ public:
 };
 
 
-extern NameString null_name_string;
+#define NAME_STRING(x)  NameString(C_STRING_WITH_LEN(x))
+
+
+extern const NameString null_name_string;
 
 
 /**
@@ -2211,15 +2224,24 @@ public:
 
 class Item_null :public Item_basic_constant
 {
-public:
-  Item_null(const char *name_par=0)
+  void init()
   {
     maybe_null= null_value= TRUE;
     max_length= 0;
-    item_name.copy(name_par ? name_par : (char*) "NULL");
     fixed= 1;
     collation.set(&my_charset_bin, DERIVATION_IGNORABLE);
   }
+public:
+  Item_null()
+  {
+    init();
+    item_name= NAME_STRING("NULL");
+  }
+  Item_null(const NameString &name_par)
+  {
+    init();
+    item_name= name_par;
+  }
   enum Type type() const { return NULL_ITEM; }
   bool eq(const Item *item, bool binary_cmp) const;
   double val_real();
@@ -2242,7 +2264,7 @@ public:
   enum Item_result result_type () const { return STRING_RESULT; }
   enum_field_types field_type() const   { return MYSQL_TYPE_NULL; }
   bool basic_const_item() const { return 1; }
-  Item *clone_item() { return new Item_null(item_name.ptr()); }
+  Item *clone_item() { return new Item_null(item_name); }
   bool is_null() { return 1; }
 
   virtual inline void print(String *str, enum_query_type query_type)
@@ -2450,10 +2472,10 @@ public:
     max_length= item_arg->max_length;
     fixed= 1;
   }
-  Item_int(const char *str_arg,longlong i,uint length) :value(i)
+  Item_int(const NameString &name_arg, longlong i, uint length) :value(i)
   {
     max_length= length;
-    item_name.set(str_arg);
+    item_name= name_arg;
     fixed= 1;
   }
   Item_int(const char *str_arg, uint length);
@@ -2484,6 +2506,16 @@ public:
 };
 
 
+/**
+  Item_int with value==0 and length==1
+*/
+class Item_int_0 :public Item_int
+{
+public:
+  Item_int_0() :Item_int(NAME_STRING("0"), 0, 1) {}
+};
+
+
 /*
   Item_temporal is used to store numeric representation
   of time/date/datetime values for queries like:
@@ -2503,13 +2535,13 @@ public:
   {
     DBUG_ASSERT(is_temporal_type(field_type_arg));
   }
-  Item_temporal(enum_field_types field_type_arg,
-                const char *str_arg, longlong i, uint length): Item_int(i),
+  Item_temporal(enum_field_types field_type_arg, const NameString &name_arg,
+                longlong i, uint length): Item_int(i),
     cached_field_type(field_type_arg)
   {
     DBUG_ASSERT(is_temporal_type(field_type_arg));
     max_length= length;
-    item_name.set(str_arg);
+    item_name= name_arg;
     fixed= 1;
   }
   Item *clone_item() { return new Item_temporal(field_type(), value); }
@@ -2536,13 +2568,15 @@ public:
 class Item_uint :public Item_int
 {
 public:
-  Item_uint(const char *str_arg, uint length);
+  Item_uint(const char *str_arg, uint length)
+    :Item_int(str_arg, length) { unsigned_flag= 1; }
   Item_uint(ulonglong i) :Item_int((ulonglong) i, 10) {}
-  Item_uint(const char *str_arg, longlong i, uint length);
+  Item_uint(const NameString &name_arg, longlong i, uint length)
+    :Item_int(name_arg, i, length) { unsigned_flag= 1; }
   double val_real()
     { DBUG_ASSERT(fixed == 1); return ulonglong2double((ulonglong)value); }
   String *val_str(String*);
-  Item *clone_item() { return new Item_uint(item_name.ptr(), value, max_length); }
+  Item *clone_item() { return new Item_uint(item_name, value, max_length); }
   int save_in_field(Field *field, bool no_conversions);
   virtual void print(String *str, enum_query_type query_type);
   Item_num *neg ();
@@ -2558,8 +2592,8 @@ protected:
   my_decimal decimal_value;
 public:
   Item_decimal(const char *str_arg, uint length, const CHARSET_INFO *charset);
-  Item_decimal(const char *str, const my_decimal *val_arg,
-               uint decimal_par, uint length);
+  Item_decimal(const NameString &name_arg,
+               const my_decimal *val_arg, uint decimal_par, uint length);
   Item_decimal(my_decimal *value_par);
   Item_decimal(longlong val, bool unsig);
   Item_decimal(double val, int precision, int scale);
@@ -2584,7 +2618,7 @@ public:
   bool basic_const_item() const { return 1; }
   Item *clone_item()
   {
-    return new Item_decimal(item_name.ptr(), &decimal_value, decimals, max_length);
+    return new Item_decimal(item_name, &decimal_value, decimals, max_length);
   }
   virtual void print(String *str, enum_query_type query_type);
   Item_num *neg()
@@ -2607,13 +2641,14 @@ public:
   double value;
   // Item_real() :value(0) {}
   Item_float(const char *str_arg, uint length);
-  Item_float(const char *str,double val_arg,uint decimal_par,uint length)
+  Item_float(const NameString name_arg,
+             double val_arg, uint decimal_par, uint length)
     :value(val_arg)
   {
-    presentation.set(str);
-    item_name.set(str);
-    decimals=(uint8) decimal_par;
-    max_length=length;
+    presentation= name_arg;
+    item_name= name_arg;
+    decimals= (uint8) decimal_par;
+    max_length= length;
     fixed= 1;
   }
   Item_float(double value_par, uint decimal_par) :value(value_par)
@@ -2650,7 +2685,7 @@ public:
   }
   bool basic_const_item() const { return 1; }
   Item *clone_item()
-  { return new Item_float(item_name.ptr(), value, decimals, max_length); }
+  { return new Item_float(item_name, value, decimals, max_length); }
   Item_num *neg() { value= -value; return this; }
   virtual void print(String *str, enum_query_type query_type);
   bool eq(const Item *, bool binary_cmp) const;
@@ -2659,11 +2694,12 @@ public:
 
 class Item_static_float_func :public Item_float
 {
-  const char *func_name;
+  const NameString func_name;
 public:
-  Item_static_float_func(const char *str, double val_arg, uint decimal_par,
-                        uint length)
-    :Item_float(NullS, val_arg, decimal_par, length), func_name(str)
+  Item_static_float_func(const NameString &name_arg,
+                         double val_arg, uint decimal_par, uint length)
+    :Item_float(null_name_string,
+                val_arg, decimal_par, length), func_name(name_arg)
   {}
 
   virtual inline void print(String *str, enum_query_type query_type)
@@ -2827,10 +2863,10 @@ double_from_string_with_check (const CHA
 
 class Item_static_string_func :public Item_string
 {
-  const char *func_name;
+  const NameString func_name;
 public:
-  Item_static_string_func(const char *name_par, const char *str, uint length,
-                          const CHARSET_INFO *cs,
+  Item_static_string_func(const NameString &name_par,
+                          const char *str, uint length, const CHARSET_INFO *cs,
                           Derivation dv= DERIVATION_COERCIBLE)
     :Item_string(null_name_string, str, length, cs, dv), func_name(name_par)
   {}
@@ -2909,7 +2945,8 @@ class Item_return_int :public Item_int
 public:
   Item_return_int(const char *name_arg, uint length,
 		  enum_field_types field_type_arg, longlong value= 0)
-    :Item_int(name_arg, value, length), int_field_type(field_type_arg)
+    :Item_int(NameString(name_arg, name_arg ? strlen(name_arg) : 0),
+              value, length), int_field_type(field_type_arg)
   {
     unsigned_flag=1;
   }

=== modified file 'sql/item_create.cc'
--- a/sql/item_create.cc	revid:kevin.lewis@stripped
+++ b/sql/item_create.cc	revid:kevin.lewis@stripped
@@ -4700,7 +4700,8 @@ Create_func_pi Create_func_pi::s_singlet
 Item*
 Create_func_pi::create(THD *thd)
 {
-  return new (thd->mem_root) Item_static_float_func("pi()", M_PI, 6, 8);
+  return new (thd->mem_root) Item_static_float_func(NAME_STRING("pi()"),
+                                                    M_PI, 6, 8);
 }
 
 
@@ -4827,7 +4828,7 @@ Create_func_round::create_native(THD *th
   case 1:
   {
     Item *param_1= item_list->pop();
-    Item *i0 = new (thd->mem_root) Item_int((char*)"0", 0, 1);
+    Item *i0 = new (thd->mem_root) Item_int_0();
     func= new (thd->mem_root) Item_func_round(param_1, i0, 0);
     break;
   }
@@ -5186,7 +5187,7 @@ Item*
 Create_func_version::create(THD *thd)
 {
   thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_SYSTEM_FUNCTION);
-  return new (thd->mem_root) Item_static_string_func("version()",
+  return new (thd->mem_root) Item_static_string_func(NAME_STRING("version()"),
                                                      server_version,
                                                      (uint) strlen(server_version),
                                                      system_charset_info,
@@ -5208,7 +5209,7 @@ Create_func_weekofyear Create_func_weeko
 Item*
 Create_func_weekofyear::create(THD *thd, Item *arg1)
 {
-  Item *i1= new (thd->mem_root) Item_int((char*) "0", 3, 1);
+  Item *i1= new (thd->mem_root) Item_int(NAME_STRING("0"), 3, 1);
   return new (thd->mem_root) Item_func_week(arg1, i1);
 }
 
@@ -5291,7 +5292,7 @@ Create_func_year_week::create_native(THD
   case 1:
   {
     Item *param_1= item_list->pop();
-    Item *i0= new (thd->mem_root) Item_int((char*) "0", 0, 1);
+    Item *i0= new (thd->mem_root) Item_int_0();
     func= new (thd->mem_root) Item_func_yearweek(param_1, i0);
     break;
   }

=== modified file 'sql/item_strfunc.cc'
--- a/sql/item_strfunc.cc	revid:kevin.lewis@stripped
+++ b/sql/item_strfunc.cc	revid:kevin.lewis@stripped
@@ -2081,7 +2081,7 @@ Item *Item_func_sysconst::safe_charset_c
   String tmp, cstr, *ostr= val_str(&tmp);
   if (null_value)
   {
-    Item *null_item= new Item_null((char *) fully_qualified_func_name());
+    Item *null_item= new Item_null(fully_qualified_func_name());
     null_item->collation.set (tocs);
     return null_item;
   }

=== modified file 'sql/item_strfunc.h'
--- a/sql/item_strfunc.h	revid:kevin.lewis@stripped
+++ b/sql/item_strfunc.h	revid:kevin.lewis@stripped
@@ -464,7 +464,7 @@ public:
     safe_charset_converter, return string representation of this function
     call
   */
-  virtual const char *fully_qualified_func_name() const = 0;
+  virtual const NameString fully_qualified_func_name() const = 0;
 };
 
 
@@ -479,7 +479,8 @@ public:
     maybe_null=1;
   }
   const char *func_name() const { return "database"; }
-  const char *fully_qualified_func_name() const { return "database()"; }
+  const NameString fully_qualified_func_name() const
+  { return NAME_STRING("database()"); }
 };
 
 
@@ -505,7 +506,8 @@ public:
                  (HOSTNAME_LENGTH + 1) * SYSTEM_CHARSET_MBMAXLEN);
   }
   const char *func_name() const { return "user"; }
-  const char *fully_qualified_func_name() const { return "user()"; }
+  const NameString fully_qualified_func_name() const
+  { return NAME_STRING("user()"); }
   int save_in_field(Field *field, bool no_conversions)
   {
     return save_str_value_in_field(field, &str_value);
@@ -522,7 +524,8 @@ public:
     : context(context_arg) {}
   bool fix_fields(THD *thd, Item **ref);
   const char *func_name() const { return "current_user"; }
-  const char *fully_qualified_func_name() const { return "current_user()"; }
+  const NameString fully_qualified_func_name() const
+  { return NAME_STRING("current_user()"); }
 };
 
 

=== modified file 'sql/item_subselect.cc'
--- a/sql/item_subselect.cc	revid:kevin.lewis@stripped
+++ b/sql/item_subselect.cc	revid:kevin.lewis@stripped
@@ -1495,7 +1495,7 @@ Item_in_subselect::single_value_in_to_ex
       bool tmp;
       Item *having= item, *orig_item= item;
       select_lex->item_list.empty();
-      select_lex->item_list.push_back(new Item_int("Not_used",
+      select_lex->item_list.push_back(new Item_int(NAME_STRING("Not_used"),
                                                    (longlong) 1,
                                                    MY_INT64_NUM_DECIMAL_DIGITS));
       join->ref_ptrs[0]= select_lex->item_list.head();

=== modified file 'sql/item_xmlfunc.cc'
--- a/sql/item_xmlfunc.cc	revid:kevin.lewis@stripped
+++ b/sql/item_xmlfunc.cc	revid:kevin.lewis@stripped
@@ -1167,7 +1167,7 @@ static Item *create_func_string_length(M
 
 static Item *create_func_round(MY_XPATH *xpath, Item **args, uint nargs)
 {
-  return new Item_func_round(args[0], new Item_int((char*)"0",0,1),0);
+  return new Item_func_round(args[0], new Item_int_0(), 0);
 }
 
 

=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc	revid:kevin.lewis@stripped
+++ b/sql/log_event.cc	revid:kevin.lewis@stripped
@@ -6917,6 +6917,12 @@ bool Xid_log_event::do_commit(THD *thd)
     error |= gtid_empty_group_log_and_cleanup(thd);
   }
 
+  /*
+    Increment the global status commit count variable
+  */
+  if (!error)
+    status_var_increment(thd->status_var.com_stat[SQLCOM_COMMIT]);
+
   return error;
 }
 
@@ -7027,12 +7033,6 @@ err:
   mysql_cond_broadcast(&rli_ptr->data_cond);
   mysql_mutex_unlock(&rli_ptr->data_lock);
 
-  /*
-    Increment the global status commit count variable
-  */
-  if (!error)
-    status_var_increment(thd->status_var.com_stat[SQLCOM_COMMIT]);
-
   return error;
 }
 

=== modified file 'sql/sp_head.cc'
--- a/sql/sp_head.cc	revid:kevin.lewis@stripped
+++ b/sql/sp_head.cc	revid:kevin.lewis@stripped
@@ -2815,7 +2815,7 @@ sp_head::show_routine_code(THD *thd)
   if (check_show_routine_access(thd, this, &full_access) || !full_access)
     DBUG_RETURN(1);
 
-  field_list.push_back(new Item_uint("Pos", 0, 9));
+  field_list.push_back(new Item_uint(NAME_STRING("Pos"), 0, 9));
   // 1024 is for not to confuse old clients
   field_list.push_back(new Item_empty_string("Instruction",
                                              max(buffer.length(), 1024U)));

=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc	revid:kevin.lewis@stripped
+++ b/sql/sql_base.cc	revid:kevin.lewis@stripped
@@ -8162,7 +8162,7 @@ int setup_wild(THD *thd, TABLE_LIST *tab
 
           Item_int do not need fix_fields() because it is basic constant.
         */
-        it.replace(new Item_int("Not_used", (longlong) 1,
+        it.replace(new Item_int(NAME_STRING("Not_used"), (longlong) 1,
                                 MY_INT64_NUM_DECIMAL_DIGITS));
       }
       else if (insert_fields(thd, ((Item_field*) item)->context,

=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc	revid:kevin.lewis@stripped
+++ b/sql/sql_class.cc	revid:kevin.lewis@stripped
@@ -2084,7 +2084,8 @@ int THD::send_explain_fields(select_resu
   item->maybe_null= 1;
   if (lex->describe & DESCRIBE_EXTENDED)
   {
-    field_list.push_back(item= new Item_float("filtered", 0.1234, 2, 4));
+    field_list.push_back(item= new Item_float(NAME_STRING("filtered"),
+                                              0.1234, 2, 4));
     item->maybe_null=1;
   }
   field_list.push_back(new Item_empty_string("Extra", 255, cs));

=== modified file 'sql/sql_optimizer.cc'
--- a/sql/sql_optimizer.cc	revid:kevin.lewis@stripped
+++ b/sql/sql_optimizer.cc	revid:kevin.lewis@stripped
@@ -8299,7 +8299,7 @@ remove_eq_conds(THD *thd, Item *cond, It
 #endif
 	Item *new_cond;
 	if ((new_cond= new Item_func_eq(args[0],
-					new Item_int("last_insert_id()",
+					new Item_int(NAME_STRING("last_insert_id()"),
                                                      thd->read_first_successful_insert_id_in_prev_stmt(),
                                                      MY_INT64_NUM_DECIMAL_DIGITS))))
 	{

=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc	revid:kevin.lewis@stripped
+++ b/sql/sql_parse.cc	revid:kevin.lewis@stripped
@@ -7621,7 +7621,7 @@ Item *negate_expression(THD *thd, Item *
       if it is not boolean function then we have to emulate value of
       not(not(a)), it will be a != 0
     */
-    return new Item_func_ne(arg, new Item_int((char*) "0", 0, 1));
+    return new Item_func_ne(arg, new Item_int_0());
   }
 
   if ((negated= expr->neg_transformer(thd)) != 0)

=== modified file 'sql/sql_partition.cc'
--- a/sql/sql_partition.cc	revid:kevin.lewis@stripped
+++ b/sql/sql_partition.cc	revid:kevin.lewis@stripped
@@ -2070,18 +2070,19 @@ static int add_quoted_string(File fptr, 
   return err + add_string(fptr, "'");
 }
 
-/*
-Output a filepath.  Similar to add_keyword_string except it also
-converts \ to / on Windows and skips the partition file name at
-the end if found.  When Mysql sends a DATA DIRECTORY from SQL for
-partitions it does not use a file name, but it does for DATA
-DIRECTORY on a non-partitioned table.  So when the storage engine
-is asked for the DATA DIRECTORY string after a restart through
-Handler::update_create_options(), the storage engine may include
-the filename.
+/**
+  @brief  Output a filepath.  Similar to add_keyword_string except it
+also converts \ to / on Windows and skips the partition file name at
+the end if found.
+
+  @note  When Mysql sends a DATA DIRECTORY from SQL for partitions it does
+not use a file name, but it does for DATA DIRECTORY on a non-partitioned
+table.  So when the storage engine is asked for the DATA DIRECTORY string
+after a restart through Handler::update_create_options(), the storage
+engine may include the filename.
 */
 static int add_keyword_path(File fptr, const char *keyword,
-                            bool should_use_quotes, 
+                            bool should_use_quotes,
                             const char *path)
 {
   int err= add_string(fptr, keyword);

=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc	revid:kevin.lewis@stripped
+++ b/sql/sql_show.cc	revid:kevin.lewis@stripped
@@ -2050,7 +2050,7 @@ void mysqld_list_processes(THD *thd,cons
   Protocol *protocol= thd->protocol;
   DBUG_ENTER("mysqld_list_processes");
 
-  field_list.push_back(new Item_int("Id", 0, MY_INT32_NUM_DECIMAL_DIGITS));
+  field_list.push_back(new Item_int(NAME_STRING("Id"), 0, MY_INT32_NUM_DECIMAL_DIGITS));
   field_list.push_back(new Item_empty_string("User",16));
   field_list.push_back(new Item_empty_string("Host",LIST_PROCESS_HOST_LEN));
   field_list.push_back(field=new Item_empty_string("db",NAME_CHAR_LEN));
@@ -6695,10 +6695,14 @@ TABLE *create_schema_table(THD *thd, TAB
       break;
     case MYSQL_TYPE_FLOAT:
     case MYSQL_TYPE_DOUBLE:
-      if ((item= new Item_float(fields_info->field_name, 0.0, NOT_FIXED_DEC, 
-                           fields_info->field_length)) == NULL)
+    {
+      const NameString field_name(fields_info->field_name,
+                                  strlen(fields_info->field_name));
+      if ((item= new Item_float(field_name, 0.0, NOT_FIXED_DEC, 
+                                fields_info->field_length)) == NULL)
         DBUG_RETURN(NULL);
       break;
+    }
     case MYSQL_TYPE_DECIMAL:
     case MYSQL_TYPE_NEWDECIMAL:
       if (!(item= new Item_decimal((longlong) fields_info->value, false)))

=== modified file 'sql/sql_string.h'
--- a/sql/sql_string.h	revid:kevin.lewis@stripped
+++ b/sql/sql_string.h	revid:kevin.lewis@stripped
@@ -27,6 +27,12 @@
   A wrapper class for null-terminated constant strings.
   Constructors make sure that the position of the '\0' terminating byte
   in m_str is always in sync with m_length.
+
+  This class must stay as small as possible as we often 
+  pass it and its descendants (such as NameString) into functions
+  using call-by-value evaluation.
+
+  Don't add new members or virual methods into this class!
 */
 class SimpleCString
 {

=== modified file 'sql/sql_table.cc'
--- a/sql/sql_table.cc	revid:kevin.lewis@stripped
+++ b/sql/sql_table.cc	revid:kevin.lewis@stripped
@@ -7947,7 +7947,8 @@ bool mysql_checksum_table(THD *thd, TABL
 
   field_list.push_back(item = new Item_empty_string("Table", NAME_LEN*2));
   item->maybe_null= 1;
-  field_list.push_back(item= new Item_int("Checksum", (longlong) 1,
+  field_list.push_back(item= new Item_int(NAME_STRING("Checksum"),
+                                          (longlong) 1,
                                           MY_INT64_NUM_DECIMAL_DIGITS));
   item->maybe_null= 1;
   if (protocol->send_result_set_metadata(&field_list,

=== modified file 'sql/sql_yacc.yy'
--- a/sql/sql_yacc.yy	revid:kevin.lewis@stripped
+++ b/sql/sql_yacc.yy	revid:kevin.lewis@stripped
@@ -9392,7 +9392,7 @@ function_call_conflict:
         | WEEK_SYM '(' expr ')'
           {
             THD *thd= YYTHD;
-            Item *i1= new (thd->mem_root) Item_int((char*) "0",
+            Item *i1= new (thd->mem_root) Item_int(NAME_STRING("0"),
                                            thd->variables.default_week_format,
                                                    1);
             if (i1 == NULL)
@@ -12745,13 +12745,13 @@ literal:
           }
         | FALSE_SYM
           {
-            $$= new (YYTHD->mem_root) Item_int((char*) "FALSE",0,1);
+            $$= new (YYTHD->mem_root) Item_int(NAME_STRING("FALSE"), 0, 1);
             if ($$ == NULL)
               MYSQL_YYABORT;
           }
         | TRUE_SYM
           {
-            $$= new (YYTHD->mem_root) Item_int((char*) "TRUE",1,1);
+            $$= new (YYTHD->mem_root) Item_int(NAME_STRING("TRUE"), 1, 1);
             if ($$ == NULL)
               MYSQL_YYABORT;
           }
@@ -12831,7 +12831,7 @@ NUM_literal:
           {
             int error;
             $$= new (YYTHD->mem_root)
-                  Item_int($1.str,
+                  Item_int($1,
                            (longlong) my_strtoll10($1.str, NULL, &error),
                            $1.length);
             if ($$ == NULL)
@@ -12841,7 +12841,7 @@ NUM_literal:
           {
             int error;
             $$= new (YYTHD->mem_root)
-                  Item_int($1.str,
+                  Item_int($1,
                            (longlong) my_strtoll10($1.str, NULL, &error),
                            $1.length);
             if ($$ == NULL)

=== modified file 'storage/innobase/buf/buf0flu.cc'
--- a/storage/innobase/buf/buf0flu.cc	revid:kevin.lewis@stripped
+++ b/storage/innobase/buf/buf0flu.cc	revid:kevin.lewis@stripped
@@ -1090,75 +1090,7 @@ buf_flush_page_try(
 }
 # endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
 /***********************************************************//**
-Attempts to flush a given neighbor of a page to disk.
-@return	true if flushed. */
-static
-bool
-buf_flush_try_one_neighbor(
-/*=======================*/
-	ulint		space,		/*!< in: space id */
-	ulint		offset,		/*!< in: page offset */
-	ulint		neighbor_offset,/*!< in: neigbor page offset to try */
-	enum buf_flush	flush_type)	/*!< in: BUF_FLUSH_LRU or
-					BUF_FLUSH_LIST */
-{
-	buf_page_t*	bpage;
-	buf_pool_t*	buf_pool = buf_pool_get(space, neighbor_offset);
-
-	ut_ad(flush_type == BUF_FLUSH_LRU || flush_type == BUF_FLUSH_LIST);
-
-	buf_pool_mutex_enter(buf_pool);
-
-	/* We only want to flush pages from this buffer pool. */
-	bpage = buf_page_hash_get(buf_pool, space, neighbor_offset);
-
-	if (!bpage) {
-
-		buf_pool_mutex_exit(buf_pool);
-		/* not contiguous */
-		return(false);
-	}
-
-	ut_a(buf_page_in_file(bpage));
-
-	/* We avoid flushing 'non-old' blocks in an LRU flush,
-	because the flushed blocks are soon freed */
-
-	if (flush_type != BUF_FLUSH_LRU
-	    || neighbor_offset == offset
-	    || buf_page_is_old(bpage)) {
-		mutex_t* block_mutex = buf_page_get_mutex(bpage);
-
-		mutex_enter(block_mutex);
-
-		if (buf_flush_ready_for_flush(bpage, flush_type)
-		    && (neighbor_offset == offset || !bpage->buf_fix_count)) {
-			/* We only try to flush those
-			neighbors != offset where the buf fix
-			count is zero, as we then know that we
-			probably can latch the page without a
-			semaphore wait. Semaphore waits are
-			expensive because we must flush the
-			doublewrite buffer before we start
-			waiting. */
-
-			buf_flush_page(buf_pool, bpage, flush_type);
-			ut_ad(!mutex_own(block_mutex));
-			ut_ad(!buf_pool_mutex_own(buf_pool));
-			/* contiguous */
-			return(true);
-		} else {
-			mutex_exit(block_mutex);
-		}
-	}
-	buf_pool_mutex_exit(buf_pool);
-
-	/* not contiguous */
-	return(false);
-}
-
-/***********************************************************//**
-Flushes to disk contiguous flushable pages within the flush area.
+Flushes to disk all flushable pages within the flush area.
 @return	number of pages flushed */
 static
 ulint
@@ -1180,7 +1112,6 @@ buf_flush_try_neighbors(
 	buf_pool_t*	buf_pool = buf_pool_get(space, offset);
 
 	ut_ad(flush_type == BUF_FLUSH_LRU || flush_type == BUF_FLUSH_LIST);
-	ut_ad(n_flushed < n_to_flush);
 
 	if (UT_LIST_GET_LEN(buf_pool->LRU) < BUF_LRU_OLD_MIN_LEN
 	    || !srv_flush_neighbors) {
@@ -1209,26 +1140,71 @@ buf_flush_try_neighbors(
 		high = fil_space_get_size(space);
 	}
 
-	/* Do a backward scan until one of the following becomes true:
-	(1) We reach the end of the extent
-	(2) We have flushed enough pages requested by the caller
-	(3) We reach the end of contiguously present flushable pages */
-
-	for (i = offset;
-	     i >= low
-	     && (count + n_flushed) < n_to_flush
-	     && buf_flush_try_one_neighbor(space, offset, i, flush_type);
-	     i--) {
-		++count;
-	}
-
-	/* Do a forward scan in same way, if need */
-	for (i = offset + 1;
-	     i < high
-	     && (count + n_flushed) < n_to_flush
-	     && buf_flush_try_one_neighbor(space, offset, i, flush_type);
-	     i++) {
-		++count;
+	for (i = low; i < high; i++) {
+
+		buf_page_t*	bpage;
+
+		if ((count + n_flushed) >= n_to_flush) {
+
+			/* We have already flushed enough pages and
+			should call it a day. There is, however, one
+			exception. If the page whose neighbors we
+			are flushing has not been flushed yet then
+			we'll try to flush the victim that we
+			selected originally. */
+			if (i <= offset) {
+				i = offset;
+			} else {
+				break;
+			}
+		}
+
+		buf_pool = buf_pool_get(space, i);
+
+		buf_pool_mutex_enter(buf_pool);
+
+		/* We only want to flush pages from this buffer pool. */
+		bpage = buf_page_hash_get(buf_pool, space, i);
+
+		if (!bpage) {
+
+			buf_pool_mutex_exit(buf_pool);
+			continue;
+		}
+
+		ut_a(buf_page_in_file(bpage));
+
+		/* We avoid flushing 'non-old' blocks in an LRU flush,
+		because the flushed blocks are soon freed */
+
+		if (flush_type != BUF_FLUSH_LRU
+		    || i == offset
+		    || buf_page_is_old(bpage)) {
+			mutex_t* block_mutex = buf_page_get_mutex(bpage);
+
+			mutex_enter(block_mutex);
+
+			if (buf_flush_ready_for_flush(bpage, flush_type)
+			    && (i == offset || !bpage->buf_fix_count)) {
+				/* We only try to flush those
+				neighbors != offset where the buf fix
+				count is zero, as we then know that we
+				probably can latch the page without a
+				semaphore wait. Semaphore waits are
+				expensive because we must flush the
+				doublewrite buffer before we start
+				waiting. */
+
+				buf_flush_page(buf_pool, bpage, flush_type);
+				ut_ad(!mutex_own(block_mutex));
+				ut_ad(!buf_pool_mutex_own(buf_pool));
+				count++;
+				continue;
+			} else {
+				mutex_exit(block_mutex);
+			}
+		}
+		buf_pool_mutex_exit(buf_pool);
 	}
 
 	if (count > 0) {

=== modified file 'storage/innobase/sync/sync0sync.cc'
--- a/storage/innobase/sync/sync0sync.cc	revid:kevin.lewis@stripped
+++ b/storage/innobase/sync/sync0sync.cc	revid:kevin.lewis@stripped
@@ -1570,7 +1570,7 @@ sync_close(void)
 
 		mutex_free(mutex);
 
-	        mutex = UT_LIST_GET_FIRST(mutex_list);
+		mutex = UT_LIST_GET_FIRST(mutex_list);
 	}
 
 	mutex_free(&mutex_list_mutex);

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