List:Commits« Previous MessageNext Message »
From:marko.makela Date:April 18 2012 1:36pm
Subject:bzr push into mysql-trunk-wl5522 branch (marko.makela:4079 to 4082)
View as plain text  
 4082 Marko Mäkelä	2012-04-18 [merge]
      Merge mysql-trunk to mysql-trunk-wl5522.

    modified:
      README
      client/mysql.cc
      client/mysql_upgrade.c
      client/mysqladmin.cc
      client/mysqlbinlog.cc
      client/mysqlcheck.c
      client/mysqldump.c
      client/mysqlimport.c
      client/mysqlshow.c
      client/mysqlslap.c
      client/mysqltest.cc
      extra/innochecksum.cc
      extra/perror.c
      include/mysql_com.h
      include/welcome_copyright_notice.h
      mysql-test/include/assert_command_output.inc
      mysql-test/r/derived.result
      mysql-test/r/tablespace.result
      mysql-test/suite/binlog/r/binlog_grant.result
      mysql-test/suite/binlog/t/binlog_grant.test
      mysql-test/suite/innodb/r/innodb-index-online.result
      mysql-test/suite/innodb/t/innodb-alter-discard.test
      mysql-test/suite/innodb/t/innodb-index-online.test
      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/suite/rpl/r/rpl_gtid_mode.result
      mysql-test/suite/rpl/t/rpl_gtid_mode.test
      mysql-test/t/derived.test
      mysql-test/t/tablespace.test
      packaging/WiX/custom_ui.wxs
      sql/field.h
      sql/gen_lex_hash.cc
      sql/handler.h
      sql/lex.h
      sql/log_event.cc
      sql/log_event.h
      sql/mysqld.cc
      sql/rpl_mi.cc
      sql/sql_derived.cc
      sql/sql_executor.cc
      sql/sql_optimizer.cc
      sql/sql_optimizer.h
      sql/sql_parse.cc
      sql/sql_select.cc
      sql/sql_show.cc
      sql/sql_table.cc
      sql/sql_yacc.yy
      sql/table.cc
      sql/unireg.cc
      storage/perfschema/gen_pfs_lex_token.cc
 4081 Marko Mäkelä	2012-04-18
      WL#5522: Simplify row_discard_tablespace_for_mysql().

    modified:
      storage/innobase/row/row0mysql.cc
 4080 Marko Mäkelä	2012-04-18
      Remove an unused #define.

    modified:
      storage/innobase/include/univ.i
 4079 Marko Mäkelä	2012-04-18
      Use table_id_t instead of ib_id_t for table_id.

    modified:
      storage/innobase/ibuf/ibuf0ibuf.cc
=== modified file 'README'
--- a/README	revid:marko.makela@stripped
+++ b/README	revid:marko.makela@strippede2pi4l
@@ -5,7 +5,7 @@ For the avoidance of doubt, this particu
 is released under the version 2 of the GNU General Public License. 
 MySQL is brought to you by Oracle.
 
-Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
 
 License information can be found in the COPYING file.
 

=== modified file 'client/mysql.cc'
--- a/client/mysql.cc	revid:marko.makela@stripped1
+++ b/client/mysql.cc	revid:marko.makela@stripped20418133237-a9v45j2oh4e2pi4l
@@ -1297,7 +1297,7 @@ int main(int argc,char *argv[])
 	  mysql_thread_id(&mysql), server_version_string(&mysql));
   put_info((char*) glob_buffer.ptr(),INFO_INFO);
 
