List:Commits« Previous MessageNext Message »
From:magnus.blaudd Date:April 18 2012 8:06am
Subject:bzr push into mysql-trunk branch (magnus.blaudd:3892 to 3893) WL#5961
View as plain text  
 3893 magnus.blaudd@stripped	2012-04-18 [merge]
      Merge WL#5961 with latest trunk

    modified:
      include/mysql_com.h
      mysql-test/r/tablespace.result
      mysql-test/suite/perfschema/r/digest_table_full.result
      mysql-test/suite/perfschema/r/statement_digest.result
      mysql-test/suite/perfschema/r/statement_digest_consumers.result
      mysql-test/suite/perfschema/r/statement_digest_long_query.result
      mysql-test/t/tablespace.test
      sql/field.h
      sql/handler.h
      sql/lex.h
      sql/sql_show.cc
      sql/sql_table.cc
      sql/sql_yacc.yy
      sql/table.cc
      sql/unireg.cc
 3892 Norvald H. Ryeng	2012-04-18
      Bug#13801019 ASSERTION `0' FAILED IN CREATE_MYISAM_TMP_TABLE
      
      Problem: JOIN::exec() tries to create temporary tables for derived
      tables that the optimizer has decided to treat as constant tables.
      
      Consider the query from the test case:
      
      SELECT *
      FROM (SELECT * FROM t1) AS a1
        RIGHT JOIN t3
        LEFT JOIN t2 ON d=c ON a=c;
      
      The optimizer first decides to materialize a1. In
      make_join_statistics() it calls update_ref_and_keys() to identify all
      possible keys for the table. Later on, make_join_statistics()
      discovers that the join conditions are impossible and tags a1 as a
      constant table returning only NULL values. Unused keys are supposed to
      be removed later on by JOIN::drop_unused_derived_keys(), but since a1
      has been marked as a constant table, it is ignored and all the
      possible keys are left.
      
      At the start of query execution, JOIN::prepare_result() calls
      st_select_lex::handle_derived() to create the necessary temporary
      tables. When it tries to create a temporary table for a1, the attempt
      triggers an assertion in create_myisam_tmp_table() since it tries to
      create a temporary table with more than one key.
      
      Fix: Check that a derived table is not marked as constant before
      creating a temporary table for it.
     @ mysql-test/r/derived.result
        Add test case for bug #13801019.
     @ mysql-test/t/derived.test
        Add test case for bug #13801019.
     @ sql/sql_derived.cc
        Check that a derived table is not marked as constant before
        creating a temporary table for it.
     @ sql/sql_optimizer.cc
        Drop unused derived keys also from const tables.
     @ sql/sql_optimizer.h
        Initialize const_table_map when JOIN object is constructed.

    modified:
      mysql-test/r/derived.result
      mysql-test/t/derived.test
      sql/sql_derived.cc
      sql/sql_optimizer.cc
      sql/sql_optimizer.h
=== modified file 'include/mysql_com.h'
--- a/include/mysql_com.h	2012-03-28 11:25:37 +0000
+++ b/include/mysql_com.h	2012-04-10 12:20:05 +0000
@@ -119,10 +119,10 @@ enum enum_server_command
   Was part of old online ALTER API, flag is now unused.
 */
 #define FIELD_IS_RENAMED (1<< 21)       /* Intern: Field is being renamed */
-#define FIELD_FLAGS_STORAGE_MEDIA 22    /* Field storage media, bit 22-23,
-                                           reserved by MySQL Cluster */
-#define FIELD_FLAGS_COLUMN_FORMAT 24    /* Field column format, bit 24-25,
-                                           reserved by MySQL Cluster */
+#define FIELD_FLAGS_STORAGE_MEDIA 22    /* Field storage media, bit 22-23 */
+#define FIELD_FLAGS_STORAGE_MEDIA_MASK (3 << FIELD_FLAGS_STORAGE_MEDIA)
+#define FIELD_FLAGS_COLUMN_FORMAT 24    /* Field column format, bit 24-25 */
+#define FIELD_FLAGS_COLUMN_FORMAT_MASK (3 << FIELD_FLAGS_COLUMN_FORMAT)
 
 #define REFRESH_GRANT		1	/* Refresh grant tables */
 #define REFRESH_LOG		2	/* Start on new log file */

=== modified file 'mysql-test/r/tablespace.result'
--- a/mysql-test/r/tablespace.result	2011-11-14 13:01:55 +0000
+++ b/mysql-test/r/tablespace.result	2012-04-10 09:29:14 +0000
@@ -98,15 +98,144 @@ Table	Create Table
 t1	CREATE TABLE `t1` (
   `a` int(11) NOT NULL,
   `b` int(11) DEFAULT NULL,
-  `c` int(11) DEFAULT NULL,
-  `d` int(11) NOT NULL,
-  `e` int(11) DEFAULT NULL,
-  `f` int(11) DEFAULT NULL,
+  `c` int(11) /*!50606 STORAGE DISK */ DEFAULT NULL,
+  `d` int(11) NOT NULL /*!50606 STORAGE MEMORY */,
+  `e` int(11) /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `f` int(11) /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
   `g` int(11) DEFAULT NULL,
-  `h` int(11) NOT NULL,
-  `i` int(11) DEFAULT NULL,
-  `j` int(11) DEFAULT NULL,
-  `k` int(11) DEFAULT NULL,
+  `h` int(11) NOT NULL /*!50606 STORAGE DISK */ /*!50606 COLUMN_FORMAT DYNAMIC */,
+  `i` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `j` int(11) /*!50606 STORAGE DISK */ /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `k` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
   PRIMARY KEY (`a`)
 ) /*!50100 TABLESPACE the_tablespacename STORAGE DISK */ ENGINE=MyISAM DEFAULT CHARSET=latin1
 DROP TABLE t1;
+#
+# WL#3627 Add COLUMN_FORMAT and STORAGE for fields
+#
+CREATE TABLE t1 (
+a int STORAGE DISK,
+b int STORAGE MEMORY NOT NULL,
+c int COLUMN_FORMAT DYNAMIC,
+d int COLUMN_FORMAT FIXED,
+e int COLUMN_FORMAT DEFAULT,
+f int STORAGE DISK COLUMN_FORMAT DYNAMIC NOT NULL,
+g int STORAGE MEMORY COLUMN_FORMAT DYNAMIC,
+h int STORAGE DISK COLUMN_FORMAT FIXED,
+i int STORAGE MEMORY COLUMN_FORMAT FIXED
+);
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) /*!50606 STORAGE DISK */ DEFAULT NULL,
+  `b` int(11) NOT NULL /*!50606 STORAGE MEMORY */,
+  `c` int(11) /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `d` int(11) /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `e` int(11) DEFAULT NULL,
+  `f` int(11) NOT NULL /*!50606 STORAGE DISK */ /*!50606 COLUMN_FORMAT DYNAMIC */,
+  `g` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `h` int(11) /*!50606 STORAGE DISK */ /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `i` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ALTER TABLE t1
+ADD COLUMN j int STORAGE DISK,
+ADD COLUMN k int STORAGE MEMORY NOT NULL,
+ADD COLUMN l int COLUMN_FORMAT DYNAMIC,
+ADD COLUMN m int COLUMN_FORMAT FIXED,
+ADD COLUMN n int COLUMN_FORMAT DEFAULT,
+ADD COLUMN o int STORAGE DISK COLUMN_FORMAT DYNAMIC NOT NULL,
+ADD COLUMN p int STORAGE MEMORY COLUMN_FORMAT DYNAMIC,
+ADD COLUMN q int STORAGE DISK COLUMN_FORMAT FIXED,
+ADD COLUMN r int STORAGE MEMORY COLUMN_FORMAT FIXED;
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) /*!50606 STORAGE DISK */ DEFAULT NULL,
+  `b` int(11) NOT NULL /*!50606 STORAGE MEMORY */,
+  `c` int(11) /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `d` int(11) /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `e` int(11) DEFAULT NULL,
+  `f` int(11) NOT NULL /*!50606 STORAGE DISK */ /*!50606 COLUMN_FORMAT DYNAMIC */,
+  `g` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `h` int(11) /*!50606 STORAGE DISK */ /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `i` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `j` int(11) /*!50606 STORAGE DISK */ DEFAULT NULL,
+  `k` int(11) NOT NULL /*!50606 STORAGE MEMORY */,
+  `l` int(11) /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `m` int(11) /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `n` int(11) DEFAULT NULL,
+  `o` int(11) NOT NULL /*!50606 STORAGE DISK */ /*!50606 COLUMN_FORMAT DYNAMIC */,
+  `p` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `q` int(11) /*!50606 STORAGE DISK */ /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `r` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ALTER TABLE t1
+MODIFY COLUMN j int STORAGE MEMORY NOT NULL,
+MODIFY COLUMN k int COLUMN_FORMAT DYNAMIC,
+MODIFY COLUMN l int COLUMN_FORMAT FIXED,
+MODIFY COLUMN m int COLUMN_FORMAT DEFAULT,
+MODIFY COLUMN n int STORAGE DISK COLUMN_FORMAT DYNAMIC NOT NULL,
+MODIFY COLUMN o int STORAGE MEMORY COLUMN_FORMAT DYNAMIC,
+MODIFY COLUMN p int STORAGE DISK COLUMN_FORMAT FIXED,
+MODIFY COLUMN q int STORAGE MEMORY COLUMN_FORMAT FIXED,
+MODIFY COLUMN r int STORAGE DISK;
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) /*!50606 STORAGE DISK */ DEFAULT NULL,
+  `b` int(11) NOT NULL /*!50606 STORAGE MEMORY */,
+  `c` int(11) /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `d` int(11) /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `e` int(11) DEFAULT NULL,
+  `f` int(11) NOT NULL /*!50606 STORAGE DISK */ /*!50606 COLUMN_FORMAT DYNAMIC */,
+  `g` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `h` int(11) /*!50606 STORAGE DISK */ /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `i` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `j` int(11) NOT NULL /*!50606 STORAGE MEMORY */,
+  `k` int(11) /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `l` int(11) /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `m` int(11) DEFAULT NULL,
+  `n` int(11) NOT NULL /*!50606 STORAGE DISK */ /*!50606 COLUMN_FORMAT DYNAMIC */,
+  `o` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `p` int(11) /*!50606 STORAGE DISK */ /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `q` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `r` int(11) /*!50606 STORAGE DISK */ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+ALTER TABLE t1
+MODIFY COLUMN h int COLUMN_FORMAT DYNAMIC COLUMN_FORMAT FIXED,
+MODIFY COLUMN i int COLUMN_FORMAT DYNAMIC COLUMN_FORMAT DEFAULT,
+MODIFY COLUMN j int COLUMN_FORMAT FIXED COLUMN_FORMAT DYNAMIC,
+MODIFY COLUMN k int COLUMN_FORMAT FIXED COLUMN_FORMAT DEFAULT,
+MODIFY COLUMN l int STORAGE DISK STORAGE MEMORY,
+MODIFY COLUMN m int STORAGE DISK STORAGE DEFAULT,
+MODIFY COLUMN n int STORAGE MEMORY STORAGE DISK,
+MODIFY COLUMN o int STORAGE MEMORY STORAGE DEFAULT,
+MODIFY COLUMN p int STORAGE DISK STORAGE MEMORY
+COLUMN_FORMAT FIXED COLUMN_FORMAT DYNAMIC,
+MODIFY COLUMN q int STORAGE DISK STORAGE MEMORY STORAGE DEFAULT
+COLUMN_FORMAT FIXED COLUMN_FORMAT DYNAMIC COLUMN_FORMAT DEFAULT,
+MODIFY COLUMN r int STORAGE DEFAULT STORAGE DEFAULT STORAGE MEMORY
+STORAGE DISK STORAGE MEMORY STORAGE DISK STORAGE DISK;
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) /*!50606 STORAGE DISK */ DEFAULT NULL,
+  `b` int(11) NOT NULL /*!50606 STORAGE MEMORY */,
+  `c` int(11) /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `d` int(11) /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `e` int(11) DEFAULT NULL,
+  `f` int(11) NOT NULL /*!50606 STORAGE DISK */ /*!50606 COLUMN_FORMAT DYNAMIC */,
+  `g` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `h` int(11) /*!50606 COLUMN_FORMAT FIXED */ DEFAULT NULL,
+  `i` int(11) DEFAULT NULL,
+  `j` int(11) /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `k` int(11) DEFAULT NULL,
+  `l` int(11) /*!50606 STORAGE MEMORY */ DEFAULT NULL,
+  `m` int(11) DEFAULT NULL,
+  `n` int(11) /*!50606 STORAGE DISK */ DEFAULT NULL,
+  `o` int(11) DEFAULT NULL,
+  `p` int(11) /*!50606 STORAGE MEMORY */ /*!50606 COLUMN_FORMAT DYNAMIC */ DEFAULT NULL,
+  `q` int(11) DEFAULT NULL,
+  `r` int(11) /*!50606 STORAGE DISK */ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;