-  put_info(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"), INFO_INFO);
+  put_info(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"), INFO_INFO);
 
 #ifdef HAVE_READLINE
   initialize_readline((char*) my_progname);
@@ -1727,7 +1727,7 @@ static void usage(int version)
 
   if (version)
     return;
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"));
   printf("Usage: %s [OPTIONS] [database]\n", my_progname);
   my_print_help(my_long_options);
   print_defaults("my", load_default_groups);

=== modified file 'client/mysql_upgrade.c'
--- a/client/mysql_upgrade.c	revid:marko.makela@stripped104912-2b1dddt5n0nezzp1
+++ b/client/mysql_upgrade.c	revid:marko.makela@stripped
@@ -246,7 +246,7 @@ get_one_option(int optid, const struct m
   case '?':
     printf("%s  Ver %s Distrib %s, for %s (%s)\n",
            my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
-    puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2010"));
+    puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"));
     puts("MySQL utility for upgrading databases to new MySQL versions.\n");
     my_print_help(my_long_options);
     exit(0);

=== modified file 'client/mysqladmin.cc'
--- a/client/mysqladmin.cc	revid:marko.makela@strippeddt5n0nezzp1
+++ b/client/mysqladmin.cc	revid:marko.makela@oracle.com-20120418133237-a9v45j2oh4e2pi4l
@@ -703,7 +703,7 @@ static int execute_commands(MYSQL *mysql
     case ADMIN_VER:
       new_line=1;
       print_version();
-      puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+      puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"));
       printf("Server version\t\t%s\n", mysql_get_server_info(mysql));
       printf("Protocol version\t%d\n", mysql_get_proto_info(mysql));
       printf("Connection\t\t%s\n",mysql_get_host_info(mysql));
@@ -1101,7 +1101,7 @@ static void print_version(void)
 static void usage(void)
 {
   print_version();
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"));
   puts("Administration program for the mysqld daemon.");
   printf("Usage: %s [OPTIONS] command command....\n", my_progname);
   my_print_help(my_long_options);

=== modified file 'client/mysqlbinlog.cc'
--- a/client/mysqlbinlog.cc	revid:marko.makela@strippedm-20120418104912-2b1dddt5n0nezzp1
+++ b/client/mysqlbinlog.cc	revid:marko.makela@strippedoh4e2pi4l
@@ -1475,7 +1475,7 @@ static void print_version()
 static void usage()
 {
   print_version();
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"));
   printf("\
 Dumps a MySQL binary log in a format usable for viewing or for piping to\n\
 the mysql command line client.\n\n");

=== modified file 'client/mysqlcheck.c'
--- a/client/mysqlcheck.c	revid:marko.makela@stripped-2b1dddt5n0nezzp1
+++ b/client/mysqlcheck.c	revid:marko.makela@stripped
@@ -228,7 +228,7 @@ static void print_version(void)
 static void usage(void)
 {
   print_version();
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"));
   puts("This program can be used to CHECK (-c, -m, -C), REPAIR (-r), ANALYZE (-a),");
   puts("or OPTIMIZE (-o) tables. Some of the options (like -e or -q) can be");
   puts("used at the same time. Not all options are supported by all storage engines.");

=== modified file 'client/mysqldump.c'
--- a/client/mysqldump.c	revid:marko.makela@stripped2b1dddt5n0nezzp1
+++ b/client/mysqldump.c	revid:marko.makela@stripped
@@ -612,7 +612,7 @@ static void short_usage_sub(void)
 static void usage(void)
 {
   print_version();
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"));
   puts("Dumping structure and contents of MySQL databases and tables.");
   short_usage_sub();
   print_defaults("my",load_default_groups);

=== modified file 'client/mysqlimport.c'
--- a/client/mysqlimport.c	revid:marko.makela@stripped12-2b1dddt5n0nezzp1
+++ b/client/mysqlimport.c	revid:marko.makela@stripped
@@ -203,7 +203,7 @@ static void print_version(void)
 static void usage(void)
 {
   print_version();
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"));
   printf("\
 Loads tables from text files in various formats.  The base name of the\n\
 text file must be the name of the table that should be used.\n\

=== modified file 'client/mysqlshow.c'
--- a/client/mysqlshow.c	revid:marko.makela@stripped0120418104912-2b1dddt5n0nezzp1
+++ b/client/mysqlshow.c	revid:marko.makela@strippedi4l
@@ -277,7 +277,7 @@ static void print_version(void)
 static void usage(void)
 {
   print_version();
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011)"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012)"));
   puts("Shows the structure of a MySQL database (databases, tables, and columns).\n");
   printf("Usage: %s [OPTIONS] [database [table [column]]]\n",my_progname);
   puts("\n\

=== modified file 'client/mysqlslap.c'
--- a/client/mysqlslap.c	revid:marko.makela@strippedn0nezzp1
+++ b/client/mysqlslap.c	revid:marko.makela@oracle.com-20120418133237-a9v45j2oh4e2pi4l
@@ -708,7 +708,7 @@ static void print_version(void)
 static void usage(void)
 {
   print_version();
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2005, 2010"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2005, 2012"));
   puts("Run a query multiple times against the server.\n");
   printf("Usage: %s [OPTIONS]\n",my_progname);
   print_defaults("my",load_default_groups);

=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc	revid:marko.makela@stripped912-2b1dddt5n0nezzp1
+++ b/client/mysqltest.cc	revid:marko.makela@stripped
@@ -6564,7 +6564,7 @@ void print_version(void)
 void usage()
 {
   print_version();
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"));
   printf("Runs a test against the mysql server and compares output with a results file.\n\n");
   printf("Usage: %s [OPTIONS] [database] < test_file\n", my_progname);
   my_print_help(my_long_options);

=== modified file 'extra/innochecksum.cc'
--- a/extra/innochecksum.cc	revid:marko.makela@strippeddddt5n0nezzp1
+++ b/extra/innochecksum.cc	revid:marko.makela@stripped
@@ -152,7 +152,7 @@ static void print_version(void)
 static void usage(void)
 {
   print_version();
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"));
   printf("InnoDB offline file checksum utility.\n");
   printf("Usage: %s [-c] [-s <start page>] [-e <end page>] [-p <page>] [-v] [-d] <filename>\n", my_progname);
   my_print_help(innochecksum_options);

=== modified file 'extra/perror.c'
--- a/extra/perror.c	revid:marko.makela@strippedddt5n0nezzp1
+++ b/extra/perror.c	revid:marko.makela@oracle.com-20120418133237-a9v45j2oh4e2pi4l
@@ -84,7 +84,7 @@ static void print_version(void)
 static void usage(void)
 {
   print_version();
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"));
   printf("Print a description for a system error code or a MySQL error code.\n");
   printf("If you want to get the error for a negative error code, you should use\n-- before the first error code to tell perror that there was no more options.\n\n");
   printf("Usage: %s [OPTIONS] [ERRORCODE [ERRORCODE...]]\n",my_progname);

=== modified file 'include/mysql_com.h'
--- a/include/mysql_com.h	revid:marko.makela@stripped12-2b1dddt5n0nezzp1
+++ b/include/mysql_com.h	revid:marko.makela@stripped
@@ -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 'include/welcome_copyright_notice.h'
--- a/include/welcome_copyright_notice.h	revid:marko.makela@stripped12-2b1dddt5n0nezzp1
+++ b/include/welcome_copyright_notice.h	revid:marko.makela@strippedh4e2pi4l
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by

=== modified file 'mysql-test/include/assert_command_output.inc'
--- a/mysql-test/include/assert_command_output.inc	revid:marko.makela@stripped
+++ b/mysql-test/include/assert_command_output.inc	revid:marko.makela@stripped
@@ -20,6 +20,7 @@ if ($rpl_debug)
 --let _ASSERT_STATUS= $assert_status
 --let $_assert_suffix= `SELECT UUID()`
 --let _ASSERT_ERROR_FILE= $MYSQLTEST_VARDIR/tmp/_assert_$_assert_suffix.inc
+--let _ASSERT_DEBUG= $rpl_debug
 
 if ($rpl_debug)
 {
@@ -31,6 +32,7 @@ perl;
   my $positive= $ENV{'_ASSERT_NEGATED'} ? 0 : 1;
   my $regex= $ENV{'_ASSERT_REGEX'};
   my $status= $ENV{'_ASSERT_STATUS'};
+  my $debug= $ENV{'_ASSERT_DEBUG'};
   my $output= `$cmd`;
   my $error= 0;
   $status= 0 if $status eq '';
@@ -46,8 +48,6 @@ perl;
     print "ERROR: Command: '$cmd'\n";
     print "ERROR: Output expected to " . ($positive?'':'not '). "match " .
       "perl regex: '$regex'\n";
-    print "======== BEGIN output ========\n$output\n" .
-      "======== END OUTPUT ========\n";
     $error= 1;
   }
   if (!$error)
@@ -57,6 +57,11 @@ perl;
     print FILE "X" or die "Error writing to $file: $!";
     close FILE or die "Error closing $file: $!";
   }
+  if ($error || $debug)
+  {
+    print "======== BEGIN output ========\n$output\n" .
+      "======== END OUTPUT ========\n";
+  }
 EOF
 
 --file_exists $_ASSERT_ERROR_FILE

=== modified file 'mysql-test/r/derived.result'
--- a/mysql-test/r/derived.result	revid:marko.makela@strippedddt5n0nezzp1
+++ b/mysql-test/r/derived.result	revid:marko.makela@stripped
@@ -1962,3 +1962,14 @@ id	select_type	table	type	possible_keys
 1	PRIMARY	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Impossible WHERE noticed after reading const tables
 2	DERIVED	t2	ALL	NULL	NULL	NULL	NULL	1	NULL
 DROP TABLE t1,t2;
+#
+# Bug #13801019 ASSERTION `0' FAILED IN CREATE_MYISAM_TMP_TABLE
+#
+CREATE TABLE t1 (a INT, b BLOB) ENGINE=InnoDB;
+CREATE TABLE t2 (c INT);
+CREATE TABLE t3 (d INT);
+INSERT INTO t3 VALUES (0);
+SELECT * FROM (SELECT * FROM t1) AS a1 RIGHT JOIN t3 LEFT JOIN t2 ON d=c ON a=c;
+a	b	d	c
+NULL	NULL	0	NULL
+DROP TABLE t1, t2, t3;

=== modified file 'mysql-test/r/tablespace.result'
--- a/mysql-test/r/tablespace.result	revid:marko.makela@stripped2-2b1dddt5n0nezzp1
+++ b/mysql-test/r/tablespace.result	revid:marko.makela@strippedi4l
@@ -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/binlog/r/binlog_grant.result'
--- a/mysql-test/suite/binlog/r/binlog_grant.result	revid:marko.makela@stripped2b1dddt5n0nezzp1
+++ b/mysql-test/suite/binlog/r/binlog_grant.result	revid:marko.makela@strippeda9v45j2oh4e2pi4l
@@ -22,3 +22,7 @@ ERROR 42000: Access denied; you need (at
 **** Clean up ****
 set global binlog_format = @saved_binlog_format;
 drop user mysqltest_1@localhost;
+GRANT REPLICATION CLIENT ON *.* TO 'mysqltest_1'@'localhost';
+SHOW MASTER LOGS;
+SHOW BINARY LOGS;
+DROP USER 'mysqltest_1'@'localhost';

=== modified file 'mysql-test/suite/binlog/t/binlog_grant.test'
--- a/mysql-test/suite/binlog/t/binlog_grant.test	revid:marko.makela@oracle.com-20120418104912-2b1dddt5n0nezzp1
+++ b/mysql-test/suite/binlog/t/binlog_grant.test	revid:marko.makela@oracle.com-20120418133237-a9v45j2oh4e2pi4l
@@ -54,3 +54,22 @@ disconnect root;
 connection default;
 set global binlog_format = @saved_binlog_format;
 drop user mysqltest_1@localhost;
+
+
+# Testing if REPLICATION CLIENT privilege is enough to execute
+# SHOW MASTER LOGS and SHOW BINARY.
+GRANT REPLICATION CLIENT ON *.* TO 'mysqltest_1'@'localhost';
+--connect(rpl,localhost,mysqltest_1,,)
+
+--connection rpl
+# We are only interested if the following commands succeed and not on
+# their output.
+--disable_result_log
+SHOW MASTER LOGS;
+SHOW BINARY LOGS;
+--enable_result_log
+
+# clean up
+--disconnect rpl
+connection default;
+DROP USER 'mysqltest_1'@'localhost';

=== modified file 'mysql-test/suite/innodb/r/innodb-index-online.result'
--- a/mysql-test/suite/innodb/r/innodb-index-online.result	revid:marko.makela@strippednezzp1
+++ b/mysql-test/suite/innodb/r/innodb-index-online.result	revid:marko.makela@stripped45j2oh4e2pi4l
@@ -266,10 +266,6 @@ ALTER TABLE t1 DROP INDEX c2f, ADD INDEX
 SET DEBUG_SYNC='now WAIT_FOR c2g_created';
 SET lock_wait_timeout=10;
 ALTER TABLE t1 DISCARD TABLESPACE;
-SELECT state FROM information_schema.processlist
-WHERE info='ALTER TABLE t1 DISCARD TABLESPACE';
-state
-Waiting for table level lock
 SET DEBUG_SYNC='now SIGNAL dml4_done';
 ERROR HY000: Lock wait timeout exceeded; try restarting transaction
 SHOW CREATE TABLE t1;

=== modified file 'mysql-test/suite/innodb/t/innodb-alter-discard.test'
--- a/mysql-test/suite/innodb/t/innodb-alter-discard.test	revid:marko.makela@stripped2b1dddt5n0nezzp1
+++ b/mysql-test/suite/innodb/t/innodb-alter-discard.test	revid:marko.makela@stripped33237-a9v45j2oh4e2pi4l
@@ -1,5 +1,6 @@
 #Bug#13955083 ALLOW IN-PLACE DDL OPERATIONS ON MISSING OR DISCARDED TABLESPACES
 
+--source include/not_embedded.inc
 --source include/have_innodb.inc
 
 let $MYSQLD_DATADIR=`select @@datadir`;

=== modified file 'mysql-test/suite/innodb/t/innodb-index-online.test'
--- a/mysql-test/suite/innodb/t/innodb-index-online.test	revid:marko.makela@stripped18104912-2b1dddt5n0nezzp1
+++ b/mysql-test/suite/innodb/t/innodb-index-online.test	revid:marko.makela@stripped0120418133237-a9v45j2oh4e2pi4l
@@ -282,18 +282,20 @@ SET lock_wait_timeout=10;
 ALTER TABLE t1 DISCARD TABLESPACE;
 
 connection con1;
-SELECT state FROM information_schema.processlist
-WHERE info='ALTER TABLE t1 DISCARD TABLESPACE';
+let $wait_condition=
+  SELECT COUNT(*) = 1 FROM information_schema.processlist
+  WHERE state = 'Waiting for table level lock' and
+        info = 'ALTER TABLE t1 DISCARD TABLESPACE';
+--source include/wait_condition.inc
 
 SET DEBUG_SYNC='now SIGNAL dml4_done';
 disconnect con1;
-connection default;
---error ER_LOCK_WAIT_TIMEOUT
-reap;
 connection con2;
 reap;
 disconnect con2;
 connection default;
+--error ER_LOCK_WAIT_TIMEOUT
+reap;
 
 SHOW CREATE TABLE t1;
 ALTER TABLE t1 DROP INDEX c2d, DROP INDEX c2f;

=== modified file 'mysql-test/suite/perfschema/r/digest_table_full.result'
--- a/mysql-test/suite/perfschema/r/digest_table_full.result	revid:marko.makela@oracle.com-20120418104912-2b1dddt5n0nezzp1
+++ b/mysql-test/suite/perfschema/r/digest_table_full.result	revid:marko.makela@stripped
@@ -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	revid:marko.makela@strippedddt5n0nezzp1
+++ b/mysql-test/suite/perfschema/r/statement_digest.result	revid:marko.makela@stripped237-a9v45j2oh4e2pi4l
@@ -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	revid:marko.makela@stripped1dddt5n0nezzp1
+++ b/mysql-test/suite/perfschema/r/statement_digest_consumers.result	revid:marko.makela@stripped-20120418133237-a9v45j2oh4e2pi4l
@@ -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	revid:marko.makela@stripped18104912-2b1dddt5n0nezzp1
+++ b/mysql-test/suite/perfschema/r/statement_digest_long_query.result	revid:marko.makela@stripped
@@ -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/suite/rpl/r/rpl_gtid_mode.result'
--- a/mysql-test/suite/rpl/r/rpl_gtid_mode.result	revid:marko.makela@stripped
+++ b/mysql-test/suite/rpl/r/rpl_gtid_mode.result	revid:marko.makela@stripped
@@ -3,6 +3,9 @@ include/master-slave.inc
 call mtr.add_suppression("Slave I/O: The slave IO thread stops because the master has GTID_MODE");
 call mtr.add_suppression("Error reading packet from server: Lost connection to MySQL");
 call mtr.add_suppression("Aborting");
+call mtr.add_suppression(".* CHANGE MASTER TO MASTER_AUTO_POSITION = 1 can only be executed when GTID_MODE = ON.");
+call mtr.add_suppression(".* Found a Gtid_log_event or Previous_gtids_log_event when GTID_MODE = OFF.");
+call mtr.add_suppression(".* Failed to initialize the master info structure");
 include/stop_slave.inc
 ==== Master and slave have GTID_MODE = OFF ====
 ---- Default value for GTID_MODE ----
@@ -93,9 +96,11 @@ INSERT INTO t1 VALUES (3);
 include/stop_slave.inc
 ==== Checks performed at server start when GTID_MODE = OFF ====
 include/rpl_stop_server.inc [server_number=2]
----- Fail to start with GTID_MODE = OFF and GTIDs in binlog/relay log ----
-include/assert_command_output.inc
-include/rpl_start_server.inc [server_number=2 gtids=on]
+---- Fail to start replication with GTID_MODE = OFF and GTIDs in binlog/relay log ----
+include/rpl_start_server.inc [server_number=2]
+START SLAVE;
+ERROR HY000: CHANGE MASTER TO MASTER_AUTO_POSITION = 1 can only be executed when GTID_MODE = ON.
+include/rpl_restart_server.inc [server_number=2 gtids=on]
 RESET SLAVE;
 RESET MASTER;
 ==== Master has GTID_MODE = ON, slave has GTID_MODE = OFF ====

=== modified file 'mysql-test/suite/rpl/t/rpl_gtid_mode.test'
--- a/mysql-test/suite/rpl/t/rpl_gtid_mode.test	revid:marko.makela@stripped
+++ b/mysql-test/suite/rpl/t/rpl_gtid_mode.test	revid:marko.makela@stripped
@@ -55,6 +55,9 @@
 call mtr.add_suppression("Slave I/O: The slave IO thread stops because the master has GTID_MODE");
 call mtr.add_suppression("Error reading packet from server: Lost connection to MySQL");
 call mtr.add_suppression("Aborting");
+call mtr.add_suppression(".* CHANGE MASTER TO MASTER_AUTO_POSITION = 1 can only be executed when GTID_MODE = ON.");
+call mtr.add_suppression(".* Found a Gtid_log_event or Previous_gtids_log_event when GTID_MODE = OFF.");
+call mtr.add_suppression(".* Failed to initialize the master info structure");
 
 --sync_slave_with_master
 --source include/stop_slave.inc
@@ -268,23 +271,18 @@ INSERT INTO t1 VALUES (3);
 
 --echo ==== Checks performed at server start when GTID_MODE = OFF ====
 
---connection master
 --let $rpl_server_number= 2
 --source include/rpl_stop_server.inc
-
---echo ---- Fail to start with GTID_MODE = OFF and GTIDs in binlog/relay log ----
-
---let $assert_regex= Found a Gtid_log_event or Previous_gtids_log_event when GTID_MODE = OFF.
---let $assert_command= $server2_cmd 2>&1
---source include/assert_command_output.inc
---error 0,1
---remove_file $datadir/master.info
---error 0,1
---remove_file $datadir/relay.info
-
+--echo ---- Fail to start replication with GTID_MODE = OFF and GTIDs in binlog/relay log ----
 --let $rpl_server_number= 2
---let $rpl_skip_start_slave= 1
+--let $rpl_start_with_gtids= 0
 --source include/rpl_start_server.inc
+--error ER_AUTO_POSITION_REQUIRES_GTID_MODE_ON
+START SLAVE;
+--let $rpl_server_number= 2
+--let $rpl_skip_start_slave= 1
+--let $rpl_start_with_gtids= 1
+--source include/rpl_restart_server.inc
 --connection slave
 RESET SLAVE;
 RESET MASTER;

=== modified file 'mysql-test/t/derived.test'
--- a/mysql-test/t/derived.test	revid:marko.makela@stripped0120418104912-2b1dddt5n0nezzp1
+++ b/mysql-test/t/derived.test	revid:marko.makela@stripped2oh4e2pi4l
@@ -1317,4 +1317,15 @@ SELECT pk FROM ( SELECT col_blob, pk FRO
 EXPLAIN SELECT pk FROM ( SELECT col_blob, pk FROM t2 ) AS A NATURAL JOIN t1;
 DROP TABLE t1,t2;
 
+--echo #
+--echo # Bug #13801019 ASSERTION `0' FAILED IN CREATE_MYISAM_TMP_TABLE
+--echo #
 
+CREATE TABLE t1 (a INT, b BLOB) ENGINE=InnoDB;
+CREATE TABLE t2 (c INT);
+CREATE TABLE t3 (d INT);
+INSERT INTO t3 VALUES (0);
+
+SELECT * FROM (SELECT * FROM t1) AS a1 RIGHT JOIN t3 LEFT JOIN t2 ON d=c ON a=c;
+
+DROP TABLE t1, t2, t3;

=== modified file 'mysql-test/t/tablespace.test'
--- a/mysql-test/t/tablespace.test	revid:marko.makela@stripped18104912-2b1dddt5n0nezzp1
+++ b/mysql-test/t/tablespace.test	revid:marko.makela@strippedh4e2pi4l
@@ -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 'packaging/WiX/custom_ui.wxs'
--- a/packaging/WiX/custom_ui.wxs	revid:marko.makela@strippedzp1
+++ b/packaging/WiX/custom_ui.wxs	revid:marko.makela@oracle.com-20120418133237-a9v45j2oh4e2pi4l
@@ -2,7 +2,7 @@
          xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
 
 <!--
-   Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+   Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
       <Control Id="Back" Type="PushButton" X="156" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" Disabled="yes" />
       <Control Id="Description" Type="Text" X="135" Y="80" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.WelcomeDlgDescription)" />
       <Control Id="Title" Type="Text" X="135" Y="20" Width="220" Height="60" Transparent="yes" NoPrefix="yes" Text="!(loc.WelcomeDlgTitle)" />
-      <Control Id="CopyrightText" Type="Text" X="135" Y="200" Width="220" Height="40" Transparent="yes" Text="Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved." />
+      <Control Id="CopyrightText" Type="Text" X="135" Y="200" Width="220" Height="40" Transparent="yes" Text="Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved." />
       <Control Id="Bitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="234" TabSkip="no" Text="!(loc.WelcomeDlgBitmap)" />
       <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
     </Dialog>

=== modified file 'sql/field.h'
--- a/sql/field.h	revid:marko.makela@oracle.com-20120418104912-2b1dddt5n0nezzp1
+++ b/sql/field.h	revid:marko.makela@strippedl
@@ -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/gen_lex_hash.cc'
--- a/sql/gen_lex_hash.cc	revid:marko.makela@strippeddt5n0nezzp1
+++ b/sql/gen_lex_hash.cc	revid:marko.makela@oracle.com-20120418133237-a9v45j2oh4e2pi4l
@@ -377,7 +377,7 @@ int main(int argc,char **argv)
   printf("/*\n\n  Do " "not " "edit " "this " "file " "directly!\n\n*/\n");
 
   puts("/*");
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"));
   puts("*/");
 
   /* Broken up to indicate that it's not advice to you, gentle reader. */

=== modified file 'sql/handler.h'
--- a/sql/handler.h	revid:marko.makela@stripped
+++ b/sql/handler.h	revid:marko.makela@stripped237-a9v45j2oh4e2pi4l
@@ -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	revid:marko.makela@stripped
+++ b/sql/lex.h	revid:marko.makela@stripped7-a9v45j2oh4e2pi4l
@@ -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/log_event.cc'
--- a/sql/log_event.cc	revid:marko.makela@strippedezzp1
+++ b/sql/log_event.cc	revid:marko.makela@strippedm-20120418133237-a9v45j2oh4e2pi4l
@@ -5067,6 +5067,9 @@ Format_description_log_event(uint8 binlo
       post_header_len[HEARTBEAT_LOG_EVENT-1]= 0;
       post_header_len[IGNORABLE_LOG_EVENT-1]= IGNORABLE_HEADER_LEN;
       post_header_len[ROWS_QUERY_LOG_EVENT-1]= IGNORABLE_HEADER_LEN;
+      post_header_len[RESERVED_EVENT_NUM_1-1]= RESERVED_HEADER_LEN;
+      post_header_len[RESERVED_EVENT_NUM_2-1]= RESERVED_HEADER_LEN;
+      post_header_len[RESERVED_EVENT_NUM_3-1]= RESERVED_HEADER_LEN;
       post_header_len[GTID_LOG_EVENT-1]=
         post_header_len[ANONYMOUS_GTID_LOG_EVENT-1]=
         Gtid_log_event::POST_HEADER_LENGTH;

=== modified file 'sql/log_event.h'
--- a/sql/log_event.h	revid:marko.makela@strippeddddt5n0nezzp1
+++ b/sql/log_event.h	revid:marko.makela@oracle.com-20120418133237-a9v45j2oh4e2pi4l
@@ -269,6 +269,7 @@ struct sql_ex_info
 #define INCIDENT_HEADER_LEN    2
 #define HEARTBEAT_HEADER_LEN   0
 #define IGNORABLE_HEADER_LEN   0
+#define RESERVED_HEADER_LEN    0
 
 /*
    The maximum number of updated databases that a status of
@@ -691,10 +692,15 @@ enum Log_event_type
   IGNORABLE_LOG_EVENT= 28,
   ROWS_QUERY_LOG_EVENT= 29,
 
-  GTID_LOG_EVENT= 30,
-  ANONYMOUS_GTID_LOG_EVENT= 31,
+  /* Following event numbers reserved for WL#5917 */
+  RESERVED_EVENT_NUM_1 = 30,
+  RESERVED_EVENT_NUM_2 = 31,
+  RESERVED_EVENT_NUM_3 = 32,
 
-  PREVIOUS_GTIDS_LOG_EVENT= 32,
+  GTID_LOG_EVENT= 33,
+  ANONYMOUS_GTID_LOG_EVENT= 34,
+
+  PREVIOUS_GTIDS_LOG_EVENT= 35,
   /*
     Add new events here - right above this comment!
     Existing events (except ENUM_END_EVENT) should never change their numbers

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	revid:marko.makela@stripped
+++ b/sql/mysqld.cc	revid:marko.makela@stripped237-a9v45j2oh4e2pi4l
@@ -5210,9 +5210,7 @@ int mysqld_main(int argc, char **argv)
     init_slave() must be called after the thread keys are created.
   */
   if (server_id != 0 && init_slave() && active_mi == NULL)
-  {
     unireg_abort(1);
-  }
 
 #ifdef WITH_PERFSCHEMA_STORAGE_ENGINE
   initialize_performance_schema_acl(opt_bootstrap);
@@ -7524,7 +7522,7 @@ static void usage(void)
   if (!default_collation_name)
     default_collation_name= (char*) default_charset_info->name;
   print_version();
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2012"));
   puts("Starts the MySQL database server.\n");
   printf("Usage: %s [OPTIONS]\n", my_progname);
   if (!opt_verbose)

=== modified file 'sql/rpl_mi.cc'
--- a/sql/rpl_mi.cc	revid:marko.makela@stripped
+++ b/sql/rpl_mi.cc	revid:marko.makela@stripped3237-a9v45j2oh4e2pi4l
@@ -478,7 +478,7 @@ bool Master_info::read_info(Rpl_info_han
 
   if (auto_position != 0 && gtid_mode != 3)
   {
-    sql_print_error("%s", ER(ER_AUTO_POSITION_REQUIRES_GTID_MODE_ON));
+    my_error(ER_AUTO_POSITION_REQUIRES_GTID_MODE_ON, MYF(0));
     DBUG_RETURN(true);
   }
 

=== modified file 'sql/sql_derived.cc'
--- a/sql/sql_derived.cc	revid:marko.makela@stripped20418104912-2b1dddt5n0nezzp1
+++ b/sql/sql_derived.cc	revid:marko.makela@strippedl
@@ -338,9 +338,21 @@ bool mysql_derived_create(THD *thd, LEX
    *) Some commands, like show table status, doesn't prepare views/derived
       tables => no need to create result table also.
    *) Table is already created.
+   *) Table is a constant one with all NULL values.
   */
-  if (!derived->uses_materialization() || !table || table->created)
+  if (!derived->uses_materialization() || !table || table->created ||
+      (derived->select_lex->join != NULL &&
+       (derived->select_lex->join->const_table_map & table->map)))
+  {
+    /*
+      At this point, JT_CONST derived tables should be null rows. Otherwise they
+      would have been materialized already.
+    */
+    DBUG_ASSERT(table == NULL || table->reginfo.join_tab == NULL ||
+                table->reginfo.join_tab->type != JT_CONST ||
+                table->null_row == 1);
     DBUG_RETURN(FALSE);
+  }
   /* create tmp table */
   select_union *result= (select_union*)unit->get_result();
 

=== modified file 'sql/sql_executor.cc'
--- a/sql/sql_executor.cc	revid:marko.makela@stripped912-2b1dddt5n0nezzp1
+++ b/sql/sql_executor.cc	revid:marko.makela@stripped
@@ -3145,6 +3145,18 @@ int join_init_read_record(JOIN_TAB *tab)
   if (init_read_record(&tab->read_record, tab->join->thd, tab->table,
                        tab->select, 1, 1, FALSE))
     return 1;
+  /*
+    set keyread to TRUE if quick index is covering.
+    @todo: Call set_keyread only from access functions. Currently this is
+    also done in make_join_readinfo.
+  */
+  if (tab->select && tab->select->quick)
+  {
+    TABLE *table= tab->table;
+    if(!table->no_keyread && tab->select->quick->index != MAX_KEY //not index merge
+       && table->covering_keys.is_set(tab->select->quick->index))
+      table->set_keyread(true);
+  }
   return (*tab->read_record.read_record)(&tab->read_record);
 }
 

=== modified file 'sql/sql_optimizer.cc'
--- a/sql/sql_optimizer.cc	revid:marko.makela@oracle.com-20120418104912-2b1dddt5n0nezzp1
+++ b/sql/sql_optimizer.cc	revid:marko.makela@strippeda9v45j2oh4e2pi4l
@@ -6801,7 +6801,7 @@ bool JOIN::generate_derived_keys()
 
 void JOIN::drop_unused_derived_keys()
 {
-  for (uint i= const_tables ; i < tables ; i++)
+  for (uint i= 0 ; i < tables ; i++)
   {
     JOIN_TAB *tab= join_tab + i;
     TABLE *table= tab->table;

=== modified file 'sql/sql_optimizer.h'
--- a/sql/sql_optimizer.h	revid:marko.makela@strippedzzp1
+++ b/sql/sql_optimizer.h	revid:marko.makela@oracle.com-20120418133237-a9v45j2oh4e2pi4l
@@ -409,6 +409,7 @@ public:
     all_tables= 0;
     tables= 0;
     const_tables= 0;
+    const_table_map= 0;
     join_list= 0;
     implicit_grouping= FALSE;
     sort_and_group= 0;

=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc	revid:marko.makela@stripped1
+++ b/sql/sql_parse.cc	revid:marko.makela@stripped120418133237-a9v45j2oh4e2pi4l
@@ -3042,7 +3042,7 @@ end_with_restore_list:
     goto error;
 #else
     {
-      if (check_global_access(thd, SUPER_ACL))
+      if (check_global_access(thd, SUPER_ACL | REPL_CLIENT_ACL))
 	goto error;
       res = show_binlogs(thd);
       break;

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	revid:marko.makela@strippedezzp1
+++ b/sql/sql_select.cc	revid:marko.makela@strippedom-20120418133237-a9v45j2oh4e2pi4l
@@ -3974,17 +3974,12 @@ check_reverse_order:
       bool quick_created= 
         (select && select->quick && select->quick!=save_quick);
 
-      /* 
-         If 'best_key' has changed from  prev. 'ref_key':
-         Update strategy for using index tree reading only
-         ('Using index' in EXPLAIN)
+      /*
+        If ref_key used index tree reading only ('Using index' in EXPLAIN),
+        and best_key doesn't, then revert the decision.
       */
-      if (best_key != ref_key)
-      {
-        const bool using_index= 
-          (table->covering_keys.is_set(best_key) && !table->no_keyread);
-        table->set_keyread(using_index);
-      }
+      if(!table->covering_keys.is_set(best_key))
+        table->set_keyread(false);
       if (!quick_created)
       {
         if (select)                  // Throw any existing quick select

=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc	revid:marko.makela@oracle.com-20120418104912-2b1dddt5n0nezzp1
+++ b/sql/sql_show.cc	revid:marko.makela@stripped5j2oh4e2pi4l
@@ -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	revid:marko.makela@stripped
+++ b/sql/sql_table.cc	revid:marko.makela@stripped418133237-a9v45j2oh4e2pi4l
@@ -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	revid:marko.makela@stripped418104912-2b1dddt5n0nezzp1
+++ b/sql/sql_yacc.yy	revid:marko.makela@stripped
@@ -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	revid:marko.makela@strippednezzp1
+++ b/sql/table.cc	revid:marko.makela@stripped0120418133237-a9v45j2oh4e2pi4l
@@ -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	revid:marko.makela@oracle.com-20120418104912-2b1dddt5n0nezzp1
+++ b/sql/unireg.cc	revid:marko.makela@strippedh4e2pi4l
@@ -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;

=== modified file 'storage/innobase/include/univ.i'
--- a/storage/innobase/include/univ.i	revid:marko.makela@strippedb1dddt5n0nezzp1
+++ b/storage/innobase/include/univ.i	revid:marko.makela@strippedl
@@ -478,8 +478,6 @@ typedef ib_uint64_t	ib_id_t;
 /** The 'undefined' value for a ullint */
 #define ULLINT_UNDEFINED        ((ullint)(-1))
 
-#define IB_ID_UNDEFINED         IB_UINT64_MAX
-
 /** This 'ibool' type is used within Innobase. Remember that different included
 headers may define 'bool' differently. Do not assume that 'bool' is a ulint! */
 #define ibool			ulint

=== modified file 'storage/innobase/row/row0mysql.cc'
--- a/storage/innobase/row/row0mysql.cc	revid:marko.makela@stripped4912-2b1dddt5n0nezzp1
+++ b/storage/innobase/row/row0mysql.cc	revid:marko.makela@strippedoh4e2pi4l
@@ -2912,19 +2912,17 @@ row_discard_tablespace_for_mysql(
 	table = row_discard_tablespace_begin(name, trx);
 
 	if (table == 0) {
-		return(row_discard_tablespace_end(trx, 0, DB_TABLE_NOT_FOUND));
+		err = DB_TABLE_NOT_FOUND;
+	} else {
+		/* Do foreign key constraint checks. */
+
+		err = row_discard_tablespace_foreign_key_checks(trx, table);
+
+		if (err == DB_SUCCESS) {
+			err = row_discard_tablespace(trx, table);
+		}
 	}
 
-	/* Do foreign key constraint checks. */
-
-	err = row_discard_tablespace_foreign_key_checks(trx, table);
-
-	if (err != DB_SUCCESS) {
-		return(row_discard_tablespace_end(trx, table, err));
-	}
-
-	err = row_discard_tablespace(trx, table);
-
 	return(row_discard_tablespace_end(trx, table, err));
 }
 

=== modified file 'storage/perfschema/gen_pfs_lex_token.cc'
--- a/storage/perfschema/gen_pfs_lex_token.cc	revid:marko.makela@strippedzzp1
+++ b/storage/perfschema/gen_pfs_lex_token.cc	revid:marko.makela@stripped
@@ -243,7 +243,7 @@ void print_tokens()
 int main(int argc,char **argv)
 {
   puts("/*");
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2011"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2011, 2012"));
   puts("*/");
 
   printf("/*\n");

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-wl5522 branch (marko.makela:4079 to 4082) marko.makela20 Apr