=== modified file 'mysql-test/suite/perfschema/r/digest_table_full.result'
--- a/mysql-test/suite/perfschema/r/digest_table_full.result	2012-04-11 19:37:50 +0000
+++ b/mysql-test/suite/perfschema/r/digest_table_full.result	2012-04-18 08:05:23 +0000
@@ -86,7 +86,7 @@ SELECT DIGEST, DIGEST_TEXT, COUNT_STAR, 
 SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest;
 DIGEST	DIGEST_TEXT	COUNT_STAR	SUM_ROWS_AFFECTED	SUM_WARNINGS	SUM_ERRORS
 NULL	NULL	38	30	1	2
-a938a1f31256fd2ec1bc3cda9b7a8519	TRUNCATE TABLE performance_schema . events_statements_summary_by_digest  	1	0	0	0
+70ecd9c9e447fe343322f29d53fe454f	TRUNCATE TABLE performance_schema . events_statements_summary_by_digest  	1	0	0	0
 SHOW VARIABLES LIKE "performance_schema_digests_size";
 Variable_name	Value
 performance_schema_digests_size	2

=== modified file 'mysql-test/suite/perfschema/r/statement_digest.result'
--- a/mysql-test/suite/perfschema/r/statement_digest.result	2012-04-11 19:37:50 +0000
+++ b/mysql-test/suite/perfschema/r/statement_digest.result	2012-04-18 08:05:23 +0000
@@ -85,30 +85,30 @@ Warning	1265	Data truncated for column '
 SELECT DIGEST, DIGEST_TEXT, COUNT_STAR, SUM_ROWS_AFFECTED, SUM_WARNINGS,
 SUM_ERRORS FROM performance_schema.events_statements_summary_by_digest;
 DIGEST	DIGEST_TEXT	COUNT_STAR	SUM_ROWS_AFFECTED	SUM_WARNINGS	SUM_ERRORS
-a938a1f31256fd2ec1bc3cda9b7a8519	TRUNCATE TABLE performance_schema . events_statements_summary_by_digest  	1	0	0	0
-e7f8dc15f1156f57978116e457cc7488	SELECT ? FROM t1  	1	0	0	0
-29c3f8abab7962fe1f664a51fca9effc	SELECT ? FROM `t1`  	1	0	0	0
-ca50ee9fccc00a2c95e44ef3feea866a	SELECT ?, ... FROM t1  	2	0	0	0
-3b8d5477aa795a19c9e9183e4ad04e6b	SELECT ? FROM t2  	1	0	0	0
-8067bb511c3620aac5388c5674b328a0	SELECT ?, ... FROM t2  	2	0	0	0
-a58cc957ffdd32c2cffeffa65b6c9324	INSERT INTO t1 VALUES (?)  	1	1	0	0
-439869529508fe62007c6f97890a43ae	INSERT INTO t2 VALUES (?)  	1	1	0	0
-a9f32e4c511753d7317a014630050274	INSERT INTO t3 VALUES (...)  	4	4	0	0
-55351862b4cc299bfd9958920936dc34	INSERT INTO t4 VALUES (...)  	1	1	0	0
-976ba1912e3bf2d29fb0eefed75c9f89	INSERT INTO t5 VALUES (...)  	1	1	0	0
-de71aea3aaab6826e52c690197c28a42	INSERT INTO t1 VALUES (?) /* , ... */  	2	7	0	0
-51a351f92e6fd34cef43add51eef65fe	INSERT INTO t3 VALUES (...) /* , ... */  	1	3	0	0
-85ec05195fd87103b8e751c559abe9d4	INSERT INTO t5 VALUES (...) /* , ... */  	1	3	0	0
-c72a99dab537b00f123fcb1c87c74115	INSERT INTO t1 VALUES ( NULL )  	1	1	0	0
-799c87eedbd26b27146c7f01cf275a9a	INSERT INTO t6 VALUES (...)  	5	5	0	0
-e50a377fe96a344be8496148bcd60407	SELECT ? + ?  	3	0	0	0
-08bcb063d9c3c6ac9e150ec7c727eea7	SELECT ?  	1	0	0	0
-30046d97cfdc44c95bdaa7f3987d0a20	CREATE SCHEMA statements_digest_temp  	2	2	0	0
-8e40e6461f3ab4454ddb8f21b5cda3ba	DROP SCHEMA statements_digest_temp  	2	0	0	0
-2fb7a70cbcfbc2e1900375406b9e4fca	SELECT ? FROM t11  	1	0	0	1
-1cfadd74d3e5f992ae8ae694c86fc9ec	CREATE TABLE t11 ( c CHARACTER (?) )  	2	0	0	1
-367c6d0eb00c1a6e553deddc195a6061	INSERT INTO t11 VALUES (?)  	1	1	1	0
-756f25d54bb3daf92c54903b6584586c	SHOW WARNINGS  	1	0	0	0
+70ecd9c9e447fe343322f29d53fe454f	TRUNCATE TABLE performance_schema . events_statements_summary_by_digest  	1	0	0	0
+5d495852490f30472a5e451973f373c1	SELECT ? FROM t1  	1	0	0	0
+cb0826a38cf1d9e8c77eba5d7d6fb875	SELECT ? FROM `t1`  	1	0	0	0
+e4473381b53762af1eb5c12614374f7c	SELECT ?, ... FROM t1  	2	0	0	0
+ceee8936a87a0f5175734f5f10e7057c	SELECT ? FROM t2  	1	0	0	0
+a7830790d49ef281f87e24d71515aab4	SELECT ?, ... FROM t2  	2	0	0	0
+80aecfb2707101fc47d6e7fb2de6832f	INSERT INTO t1 VALUES (?)  	1	1	0	0
+3dd3e7bef876fec44fb2a896978ecde9	INSERT INTO t2 VALUES (?)  	1	1	0	0
+9fed5893f1e2c272b47f1790acf6d3a1	INSERT INTO t3 VALUES (...)  	4	4	0	0
+3d4ff83706c001cbc58741e4583d7b0f	INSERT INTO t4 VALUES (...)  	1	1	0	0
+d5c4d8be8f940d3eba1c0c5ae1dc512d	INSERT INTO t5 VALUES (...)  	1	1	0	0
+672215bee7346eba333bf643cfd85563	INSERT INTO t1 VALUES (?) /* , ... */  	2	7	0	0
+af4f2ef1970475437400e5742e5ec4ed	INSERT INTO t3 VALUES (...) /* , ... */  	1	3	0	0
+c8c6cea379a59bd54868aa6a02988de5	INSERT INTO t5 VALUES (...) /* , ... */  	1	3	0	0
+ae280d97097bae4d293c1a986ed28418	INSERT INTO t1 VALUES ( NULL )  	1	1	0	0
+ebbe3cb851969592e6fc25921fa7b53b	INSERT INTO t6 VALUES (...)  	5	5	0	0
+7f07c2f5d5254f45a3365d0a98015862	SELECT ? + ?  	3	0	0	0
+70d3e4d0f131fc5324edc990fbed3bd8	SELECT ?  	1	0	0	0
+fb40aece1f68b5c3fbaf220bc21ad353	CREATE SCHEMA statements_digest_temp  	2	2	0	0
+622ef9323ed99ee165d79477219a693b	DROP SCHEMA statements_digest_temp  	2	0	0	0
+cc0ef8eb2f92a6ddf2e93fef99044c92	SELECT ? FROM t11  	1	0	0	1
+48730227c5e53dfb6ee765c251930bc6	CREATE TABLE t11 ( c CHARACTER (?) )  	2	0	0	1
+5426115bb326553db15da35d0c520b2b	INSERT INTO t11 VALUES (?)  	1	1	1	0
+9e23973ea6beef1737da28d6372eebdc	SHOW WARNINGS  	1	0	0	0
 ####################################
 # CLEANUP
 ####################################

=== modified file 'mysql-test/suite/perfschema/r/statement_digest_consumers.result'
--- a/mysql-test/suite/perfschema/r/statement_digest_consumers.result	2012-04-11 19:37:50 +0000
+++ b/mysql-test/suite/perfschema/r/statement_digest_consumers.result	2012-04-18 08:05:23 +0000
@@ -98,30 +98,30 @@ Warning	1265	Data truncated for column '
 ####################################
 SELECT digest, digest_text, count_star FROM performance_schema.events_statements_summary_by_digest;
 digest	digest_text	count_star
-a938a1f31256fd2ec1bc3cda9b7a8519	TRUNCATE TABLE performance_schema . events_statements_summary_by_digest  	1
-e7f8dc15f1156f57978116e457cc7488	SELECT ? FROM t1  	1
-29c3f8abab7962fe1f664a51fca9effc	SELECT ? FROM `t1`  	1
-ca50ee9fccc00a2c95e44ef3feea866a	SELECT ?, ... FROM t1  	2
-3b8d5477aa795a19c9e9183e4ad04e6b	SELECT ? FROM t2  	1
-8067bb511c3620aac5388c5674b328a0	SELECT ?, ... FROM t2  	2
-a58cc957ffdd32c2cffeffa65b6c9324	INSERT INTO t1 VALUES (?)  	1
-439869529508fe62007c6f97890a43ae	INSERT INTO t2 VALUES (?)  	1
-a9f32e4c511753d7317a014630050274	INSERT INTO t3 VALUES (...)  	4
-55351862b4cc299bfd9958920936dc34	INSERT INTO t4 VALUES (...)  	1
-976ba1912e3bf2d29fb0eefed75c9f89	INSERT INTO t5 VALUES (...)  	1
-de71aea3aaab6826e52c690197c28a42	INSERT INTO t1 VALUES (?) /* , ... */  	2
-51a351f92e6fd34cef43add51eef65fe	INSERT INTO t3 VALUES (...) /* , ... */  	1
-85ec05195fd87103b8e751c559abe9d4	INSERT INTO t5 VALUES (...) /* , ... */  	1
-c72a99dab537b00f123fcb1c87c74115	INSERT INTO t1 VALUES ( NULL )  	1
-799c87eedbd26b27146c7f01cf275a9a	INSERT INTO t6 VALUES (...)  	5
-e50a377fe96a344be8496148bcd60407	SELECT ? + ?  	3
-08bcb063d9c3c6ac9e150ec7c727eea7	SELECT ?  	1
-30046d97cfdc44c95bdaa7f3987d0a20	CREATE SCHEMA statements_digest_temp  	2
-8e40e6461f3ab4454ddb8f21b5cda3ba	DROP SCHEMA statements_digest_temp  	2
-2fb7a70cbcfbc2e1900375406b9e4fca	SELECT ? FROM t11  	1
-1cfadd74d3e5f992ae8ae694c86fc9ec	CREATE TABLE t11 ( c CHARACTER (?) )  	2
-367c6d0eb00c1a6e553deddc195a6061	INSERT INTO t11 VALUES (?)  	1
-756f25d54bb3daf92c54903b6584586c	SHOW WARNINGS  	1
+70ecd9c9e447fe343322f29d53fe454f	TRUNCATE TABLE performance_schema . events_statements_summary_by_digest  	1
+5d495852490f30472a5e451973f373c1	SELECT ? FROM t1  	1
+cb0826a38cf1d9e8c77eba5d7d6fb875	SELECT ? FROM `t1`  	1
+e4473381b53762af1eb5c12614374f7c	SELECT ?, ... FROM t1  	2
+ceee8936a87a0f5175734f5f10e7057c	SELECT ? FROM t2  	1
+a7830790d49ef281f87e24d71515aab4	SELECT ?, ... FROM t2  	2
+80aecfb2707101fc47d6e7fb2de6832f	INSERT INTO t1 VALUES (?)  	1
+3dd3e7bef876fec44fb2a896978ecde9	INSERT INTO t2 VALUES (?)  	1
+9fed5893f1e2c272b47f1790acf6d3a1	INSERT INTO t3 VALUES (...)  	4
+3d4ff83706c001cbc58741e4583d7b0f	INSERT INTO t4 VALUES (...)  	1
+d5c4d8be8f940d3eba1c0c5ae1dc512d	INSERT INTO t5 VALUES (...)  	1
+672215bee7346eba333bf643cfd85563	INSERT INTO t1 VALUES (?) /* , ... */  	2
+af4f2ef1970475437400e5742e5ec4ed	INSERT INTO t3 VALUES (...) /* , ... */  	1
+c8c6cea379a59bd54868aa6a02988de5	INSERT INTO t5 VALUES (...) /* , ... */  	1
+ae280d97097bae4d293c1a986ed28418	INSERT INTO t1 VALUES ( NULL )  	1
+ebbe3cb851969592e6fc25921fa7b53b	INSERT INTO t6 VALUES (...)  	5
+7f07c2f5d5254f45a3365d0a98015862	SELECT ? + ?  	3
+70d3e4d0f131fc5324edc990fbed3bd8	SELECT ?  	1
+fb40aece1f68b5c3fbaf220bc21ad353	CREATE SCHEMA statements_digest_temp  	2
+622ef9323ed99ee165d79477219a693b	DROP SCHEMA statements_digest_temp  	2
+cc0ef8eb2f92a6ddf2e93fef99044c92	SELECT ? FROM t11  	1
+48730227c5e53dfb6ee765c251930bc6	CREATE TABLE t11 ( c CHARACTER (?) )  	2
+5426115bb326553db15da35d0c520b2b	INSERT INTO t11 VALUES (?)  	1
+9e23973ea6beef1737da28d6372eebdc	SHOW WARNINGS  	1
 SELECT digest, digest_text FROM performance_schema.events_statements_current;
 digest	digest_text
 ####################################

=== modified file 'mysql-test/suite/perfschema/r/statement_digest_long_query.result'
--- a/mysql-test/suite/perfschema/r/statement_digest_long_query.result	2012-04-11 19:37:50 +0000
+++ b/mysql-test/suite/perfschema/r/statement_digest_long_query.result	2012-04-18 08:05:23 +0000
@@ -8,5 +8,5 @@ SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1
 ####################################
 SELECT digest, digest_text, count_star FROM events_statements_summary_by_digest;
 digest	digest_text	count_star
-04926b9f44daeaf022a8c35932cb6e77	TRUNCATE TABLE events_statements_summary_by_digest  	1
-431eaac14d752b504e8f6c0bb5ad3afe	SELECT ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + !
 ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ...	1
+68753a29989b66b65ff59b8c601dc6a7	TRUNCATE TABLE events_statements_summary_by_digest  	1
+e7705259dae33df48399104e0222ad91	SELECT ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + !
 ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ...	1

=== modified file 'mysql-test/t/tablespace.test'
--- a/mysql-test/t/tablespace.test	2011-11-14 13:01:55 +0000
+++ b/mysql-test/t/tablespace.test	2012-04-10 09:29:14 +0000
@@ -107,10 +107,6 @@ DROP TABLE t1;
 #   k int STORAGE MEMORY COLUMN_FORMAT FIXED
 # ) STORAGE DISK TABLESPACE the_tablespacename ENGINE=MyISAM;
 #
-# NOTE! The column level properties will not yet show up
-# in SHOW CREATE TABLE of MySQL Server(although they are
-# visible in .trace file)
-#
 
 let $MYSQLD_DATADIR= `SELECT @@datadir`;
 copy_file std_data/cluster_7022_table.frm $MYSQLD_DATADIR/test/t1.frm;
@@ -121,3 +117,69 @@ SHOW CREATE TABLE t1;
 
 DROP TABLE t1;
 
+--echo #
+--echo # WL#3627 Add COLUMN_FORMAT and STORAGE for fields
+--echo #
+
+CREATE TABLE t1 (
+ a int STORAGE DISK,
+ b int STORAGE MEMORY NOT NULL,
+ c int COLUMN_FORMAT DYNAMIC,
+ d int COLUMN_FORMAT FIXED,
+ e int COLUMN_FORMAT DEFAULT,
+ f int STORAGE DISK COLUMN_FORMAT DYNAMIC NOT NULL,
+ g int STORAGE MEMORY COLUMN_FORMAT DYNAMIC,
+ h int STORAGE DISK COLUMN_FORMAT FIXED,
+ i int STORAGE MEMORY COLUMN_FORMAT FIXED
+);
+SHOW CREATE TABLE t1;
+
+# Add new columns with all variations of the new column
+# level attributes
+ALTER TABLE t1
+  ADD COLUMN j int STORAGE DISK,
+  ADD COLUMN k int STORAGE MEMORY NOT NULL,
+  ADD COLUMN l int COLUMN_FORMAT DYNAMIC,
+  ADD COLUMN m int COLUMN_FORMAT FIXED,
+  ADD COLUMN n int COLUMN_FORMAT DEFAULT,
+  ADD COLUMN o int STORAGE DISK COLUMN_FORMAT DYNAMIC NOT NULL,
+  ADD COLUMN p int STORAGE MEMORY COLUMN_FORMAT DYNAMIC,
+  ADD COLUMN q int STORAGE DISK COLUMN_FORMAT FIXED,
+  ADD COLUMN r int STORAGE MEMORY COLUMN_FORMAT FIXED;
+SHOW CREATE TABLE t1;
+
+# Use MODIFY COLUMN to "shift" all new attributes to the next column
+ALTER TABLE t1
+  MODIFY COLUMN j int STORAGE MEMORY NOT NULL,
+  MODIFY COLUMN k int COLUMN_FORMAT DYNAMIC,
+  MODIFY COLUMN l int COLUMN_FORMAT FIXED,
+  MODIFY COLUMN m int COLUMN_FORMAT DEFAULT,
+  MODIFY COLUMN n int STORAGE DISK COLUMN_FORMAT DYNAMIC NOT NULL,
+  MODIFY COLUMN o int STORAGE MEMORY COLUMN_FORMAT DYNAMIC,
+  MODIFY COLUMN p int STORAGE DISK COLUMN_FORMAT FIXED,
+  MODIFY COLUMN q int STORAGE MEMORY COLUMN_FORMAT FIXED,
+  MODIFY COLUMN r int STORAGE DISK;
+SHOW CREATE TABLE t1;
+
+# Check behaviour of multiple COLUMN_FORMAT and/or STORAGE definitions
+ALTER TABLE t1
+  MODIFY COLUMN h int COLUMN_FORMAT DYNAMIC COLUMN_FORMAT FIXED,
+  MODIFY COLUMN i int COLUMN_FORMAT DYNAMIC COLUMN_FORMAT DEFAULT,
+  MODIFY COLUMN j int COLUMN_FORMAT FIXED COLUMN_FORMAT DYNAMIC,
+  MODIFY COLUMN k int COLUMN_FORMAT FIXED COLUMN_FORMAT DEFAULT,
+  MODIFY COLUMN l int STORAGE DISK STORAGE MEMORY,
+  MODIFY COLUMN m int STORAGE DISK STORAGE DEFAULT,
+  MODIFY COLUMN n int STORAGE MEMORY STORAGE DISK,
+  MODIFY COLUMN o int STORAGE MEMORY STORAGE DEFAULT,
+  MODIFY COLUMN p int STORAGE DISK STORAGE MEMORY
+                      COLUMN_FORMAT FIXED COLUMN_FORMAT DYNAMIC,
+  MODIFY COLUMN q int STORAGE DISK STORAGE MEMORY STORAGE DEFAULT
+                      COLUMN_FORMAT FIXED COLUMN_FORMAT DYNAMIC COLUMN_FORMAT DEFAULT,
+  MODIFY COLUMN r int STORAGE DEFAULT STORAGE DEFAULT STORAGE MEMORY
+                      STORAGE DISK STORAGE MEMORY STORAGE DISK STORAGE DISK;
+SHOW CREATE TABLE t1;
+
+
+
+DROP TABLE t1;
+

=== modified file 'sql/field.h'
--- a/sql/field.h	2012-04-12 14:29:14 +0000
+++ b/sql/field.h	2012-04-18 08:05:23 +0000
@@ -1018,6 +1018,30 @@ public:
   }
 #endif
 
+  ha_storage_media field_storage_type() const
+  {
+    return (ha_storage_media)
+      ((flags >> FIELD_FLAGS_STORAGE_MEDIA) & 3);
+  }
+
+  void set_storage_type(ha_storage_media storage_type_arg)
+  {
+    DBUG_ASSERT(field_storage_type() == HA_SM_DEFAULT);
+    flags |= (storage_type_arg << FIELD_FLAGS_STORAGE_MEDIA);
+  }
+
+  column_format_type column_format() const
+  {
+    return (column_format_type)
+      ((flags >> FIELD_FLAGS_COLUMN_FORMAT) & 3);
+  }
+
+  void set_column_format(column_format_type column_format_arg)
+  {
+    DBUG_ASSERT(column_format() == COLUMN_FORMAT_TYPE_DEFAULT);
+    flags |= (column_format_arg << FIELD_FLAGS_COLUMN_FORMAT);
+  }
+
   /* Hash value */
   virtual void hash(ulong *nr, ulong *nr2);
   friend int cre_myisam(char * name, register TABLE *form, uint options,
@@ -3485,6 +3509,18 @@ public:
   {
     return (flags & (BINCMP_FLAG | BINARY_FLAG)) != 0;
   }
+
+  ha_storage_media field_storage_type() const
+  {
+    return (ha_storage_media)
+      ((flags >> FIELD_FLAGS_STORAGE_MEDIA) & 3);
+  }
+
+  column_format_type column_format() const
+  {
+    return (column_format_type)
+      ((flags >> FIELD_FLAGS_COLUMN_FORMAT) & 3);
+  }
 };
 
 

=== modified file 'sql/handler.h'
--- a/sql/handler.h	2012-04-11 13:50:46 +0000
+++ b/sql/handler.h	2012-04-18 08:05:23 +0000
@@ -347,6 +347,13 @@ enum row_type { ROW_TYPE_NOT_USED=-1, RO
                 /** Unused. Reserved for future versions. */
                 ROW_TYPE_PAGE };
 
+/* Specifies data storage format for individual columns */
+enum column_format_type {
+  COLUMN_FORMAT_TYPE_DEFAULT=   0, /* Not specified (use engine default) */
+  COLUMN_FORMAT_TYPE_FIXED=     1, /* FIXED format */
+  COLUMN_FORMAT_TYPE_DYNAMIC=   2  /* DYNAMIC format */
+};
+
 enum enum_binlog_func {
   BFN_RESET_LOGS=        1,
   BFN_RESET_SLAVE=       2,
@@ -1069,6 +1076,12 @@ public:
   // Table is renamed
   static const HA_ALTER_FLAGS ALTER_RENAME               = 1L << 18;
 
+  // Change the storage type of column 
+  static const HA_ALTER_FLAGS ALTER_COLUMN_STORAGE_TYPE = 1L << 19;
+
+  // Change the column format of column
+  static const HA_ALTER_FLAGS ALTER_COLUMN_COLUMN_FORMAT = 1L << 20;
+
   /**
     Create options (like MAX_ROWS) for the new version of table.
 

=== modified file 'sql/lex.h'
--- a/sql/lex.h	2012-04-11 16:52:28 +0000
+++ b/sql/lex.h	2012-04-18 08:05:23 +0000
@@ -117,6 +117,7 @@ static SYMBOL symbols[] = {
   { "COLLATE",		SYM(COLLATE_SYM)},
   { "COLLATION",	SYM(COLLATION_SYM)},
   { "COLUMN",		SYM(COLUMN_SYM)},
+  { "COLUMN_FORMAT",	SYM(COLUMN_FORMAT_SYM)},
   { "COLUMN_NAME",      SYM(COLUMN_NAME_SYM)},
   { "COLUMNS",		SYM(COLUMNS)},
   { "COMMENT",		SYM(COMMENT_SYM)},

=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc	2012-04-17 14:37:50 +0000
+++ b/sql/sql_show.cc	2012-04-18 08:05:23 +0000
@@ -1543,6 +1543,34 @@ int store_create_info(THD *thd, TABLE_LI
       packet->append(STRING_WITH_LEN(" NULL"));
     }
 
+    switch(field->field_storage_type()){
+    case HA_SM_DEFAULT:
+      break;
+    case HA_SM_DISK:
+      packet->append(STRING_WITH_LEN(" /*!50606 STORAGE DISK */"));
+      break;
+    case HA_SM_MEMORY:
+      packet->append(STRING_WITH_LEN(" /*!50606 STORAGE MEMORY */"));
+      break;
+    default:
+      DBUG_ASSERT(0);
+      break;
+    }
+
+    switch(field->column_format()){
+    case COLUMN_FORMAT_TYPE_DEFAULT:
+      break;
+    case COLUMN_FORMAT_TYPE_FIXED:
+      packet->append(STRING_WITH_LEN(" /*!50606 COLUMN_FORMAT FIXED */"));
+      break;
+    case COLUMN_FORMAT_TYPE_DYNAMIC:
+      packet->append(STRING_WITH_LEN(" /*!50606 COLUMN_FORMAT DYNAMIC */"));
+      break;
+    default:
+      DBUG_ASSERT(0);
+      break;
+    }
+
     if (print_default_clause(thd, field, &def_value, true))
     {
       packet->append(STRING_WITH_LEN(" DEFAULT "));

=== modified file 'sql/sql_table.cc'
--- a/sql/sql_table.cc	2012-04-18 03:53:17 +0000
+++ b/sql/sql_table.cc	2012-04-18 08:05:23 +0000
@@ -5362,6 +5362,16 @@ static bool fill_alter_inplace_info(THD 
       */
       if (field->field_index != new_field_index)
         ha_alter_info->handler_flags|= Alter_inplace_info::ALTER_COLUMN_ORDER;
+
+      /* Detect changes in storage type of column */
+      if (new_field->field_storage_type() != field->field_storage_type())
+        ha_alter_info->handler_flags|=
+          Alter_inplace_info::ALTER_COLUMN_STORAGE_TYPE;
+
+      /* Detect changes in column format of column */
+      if (new_field->column_format() != field->column_format())
+        ha_alter_info->handler_flags|=
+          Alter_inplace_info::ALTER_COLUMN_COLUMN_FORMAT;
     }
     else
     {

=== modified file 'sql/sql_yacc.yy'
--- a/sql/sql_yacc.yy	2012-04-17 14:37:50 +0000
+++ b/sql/sql_yacc.yy	2012-04-18 08:05:23 +0000
@@ -1085,6 +1085,7 @@ bool my_yyoverflow(short **a, YYSTYPE **
 %token  COLLATION_SYM                 /* SQL-2003-N */
 %token  COLUMNS
 %token  COLUMN_SYM                    /* SQL-2003-R */
+%token  COLUMN_FORMAT_SYM
 %token  COLUMN_NAME_SYM               /* SQL-2003-N */
 %token  COMMENT_SYM
 %token  COMMITTED_SYM                 /* SQL-2003-N */
@@ -6293,6 +6294,39 @@ attribute:
               Lex->charset=$2;
             }
           }
+        | COLUMN_FORMAT_SYM DEFAULT
+          {
+            Lex->type&= ~(FIELD_FLAGS_COLUMN_FORMAT_MASK);
+            Lex->type|=
+              (COLUMN_FORMAT_TYPE_DEFAULT << FIELD_FLAGS_COLUMN_FORMAT);
+          }
+        | COLUMN_FORMAT_SYM FIXED_SYM
+          {
+            Lex->type&= ~(FIELD_FLAGS_COLUMN_FORMAT_MASK);
+            Lex->type|=
+              (COLUMN_FORMAT_TYPE_FIXED << FIELD_FLAGS_COLUMN_FORMAT);
+          }
+        | COLUMN_FORMAT_SYM DYNAMIC_SYM
+          {
+            Lex->type&= ~(FIELD_FLAGS_COLUMN_FORMAT_MASK);
+            Lex->type|=
+              (COLUMN_FORMAT_TYPE_DYNAMIC << FIELD_FLAGS_COLUMN_FORMAT);
+          }
+        | STORAGE_SYM DEFAULT
+          {
+            Lex->type&= ~(FIELD_FLAGS_STORAGE_MEDIA_MASK);
+            Lex->type|= (HA_SM_DEFAULT << FIELD_FLAGS_STORAGE_MEDIA);
+          }
+        | STORAGE_SYM DISK_SYM
+          {
+            Lex->type&= ~(FIELD_FLAGS_STORAGE_MEDIA_MASK);
+            Lex->type|= (HA_SM_DISK << FIELD_FLAGS_STORAGE_MEDIA);
+          }
+        | STORAGE_SYM MEMORY_SYM
+          {
+            Lex->type&= ~(FIELD_FLAGS_STORAGE_MEDIA_MASK);
+            Lex->type|= (HA_SM_MEMORY << FIELD_FLAGS_STORAGE_MEDIA);
+          }
         ;
 
 
@@ -13484,6 +13518,7 @@ keyword_sp:
         | CODE_SYM                 {}
         | COLLATION_SYM            {}
         | COLUMN_NAME_SYM          {}
+        | COLUMN_FORMAT_SYM        {}
         | COLUMNS                  {}
         | COMMITTED_SYM            {}
         | COMPACT_SYM              {}

=== modified file 'sql/table.cc'
--- a/sql/table.cc	2012-04-04 10:23:48 +0000
+++ b/sql/table.cc	2012-04-10 12:20:05 +0000
@@ -1582,8 +1582,8 @@ static int open_binary_frm(THD *thd, TAB
         ((field_flags >> COLUMN_FORMAT_SHIFT)& COLUMN_FORMAT_MASK);
       DBUG_PRINT("debug", ("field flags: %u, storage: %u, column_format: %u",
                            field_flags, field_storage, field_column_format));
-      (void)field_storage; /* Reserved by and used in MySQL Cluster */
-      (void)field_column_format; /* Reserved by and used in MySQL Cluster */
+      reg_field->set_storage_type((ha_storage_media)field_storage);
+      reg_field->set_column_format((column_format_type)field_column_format);
     }
   }
   *field_ptr=0;					// End marker

=== modified file 'sql/unireg.cc'
--- a/sql/unireg.cc	2012-03-20 15:09:23 +0000
+++ b/sql/unireg.cc	2012-04-10 12:20:05 +0000
@@ -390,8 +390,8 @@ bool mysql_create_frm(THD *thd, const ch
     List_iterator<Create_field> it(create_fields);
     while ((field=it++))
     {
-      const uchar field_storage= 0; /* Used in MySQL Cluster */
-      const uchar field_column_format= 0; /* Used in MySQL Cluster */
+      const uchar field_storage= field->field_storage_type();
+      const uchar field_column_format= field->column_format();
       const uchar field_flags=
         field_storage + (field_column_format << COLUMN_FORMAT_SHIFT);
       *ptr= field_flags;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (magnus.blaudd:3892 to 3893) WL#5961magnus.blaudd20 Apr