List:Commits« Previous MessageNext Message »
From:Marc Alff Date:November 16 2010 5:45am
Subject:bzr commit into mysql-5.5-bugteam branch (marc.alff:3121)
View as plain text  
#At file:///Users/malff/BZR_TREE/mysql-5.5-bugteam-58052/ based on revid:marc.alff@stripped

 3121 Marc Alff	2010-11-16 [merge]
      Local merge

    added:
      mysql-test/t/wl4435_generated.inc
    modified:
      CMakeLists.txt
      cmake/configure.pl
      cmake/install_macros.cmake
      cmake/libutils.cmake
      cmake/mysql_add_executable.cmake
      cmake/mysql_version.cmake
      cmake/plugin.cmake
      libmysql/CMakeLists.txt
      libservices/CMakeLists.txt
      man/CMakeLists.txt
      mysql-test/CMakeLists.txt
      mysql-test/collections/default.weekly
      mysql-test/r/information_schema-big.result
      mysql-test/r/not_embedded_server.result
      mysql-test/r/partition.result
      mysql-test/r/ps.result
      mysql-test/r/variables-big.result
      mysql-test/suite/parts/inc/partition_auto_increment.inc
      mysql-test/suite/parts/r/partition_auto_increment_blackhole.result
      mysql-test/suite/parts/r/partition_auto_increment_innodb.result
      mysql-test/suite/parts/r/partition_auto_increment_memory.result
      mysql-test/suite/parts/r/partition_auto_increment_myisam.result
      mysql-test/t/disabled.def
      mysql-test/t/not_embedded_server.test
      mysql-test/t/partition.test
      mysql-test/t/ps.test
      mysql-test/t/variables-big.test
      packaging/WiX/create_msi.cmake.in
      scripts/CMakeLists.txt
      sql-bench/CMakeLists.txt
      sql/CMakeLists.txt
      sql/ha_partition.cc
      sql/handler.h
      sql/item.cc
      sql/sp_rcontext.h
      sql/sql_class.cc
      sql/sql_insert.cc
      sql/sql_prepare.cc
      sql/sql_update.cc
      support-files/CMakeLists.txt
      support-files/mysql.spec.sh
      tests/mysql_client_test.c
      win/README
=== modified file 'CMakeLists.txt'
--- a/CMakeLists.txt	2010-11-05 13:33:59 +0000
+++ b/CMakeLists.txt	2010-11-13 22:16:52 +0000
@@ -331,23 +331,33 @@ ELSE()
   SET(CPACK_GENERATOR "TGZ")
 ENDIF() 
 ADD_SUBDIRECTORY(packaging/WiX)
+
+# Create a single package with "make package"
+# (see http://public.kitware.com/Bug/view.php?id=11452)
+SET(CPACK_MONOLITHIC_INSTALL 1 CACHE INTERNAL "")
+
 INCLUDE(CPack)
 IF(UNIX)
-  INSTALL(FILES Docs/mysql.info DESTINATION ${INSTALL_INFODIR} OPTIONAL)
+  INSTALL(FILES Docs/mysql.info DESTINATION ${INSTALL_INFODIR} OPTIONAL COMPONENT Info)
 ENDIF()
 #
 # RPM installs documentation directly from the source tree
 #
 IF(NOT INSTALL_LAYOUT MATCHES "RPM")
-  INSTALL(FILES COPYING EXCEPTIONS-CLIENT LICENSE.mysql DESTINATION ${INSTALL_DOCREADMEDIR} OPTIONAL)
-  INSTALL(FILES README DESTINATION ${INSTALL_DOCREADMEDIR})
+  INSTALL(FILES COPYING EXCEPTIONS-CLIENT LICENSE.mysql 
+  DESTINATION ${INSTALL_DOCREADMEDIR} 
+  COMPONENT Readme
+  OPTIONAL
+  )
+  INSTALL(FILES README DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Readme)
   IF(UNIX)
-    INSTALL(FILES Docs/INSTALL-BINARY DESTINATION ${INSTALL_DOCREADMEDIR})
+    INSTALL(FILES Docs/INSTALL-BINARY DESTINATION ${INSTALL_DOCREADMEDIR} COMPONENT Readme)
   ENDIF()
   # MYSQL_DOCS_LOCATON is used in "make dist", points to the documentation directory
   SET(MYSQL_DOCS_LOCATION "" CACHE PATH "Location from where documentation is copied")
   MARK_AS_ADVANCED(MYSQL_DOCS_LOCATION)
   INSTALL(DIRECTORY Docs/ DESTINATION ${INSTALL_DOCDIR}
+    COMPONENT Documentation
     PATTERN "INSTALL-BINARY" EXCLUDE
     PATTERN "Makefile.*" EXCLUDE
     PATTERN "glibc*" EXCLUDE

=== modified file 'cmake/configure.pl'
--- a/cmake/configure.pl	2010-08-06 12:59:38 +0000
+++ b/cmake/configure.pl	2010-11-12 01:33:19 +0000
@@ -185,6 +185,11 @@ foreach my $option (@ARGV)
                  ($option =~ /enable/ ? "1" : "0");
     next;
   }
+  if ($option =~ /with-comment=/)
+  {
+    $cmakeargs = $cmakeargs." \"-DWITH_COMMENT=".substr($option,13)."\""; 
+    next;
+  }
 
   $option = uc($option);
   $option =~ s/-/_/g;

=== modified file 'cmake/install_macros.cmake'
--- a/cmake/install_macros.cmake	2010-09-29 09:42:35 +0000
+++ b/cmake/install_macros.cmake	2010-11-13 22:16:52 +0000
@@ -78,7 +78,9 @@ FUNCTION(INSTALL_MANPAGE file)
     ELSE()
       SET(SECTION man8)
     ENDIF()
-    INSTALL(FILES "${MANPAGE}" DESTINATION "${INSTALL_MANDIR}/${SECTION}")
+    MESSAGE("huj!")
+    INSTALL(FILES "${MANPAGE}" DESTINATION "${INSTALL_MANDIR}/${SECTION}"
+      COMPONENT ManPages)
   ENDIF()
 ENDFUNCTION()
 
@@ -137,12 +139,7 @@ IF(UNIX)
     STRING(REPLACE "${CMAKE_CFG_INTDIR}" 
       "\${CMAKE_INSTALL_CONFIG_NAME}" output ${output})
   ENDIF()
-  IF(component)
-    SET(COMP COMPONENT ${component})
-  ELSE()  
-    SET(COMP)
-  ENDIF()
-  INSTALL(FILES ${output} DESTINATION ${destination} ${COMP})
+  INSTALL(FILES ${output} DESTINATION ${destination} COMPONENT ${component})
 ENDIF()
 ENDMACRO()
 
@@ -224,8 +221,6 @@ FUNCTION(MYSQL_INSTALL_TARGETS)
      IF(SIGNCODE AND SIGNCODE_ENABLED)
       SIGN_TARGET(${target})
     ENDIF()
-    # For Windows, add version info to executables
-    ADD_VERSION_INFO(${target})
     # Install man pages on Unix
     IF(UNIX)
       GET_TARGET_PROPERTY(target_location ${target} LOCATION)

=== modified file 'cmake/libutils.cmake'
--- a/cmake/libutils.cmake	2010-09-29 09:42:35 +0000
+++ b/cmake/libutils.cmake	2010-11-12 12:42:50 +0000
@@ -250,6 +250,9 @@ MACRO(MERGE_LIBRARIES)
       ENDFOREACH()
     ENDIF()
     CREATE_EXPORT_FILE(SRC ${TARGET} "${ARG_EXPORTS}")
+    IF(NOT ARG_NOINSTALL)
+      ADD_VERSION_INFO(${TARGET} SHARED SRC)
+    ENDIF()
     ADD_LIBRARY(${TARGET} ${LIBTYPE} ${SRC})
     TARGET_LINK_LIBRARIES(${TARGET} ${LIBS})
     IF(ARG_OUTPUT_NAME)

=== modified file 'cmake/mysql_add_executable.cmake'
--- a/cmake/mysql_add_executable.cmake	2010-09-29 09:42:35 +0000
+++ b/cmake/mysql_add_executable.cmake	2010-11-12 12:42:50 +0000
@@ -37,7 +37,7 @@ FUNCTION (MYSQL_ADD_EXECUTABLE)
   LIST(REMOVE_AT  ARG_DEFAULT_ARGS 0)
   
   SET(sources ${ARG_DEFAULT_ARGS})
-  
+  ADD_VERSION_INFO(${target} EXECUTABLE sources)
   ADD_EXECUTABLE(${target} ${ARG_WIN32} ${ARG_MACOSX_BUNDLE} ${ARG_EXCLUDE_FROM_ALL} ${sources})
   # tell CPack where to install
   IF(NOT ARG_EXCLUDE_FROM_ALL)

=== modified file 'cmake/mysql_version.cmake'
--- a/cmake/mysql_version.cmake	2010-11-02 18:52:56 +0000
+++ b/cmake/mysql_version.cmake	2010-11-12 12:42:50 +0000
@@ -133,9 +133,8 @@ ENDIF()
 # Refer to http://msdn.microsoft.com/en-us/library/aa381058(VS.85).aspx
 # for more info.
 IF(MSVC)
-  GET_TARGET_PROPERTY(location gen_versioninfo LOCATION)
-  IF(NOT location)
     GET_FILENAME_COMPONENT(MYSQL_CMAKE_SCRIPT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
+	
     SET(FILETYPE VFT_APP)
     CONFIGURE_FILE(${MYSQL_CMAKE_SCRIPT_DIR}/versioninfo.rc.in 
     ${CMAKE_BINARY_DIR}/versioninfo_exe.rc)
@@ -143,31 +142,14 @@ IF(MSVC)
     SET(FILETYPE VFT_DLL)
     CONFIGURE_FILE(${MYSQL_CMAKE_SCRIPT_DIR}/versioninfo.rc.in  
       ${CMAKE_BINARY_DIR}/versioninfo_dll.rc)
-
-    ADD_CUSTOM_COMMAND(
-      OUTPUT ${CMAKE_BINARY_DIR}/versioninfo_exe.res 
-       ${CMAKE_BINARY_DIR}/versioninfo_dll.res
-    COMMAND ${CMAKE_RC_COMPILER} versioninfo_exe.rc
-    COMMAND ${CMAKE_RC_COMPILER} versioninfo_dll.rc
-    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
-   )
-   ADD_CUSTOM_TARGET(gen_versioninfo
-      DEPENDS 
-     ${CMAKE_BINARY_DIR}/versioninfo_exe.res 
-     ${CMAKE_BINARY_DIR}/versioninfo_dll.res
-   )
-  ENDIF()
-  
-  FUNCTION(ADD_VERSION_INFO target)
-    GET_TARGET_PROPERTY(target_type ${target} TYPE)
-    ADD_DEPENDENCIES(${target} gen_versioninfo)
-    IF(target_type MATCHES "SHARED" OR target_type MATCHES "MODULE")
-       SET_PROPERTY(TARGET ${target} APPEND PROPERTY LINK_FLAGS 
-        "\"${CMAKE_BINARY_DIR}/versioninfo_dll.res\"")
-    ELSEIF(target_type MATCHES "EXE")
-      SET_PROPERTY(TARGET ${target} APPEND PROPERTY LINK_FLAGS 
-      "${target_link_flags} \"${CMAKE_BINARY_DIR}/versioninfo_exe.res\"")
+	  
+  FUNCTION(ADD_VERSION_INFO target target_type sources_var)
+    IF("${target_type}" MATCHES "SHARED" OR "${target_type}" MATCHES "MODULE")
+      SET(rcfile ${CMAKE_BINARY_DIR}/versioninfo_dll.rc)
+    ELSEIF("${target_type}" MATCHES "EXE")
+      SET(rcfile ${CMAKE_BINARY_DIR}/versioninfo_exe.rc)
     ENDIF()
+    SET(${sources_var} ${${sources_var}} ${rcfile} PARENT_SCOPE)
   ENDFUNCTION()
 ELSE()
   FUNCTION(ADD_VERSION_INFO)

=== modified file 'cmake/plugin.cmake'
--- a/cmake/plugin.cmake	2010-09-29 09:42:35 +0000
+++ b/cmake/plugin.cmake	2010-11-12 12:42:50 +0000
@@ -151,6 +151,7 @@ MACRO(MYSQL_ADD_PLUGIN)
       ENDIF()
     ENDIF()
 
+    ADD_VERSION_INFO(${target} MODULE SOURCES)
     ADD_LIBRARY(${target} MODULE ${SOURCES}) 
     DTRACE_INSTRUMENT(${target})
     SET_TARGET_PROPERTIES (${target} PROPERTIES PREFIX ""

=== modified file 'libmysql/CMakeLists.txt'
--- a/libmysql/CMakeLists.txt	2010-08-16 15:16:07 +0000
+++ b/libmysql/CMakeLists.txt	2010-11-13 22:16:52 +0000
@@ -172,7 +172,7 @@ IF(UNIX)
       SET(${OUTNAME} ${LIBNAME}${EXTENSION}${DOT_VERSION})
     ENDIF() 
   ENDMACRO()
-  INSTALL_SYMLINK(${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a mysqlclient ${INSTALL_LIBDIR} COMPONENT SharedLibraries)
+  INSTALL_SYMLINK(${CMAKE_STATIC_LIBRARY_PREFIX}mysqlclient_r.a mysqlclient ${INSTALL_LIBDIR} Development)
 ENDIF()
 
 IF(NOT DISABLE_SHARED)
@@ -210,7 +210,7 @@ IF(NOT DISABLE_SHARED)
       "${CMAKE_SHARED_LIBRARY_SUFFIX}"
       ""
       linkname)
-    INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} COMPONENT SharedLibraries)
+    INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} SharedLibraries)
     SET(OS_SHARED_LIB_SYMLINKS "${SHARED_LIB_MAJOR_VERSION}" "${OS_SHARED_LIB_VERSION}")
     LIST(REMOVE_DUPLICATES OS_SHARED_LIB_SYMLINKS)
     FOREACH(ver ${OS_SHARED_LIB_SYMLINKS})
@@ -219,7 +219,7 @@ IF(NOT DISABLE_SHARED)
         "${CMAKE_SHARED_LIBRARY_SUFFIX}"
         "${ver}"
         linkname)
-      INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} COMPONENT SharedLibraries)
+      INSTALL_SYMLINK(${linkname} libmysql ${INSTALL_LIBDIR} SharedLibraries)
     ENDFOREACH()
   ENDIF()
 ENDIF()

=== modified file 'libservices/CMakeLists.txt'
--- a/libservices/CMakeLists.txt	2010-08-16 12:50:27 +0000
+++ b/libservices/CMakeLists.txt	2010-11-13 22:16:52 +0000
@@ -22,4 +22,4 @@ SET(MYSQLSERVICES_SOURCES
   my_thread_scheduler_service.c)
 
 ADD_LIBRARY(mysqlservices ${MYSQLSERVICES_SOURCES})
-INSTALL(TARGETS mysqlservices DESTINATION ${INSTALL_LIBDIR})
+INSTALL(TARGETS mysqlservices DESTINATION ${INSTALL_LIBDIR} COMPONENT Development)

=== modified file 'man/CMakeLists.txt'
--- a/man/CMakeLists.txt	2010-08-12 15:19:57 +0000
+++ b/man/CMakeLists.txt	2010-11-13 22:16:52 +0000
@@ -21,8 +21,10 @@ IF(MAN1_FILES)
   IF(MAN1_EXCLUDE)
     LIST(REMOVE_ITEM MAN1_FILES ${MAN1_EXCLUDE})
   ENDIF()
-  INSTALL(FILES ${MAN1_FILES} DESTINATION ${INSTALL_MANDIR}/man1)
+  INSTALL(FILES ${MAN1_FILES} DESTINATION ${INSTALL_MANDIR}/man1
+  COMPONENT ManPages)
 ENDIF()
 IF(MAN8_FILES)
-  INSTALL(FILES ${MAN8_FILES} DESTINATION ${INSTALL_MANDIR}/man8)
+  INSTALL(FILES ${MAN8_FILES} DESTINATION ${INSTALL_MANDIR}/man8
+  COMPONENT ManPages)
 ENDIF()

=== modified file 'mysql-test/CMakeLists.txt'
--- a/mysql-test/CMakeLists.txt	2010-09-02 22:17:08 +0000
+++ b/mysql-test/CMakeLists.txt	2010-11-13 22:16:52 +0000
@@ -53,7 +53,8 @@ IF(UNIX)
   IF(INSTALL_MYSQLTESTDIR)
     INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mtr 
       ${CMAKE_CURRENT_BINARY_DIR}/mysql-test-run 
-      DESTINATION ${INSTALL_MYSQLTESTDIR})
+      DESTINATION ${INSTALL_MYSQLTESTDIR}
+      COMPONENT Test)
   ENDIF()
 ENDIF()
 

=== modified file 'mysql-test/collections/default.weekly'
--- a/mysql-test/collections/default.weekly	2010-09-24 09:39:47 +0000
+++ b/mysql-test/collections/default.weekly	2010-11-16 00:11:06 +0000
@@ -1,2 +1,2 @@
 perl mysql-test-run.pl --timer --force --comment=1st       --experimental=collections/default.experimental 1st
-perl mysql-test-run.pl --timer --force --comment=big-tests --experimental=collections/default.experimental --vardir=var-big-tests --big-test --testcase-timeout=60 --suite-timeout=600 parts.part_supported_sql_func_innodb parts.partition_alter1_1_2_innodb parts.partition_alter1_1_2_ndb parts.partition_alter1_1_ndb parts.partition_alter1_2_innodb parts.partition_alter1_2_ndb parts.partition_alter2_1_1_innodb parts.partition_alter2_1_2_innodb parts.partition_alter2_2_2_innodb parts.partition_alter4_innodb main.variables-big rpl_ndb.rpl_truncate_7ndb_2
+perl mysql-test-run.pl --timer --force --comment=big-tests --experimental=collections/default.experimental --vardir=var-big-tests --big-test --testcase-timeout=60 --suite-timeout=600 large_tests.alter_table main.alter_table-big main.archive-big main.count_distinct3 main.create-big main.events_stress main.events_time_zone main.information_schema-big main.log_tables-big main.merge-big main.mysqlbinlog_row_big main.read_many_rows_innodb main.ssl-big main.sum_distinct-big main.type_newdecimal-big main.variables-big parts.part_supported_sql_func_innodb parts.partition_alter1_1_2_innodb parts.partition_alter1_1_2_ndb parts.partition_alter1_1_ndb parts.partition_alter1_2_innodb parts.partition_alter1_2_ndb parts.partition_alter2_1_1_innodb parts.partition_alter2_1_2_innodb parts.partition_alter2_2_2_innodb parts.partition_alter4_innodb rpl_ndb.rpl_truncate_7ndb_2

=== modified file 'mysql-test/r/information_schema-big.result'
--- a/mysql-test/r/information_schema-big.result	2009-10-05 14:22:48 +0000
+++ b/mysql-test/r/information_schema-big.result	2010-11-16 00:11:06 +0000
@@ -30,6 +30,7 @@ FILES	TABLE_SCHEMA
 GLOBAL_STATUS	VARIABLE_NAME
 GLOBAL_VARIABLES	VARIABLE_NAME
 KEY_COLUMN_USAGE	CONSTRAINT_SCHEMA
+PARAMETERS	SPECIFIC_SCHEMA
 PARTITIONS	TABLE_SCHEMA
 PLUGINS	PLUGIN_NAME
 PROCESSLIST	ID
@@ -42,6 +43,7 @@ SESSION_STATUS	VARIABLE_NAME
 SESSION_VARIABLES	VARIABLE_NAME
 STATISTICS	TABLE_SCHEMA
 TABLES	TABLE_SCHEMA
+TABLESPACES	TABLESPACE_NAME
 TABLE_CONSTRAINTS	CONSTRAINT_SCHEMA
 TABLE_PRIVILEGES	TABLE_SCHEMA
 TRIGGERS	TRIGGER_SCHEMA
@@ -74,6 +76,7 @@ FILES	TABLE_SCHEMA
 GLOBAL_STATUS	VARIABLE_NAME
 GLOBAL_VARIABLES	VARIABLE_NAME
 KEY_COLUMN_USAGE	CONSTRAINT_SCHEMA
+PARAMETERS	SPECIFIC_SCHEMA
 PARTITIONS	TABLE_SCHEMA
 PLUGINS	PLUGIN_NAME
 PROCESSLIST	ID
@@ -86,6 +89,7 @@ SESSION_STATUS	VARIABLE_NAME
 SESSION_VARIABLES	VARIABLE_NAME
 STATISTICS	TABLE_SCHEMA
 TABLES	TABLE_SCHEMA
+TABLESPACES	TABLESPACE_NAME
 TABLE_CONSTRAINTS	CONSTRAINT_SCHEMA
 TABLE_PRIVILEGES	TABLE_SCHEMA
 TRIGGERS	TRIGGER_SCHEMA

=== modified file 'mysql-test/r/not_embedded_server.result'
--- a/mysql-test/r/not_embedded_server.result	2009-12-04 23:02:48 +0000
+++ b/mysql-test/r/not_embedded_server.result	2010-11-15 15:18:04 +0000
@@ -14,3 +14,32 @@ flush privileges;
 ERROR HY000: Table 'host' was not locked with LOCK TABLES
 unlock tables;
 drop table t1;
+#
+# Bug#54812: assert in Diagnostics_area::set_ok_status during EXPLAIN
+#
+CREATE USER nopriv_user@localhost;
+connection: default
+DROP TABLE IF EXISTS t1,t2,t3;
+DROP FUNCTION IF EXISTS f;
+CREATE TABLE t1 (key1 INT PRIMARY KEY);
+CREATE TABLE t2 (key2 INT);
+INSERT INTO t1 VALUES (1),(2);
+CREATE FUNCTION f() RETURNS INT RETURN 1;
+GRANT FILE ON *.* TO 'nopriv_user'@'localhost';
+FLUSH PRIVILEGES;
+connection: con1
+SELECT MAX(key1) FROM t1 WHERE f() < 1 INTO OUTFILE 'mytest';
+ERROR 42000: execute command denied to user 'nopriv_user'@'localhost' for routine 'test.f'
+INSERT INTO t2 SELECT MAX(key1) FROM t1 WHERE f() < 1;
+ERROR 42000: execute command denied to user 'nopriv_user'@'localhost' for routine 'test.f'
+SELECT MAX(key1) INTO @dummy FROM t1 WHERE f() < 1;
+ERROR 42000: execute command denied to user 'nopriv_user'@'localhost' for routine 'test.f'
+CREATE TABLE t3 (i INT) AS SELECT MAX(key1) FROM t1 WHERE f() < 1;
+ERROR 42000: execute command denied to user 'nopriv_user'@'localhost' for routine 'test.f'
+connection: default
+DROP TABLE t1,t2;
+DROP FUNCTION f;
+DROP USER nopriv_user@localhost;
+#
+# End Bug#54812
+#

=== modified file 'mysql-test/r/partition.result'
--- a/mysql-test/r/partition.result	2010-10-01 14:06:10 +0000
+++ b/mysql-test/r/partition.result	2010-11-05 11:01:10 +0000
@@ -1,5 +1,38 @@
 drop table if exists t1, t2;
 #
+# Bug#57778: failed primary key add to partitioned innodb table
+#            inconsistent and crashes
+#
+CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL)
+PARTITION BY KEY (a) PARTITIONS 2;
+INSERT INTO t1 VALUES (0,1), (0,2);
+ALTER TABLE t1 ADD PRIMARY KEY (a);
+ERROR 23000: Duplicate entry '0' for key 'PRIMARY'
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `a` int(11) NOT NULL,
+  `b` int(11) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+/*!50100 PARTITION BY KEY (a)
+PARTITIONS 2 */
+SELECT * FROM t1;
+a	b
+0	1
+0	2
+UPDATE t1 SET a = 1, b = 1 WHERE a = 0 AND b = 2;
+ALTER TABLE t1 ADD PRIMARY KEY (a);
+SELECT * FROM t1;
+a	b
+1	1
+0	1
+ALTER TABLE t1 DROP PRIMARY KEY;
+SELECT * FROM t1;
+a	b
+1	1
+0	1
+DROP TABLE t1;
+#
 # Bug#57113: ha_partition::extra(ha_extra_function):
 #            Assertion `m_extra_cache' failed
 CREATE TABLE t1

=== modified file 'mysql-test/r/ps.result'
--- a/mysql-test/r/ps.result	2010-10-06 10:02:11 +0000
+++ b/mysql-test/r/ps.result	2010-11-13 15:05:02 +0000
@@ -3202,6 +3202,510 @@ test1
 DROP PROCEDURE p1;
 DROP PROCEDURE p2;
 
+TINYINT
+
+CREATE PROCEDURE p1(OUT v TINYINT)
+SET v = 127;
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` bigint(20) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a = 127;
+@a	@a = 127
+127	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+SMALLINT
+
+CREATE PROCEDURE p1(OUT v SMALLINT)
+SET v = 32767;
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` bigint(20) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a = 32767;
+@a	@a = 32767
+32767	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+MEDIUMINT
+
+CREATE PROCEDURE p1(OUT v MEDIUMINT)
+SET v = 8388607;
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` bigint(20) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a = 8388607;
+@a	@a = 8388607
+8388607	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+INT
+
+CREATE PROCEDURE p1(OUT v INT)
+SET v = 2147483647;
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` bigint(20) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a = 2147483647;
+@a	@a = 2147483647
+2147483647	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+BIGINT
+
+CREATE PROCEDURE p1(OUT v BIGINT)
+SET v = 9223372036854775807;
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` bigint(20) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a = 9223372036854775807;
+@a	@a = 9223372036854775807
+9223372036854775807	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+BIT(11)
+
+CREATE PROCEDURE p1(OUT v BIT(11))
+SET v = b'10100100101';
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` bigint(20) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a = b'10100100101';
+@a	@a = b'10100100101'
+1317	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+TIMESTAMP
+
+CREATE PROCEDURE p1(OUT v TIMESTAMP)
+SET v = '2007-11-18 15:01:02';
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` longblob
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a = '2007-11-18 15:01:02';
+@a	@a = '2007-11-18 15:01:02'
+2007-11-18 15:01:02	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+DATETIME
+
+CREATE PROCEDURE p1(OUT v DATETIME)
+SET v = '1234-11-12 12:34:59';
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` longblob
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a = '1234-11-12 12:34:59';
+@a	@a = '1234-11-12 12:34:59'
+1234-11-12 12:34:59	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+TIME
+
+CREATE PROCEDURE p1(OUT v TIME)
+SET v = '123:45:01';
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` longblob
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a = '123:45:01';
+@a	@a = '123:45:01'
+123:45:01	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+DATE
+
+CREATE PROCEDURE p1(OUT v DATE)
+SET v = '1234-11-12';
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` longblob
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a = '1234-11-12';
+@a	@a = '1234-11-12'
+1234-11-12	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+YEAR
+
+CREATE PROCEDURE p1(OUT v YEAR)
+SET v = 2010;
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` bigint(20) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a = 2010;
+@a	@a = 2010
+2010	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+FLOAT(7, 4)
+
+CREATE PROCEDURE p1(OUT v FLOAT(7, 4))
+SET v = 123.4567;
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` double DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a - 123.4567 < 0.00001;
+@a	@a - 123.4567 < 0.00001
+123.45670318603516	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+DOUBLE(8, 5)
+
+CREATE PROCEDURE p1(OUT v DOUBLE(8, 5))
+SET v = 123.45678;
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` double DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a - 123.45678 < 0.000001;
+@a	@a - 123.45678 < 0.000001
+123.45678	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+DECIMAL(9, 6)
+
+CREATE PROCEDURE p1(OUT v DECIMAL(9, 6))
+SET v = 123.456789;
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` decimal(65,30) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a = 123.456789;
+@a	@a = 123.456789
+123.456789	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+CHAR(32)
+
+CREATE PROCEDURE p1(OUT v CHAR(32))
+SET v = REPEAT('a', 16);
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` longblob
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a = REPEAT('a', 16);
+@a	@a = REPEAT('a', 16)
+aaaaaaaaaaaaaaaa	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+VARCHAR(32)
+
+CREATE PROCEDURE p1(OUT v VARCHAR(32))
+SET v = REPEAT('b', 16);
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` longblob
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a = REPEAT('b', 16);
+@a	@a = REPEAT('b', 16)
+bbbbbbbbbbbbbbbb	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+TINYTEXT
+
+CREATE PROCEDURE p1(OUT v TINYTEXT)
+SET v = REPEAT('c', 16);
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` longblob
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a = REPEAT('c', 16);
+@a	@a = REPEAT('c', 16)
+cccccccccccccccc	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+TEXT
+
+CREATE PROCEDURE p1(OUT v TEXT)
+SET v = REPEAT('d', 16);
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` longblob
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a = REPEAT('d', 16);
+@a	@a = REPEAT('d', 16)
+dddddddddddddddd	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+MEDIUMTEXT
+
+CREATE PROCEDURE p1(OUT v MEDIUMTEXT)
+SET v = REPEAT('e', 16);
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` longblob
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a = REPEAT('e', 16);
+@a	@a = REPEAT('e', 16)
+eeeeeeeeeeeeeeee	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+LONGTEXT
+
+CREATE PROCEDURE p1(OUT v LONGTEXT)
+SET v = REPEAT('f', 16);
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` longblob
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a = REPEAT('f', 16);
+@a	@a = REPEAT('f', 16)
+ffffffffffffffff	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+BINARY(32)
+
+CREATE PROCEDURE p1(OUT v BINARY(32))
+SET v = REPEAT('g', 32);
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` longblob
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a = REPEAT('g', 32);
+@a	@a = REPEAT('g', 32)
+gggggggggggggggggggggggggggggggg	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+VARBINARY(32)
+
+CREATE PROCEDURE p1(OUT v VARBINARY(32))
+SET v = REPEAT('h', 16);
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` longblob
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a = REPEAT('h', 16);
+@a	@a = REPEAT('h', 16)
+hhhhhhhhhhhhhhhh	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+TINYBLOB
+
+CREATE PROCEDURE p1(OUT v TINYBLOB)
+SET v = REPEAT('i', 16);
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` longblob
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a = REPEAT('i', 16);
+@a	@a = REPEAT('i', 16)
+iiiiiiiiiiiiiiii	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+BLOB
+
+CREATE PROCEDURE p1(OUT v BLOB)
+SET v = REPEAT('j', 16);
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` longblob
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a = REPEAT('j', 16);
+@a	@a = REPEAT('j', 16)
+jjjjjjjjjjjjjjjj	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+MEDIUMBLOB
+
+CREATE PROCEDURE p1(OUT v MEDIUMBLOB)
+SET v = REPEAT('k', 16);
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` longblob
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a = REPEAT('k', 16);
+@a	@a = REPEAT('k', 16)
+kkkkkkkkkkkkkkkk	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+LONGBLOB
+
+CREATE PROCEDURE p1(OUT v LONGBLOB)
+SET v = REPEAT('l', 16);
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` longblob
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a = REPEAT('l', 16);
+@a	@a = REPEAT('l', 16)
+llllllllllllllll	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+SET('aaa', 'bbb')
+
+CREATE PROCEDURE p1(OUT v SET('aaa', 'bbb'))
+SET v = 'aaa';
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` longblob
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a = 'aaa';
+@a	@a = 'aaa'
+aaa	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+ENUM('aaa', 'bbb')
+
+CREATE PROCEDURE p1(OUT v ENUM('aaa', 'bbb'))
+SET v = 'aaa';
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+SHOW CREATE TABLE tmp1;
+Table	Create Table
+tmp1	CREATE TEMPORARY TABLE `tmp1` (
+  `c1` longblob
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SELECT @a, @a = 'aaa';
+@a	@a = 'aaa'
+aaa	1
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
 # End of WL#4435.
 #
 # WL#4284: Transactional DDL locking

=== modified file 'mysql-test/r/variables-big.result'
--- a/mysql-test/r/variables-big.result	2009-03-30 10:03:25 +0000
+++ b/mysql-test/r/variables-big.result	2010-11-15 15:17:38 +0000
@@ -1,20 +1,20 @@
 SET SESSION transaction_prealloc_size=1024*1024*1024*1;
 SHOW PROCESSLIST;
 Id	User	Host	db	Command	Time	State	Info
-<Id>	root	localhost	test	Query	<Time>	NULL	SHOW PROCESSLIST
+<Id>	root	<Host>	test	Query	<Time>	NULL	SHOW PROCESSLIST
 SET SESSION transaction_prealloc_size=1024*1024*1024*2;
 SHOW PROCESSLIST;
 Id	User	Host	db	Command	Time	State	Info
-<Id>	root	localhost	test	Query	<Time>	NULL	SHOW PROCESSLIST
+<Id>	root	<Host>	test	Query	<Time>	NULL	SHOW PROCESSLIST
 SET SESSION transaction_prealloc_size=1024*1024*1024*3;
 SHOW PROCESSLIST;
 Id	User	Host	db	Command	Time	State	Info
-<Id>	root	localhost	test	Query	<Time>	NULL	SHOW PROCESSLIST
+<Id>	root	<Host>	test	Query	<Time>	NULL	SHOW PROCESSLIST
 SET SESSION transaction_prealloc_size=1024*1024*1024*4;
 SHOW PROCESSLIST;
 Id	User	Host	db	Command	Time	State	Info
-<Id>	root	localhost	test	Query	<Time>	NULL	SHOW PROCESSLIST
+<Id>	root	<Host>	test	Query	<Time>	NULL	SHOW PROCESSLIST
 SET SESSION transaction_prealloc_size=1024*1024*1024*5;
 SHOW PROCESSLIST;
 Id	User	Host	db	Command	Time	State	Info
-<Id>	root	localhost	test	Query	<Time>	NULL	SHOW PROCESSLIST
+<Id>	root	<Host>	test	Query	<Time>	NULL	SHOW PROCESSLIST

=== modified file 'mysql-test/suite/parts/inc/partition_auto_increment.inc'
--- a/mysql-test/suite/parts/inc/partition_auto_increment.inc	2010-03-04 17:16:10 +0000
+++ b/mysql-test/suite/parts/inc/partition_auto_increment.inc	2010-11-11 10:34:55 +0000
@@ -105,6 +105,30 @@ OPTIMIZE TABLE t1;
 SHOW CREATE TABLE t1;
 DROP TABLE t1;
 
+if (!$skip_update)
+{
+eval CREATE TABLE t1
+(a INT NULL AUTO_INCREMENT,
+ UNIQUE KEY (a))
+ENGINE=$engine;
+SET LAST_INSERT_ID = 999;
+SET INSERT_ID = 0;
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+SELECT * FROM t1;
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+SELECT * FROM t1;
+UPDATE t1 SET a = 1 WHERE a IS NULL;
+SELECT LAST_INSERT_ID();
+SELECT * FROM t1;
+UPDATE t1 SET a = NULL WHERE a = 1;
+SELECT LAST_INSERT_ID();
+SELECT * FROM t1;
+DROP TABLE t1;
+SET INSERT_ID = 1;
+}
+
 -- echo # Simple test with NULL
 eval CREATE TABLE t1 (
   c1 INT NOT NULL AUTO_INCREMENT,
@@ -831,5 +855,30 @@ SELECT * FROM t ORDER BY c1 ASC;
 
 DROP TABLE t;
 
+if (!$skip_update)
+{ 
+eval CREATE TABLE t1
+(a INT NULL AUTO_INCREMENT,
+ UNIQUE KEY (a))
+ENGINE=$engine
+PARTITION BY KEY(a) PARTITIONS 2;
+SET LAST_INSERT_ID = 999;
+SET INSERT_ID = 0;
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+SELECT * FROM t1;
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+SELECT * FROM t1;
+UPDATE t1 SET a = 1 WHERE a IS NULL;
+SELECT LAST_INSERT_ID();
+SELECT * FROM t1;
+UPDATE t1 SET a = NULL WHERE a = 1;
+SELECT LAST_INSERT_ID();
+SELECT * FROM t1;
+DROP TABLE t1;
+}
+
+
 --echo ##############################################################################
 }

=== modified file 'mysql-test/suite/parts/r/partition_auto_increment_blackhole.result'
--- a/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result	2010-03-04 17:16:10 +0000
+++ b/mysql-test/suite/parts/r/partition_auto_increment_blackhole.result	2010-11-11 10:34:55 +0000
@@ -120,6 +120,38 @@ t1	CREATE TABLE `t1` (
   PRIMARY KEY (`c1`)
 ) ENGINE=BLACKHOLE DEFAULT CHARSET=latin1
 DROP TABLE t1;
+CREATE TABLE t1
+(a INT NULL AUTO_INCREMENT,
+UNIQUE KEY (a))
+ENGINE='Blackhole';
+SET LAST_INSERT_ID = 999;
+SET INSERT_ID = 0;
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+UPDATE t1 SET a = 1 WHERE a IS NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+UPDATE t1 SET a = NULL WHERE a = 1;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+DROP TABLE t1;
+SET INSERT_ID = 1;
 # Simple test with NULL
 CREATE TABLE t1 (
 c1 INT NOT NULL AUTO_INCREMENT,

=== modified file 'mysql-test/suite/parts/r/partition_auto_increment_innodb.result'
--- a/mysql-test/suite/parts/r/partition_auto_increment_innodb.result	2010-03-04 17:16:10 +0000
+++ b/mysql-test/suite/parts/r/partition_auto_increment_innodb.result	2010-11-11 10:34:55 +0000
@@ -136,6 +136,42 @@ t1	CREATE TABLE `t1` (
   PRIMARY KEY (`c1`)
 ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
 DROP TABLE t1;
+CREATE TABLE t1
+(a INT NULL AUTO_INCREMENT,
+UNIQUE KEY (a))
+ENGINE='InnoDB';
+SET LAST_INSERT_ID = 999;
+SET INSERT_ID = 0;
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+1
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+UPDATE t1 SET a = 1 WHERE a IS NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+UPDATE t1 SET a = NULL WHERE a = 1;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+DROP TABLE t1;
+SET INSERT_ID = 1;
 # Simple test with NULL
 CREATE TABLE t1 (
 c1 INT NOT NULL AUTO_INCREMENT,
@@ -1023,4 +1059,40 @@ c1	c2
 2	20
 127	40
 DROP TABLE t;
+CREATE TABLE t1
+(a INT NULL AUTO_INCREMENT,
+UNIQUE KEY (a))
+ENGINE='InnoDB'
+PARTITION BY KEY(a) PARTITIONS 2;
+SET LAST_INSERT_ID = 999;
+SET INSERT_ID = 0;
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+1
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+UPDATE t1 SET a = 1 WHERE a IS NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+UPDATE t1 SET a = NULL WHERE a = 1;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+DROP TABLE t1;
 ##############################################################################

=== modified file 'mysql-test/suite/parts/r/partition_auto_increment_memory.result'
--- a/mysql-test/suite/parts/r/partition_auto_increment_memory.result	2010-03-04 17:16:10 +0000
+++ b/mysql-test/suite/parts/r/partition_auto_increment_memory.result	2010-11-11 10:34:55 +0000
@@ -136,6 +136,42 @@ t1	CREATE TABLE `t1` (
   PRIMARY KEY (`c1`)
 ) ENGINE=MEMORY AUTO_INCREMENT=102 DEFAULT CHARSET=latin1
 DROP TABLE t1;
+CREATE TABLE t1
+(a INT NULL AUTO_INCREMENT,
+UNIQUE KEY (a))
+ENGINE='Memory';
+SET LAST_INSERT_ID = 999;
+SET INSERT_ID = 0;
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+1
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+UPDATE t1 SET a = 1 WHERE a IS NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+UPDATE t1 SET a = NULL WHERE a = 1;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+DROP TABLE t1;
+SET INSERT_ID = 1;
 # Simple test with NULL
 CREATE TABLE t1 (
 c1 INT NOT NULL AUTO_INCREMENT,
@@ -1051,4 +1087,40 @@ c1	c2
 2	20
 127	40
 DROP TABLE t;
+CREATE TABLE t1
+(a INT NULL AUTO_INCREMENT,
+UNIQUE KEY (a))
+ENGINE='Memory'
+PARTITION BY KEY(a) PARTITIONS 2;
+SET LAST_INSERT_ID = 999;
+SET INSERT_ID = 0;
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+1
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+UPDATE t1 SET a = 1 WHERE a IS NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+UPDATE t1 SET a = NULL WHERE a = 1;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+DROP TABLE t1;
 ##############################################################################

=== modified file 'mysql-test/suite/parts/r/partition_auto_increment_myisam.result'
--- a/mysql-test/suite/parts/r/partition_auto_increment_myisam.result	2010-03-04 17:16:10 +0000
+++ b/mysql-test/suite/parts/r/partition_auto_increment_myisam.result	2010-11-11 10:34:55 +0000
@@ -136,6 +136,42 @@ t1	CREATE TABLE `t1` (
   PRIMARY KEY (`c1`)
 ) ENGINE=MyISAM AUTO_INCREMENT=102 DEFAULT CHARSET=latin1
 DROP TABLE t1;
+CREATE TABLE t1
+(a INT NULL AUTO_INCREMENT,
+UNIQUE KEY (a))
+ENGINE='MyISAM';
+SET LAST_INSERT_ID = 999;
+SET INSERT_ID = 0;
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+1
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+UPDATE t1 SET a = 1 WHERE a IS NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+UPDATE t1 SET a = NULL WHERE a = 1;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+DROP TABLE t1;
+SET INSERT_ID = 1;
 # Simple test with NULL
 CREATE TABLE t1 (
 c1 INT NOT NULL AUTO_INCREMENT,
@@ -1070,4 +1106,40 @@ c1	c2
 2	20
 127	40
 DROP TABLE t;
+CREATE TABLE t1
+(a INT NULL AUTO_INCREMENT,
+UNIQUE KEY (a))
+ENGINE='MyISAM'
+PARTITION BY KEY(a) PARTITIONS 2;
+SET LAST_INSERT_ID = 999;
+SET INSERT_ID = 0;
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+1
+INSERT INTO t1 SET a = 1 ON DUPLICATE KEY UPDATE a = NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+UPDATE t1 SET a = 1 WHERE a IS NULL;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+UPDATE t1 SET a = NULL WHERE a = 1;
+SELECT LAST_INSERT_ID();
+LAST_INSERT_ID()
+999
+SELECT * FROM t1;
+a
+0
+DROP TABLE t1;
 ##############################################################################

=== modified file 'mysql-test/t/disabled.def'
--- a/mysql-test/t/disabled.def	2010-10-27 13:43:29 +0000
+++ b/mysql-test/t/disabled.def	2010-11-16 01:01:49 +0000
@@ -15,3 +15,8 @@ query_cache_28249        : Bug#43861 200
 ctype_utf8mb4_ndb	: Bug#55799, Bug#51907, disabled by Konstantin 2010-08-06
 main.mysqlhotcopy_myisam : Bug#56817 2010-10-21 anitha mysqlhotcopy* fails
 main.mysqlhotcopy_archive: Bug#56817 2010-10-21 anitha mysqlhotcopy* fails
+log_tables-big           : Bug#48646 2010-11-15 mattiasj report already exists
+read_many_rows_innodb    : Bug#37635 2010-11-15 mattiasj report already exists
+sum_distinct-big         : Bug#56927 2010-11-15 mattiasj was not tested
+alter_table-big          : Bug#37248 2010-11-15 mattiasj was not tested
+create-big               : Bug#37248 2010-11-15 mattiasj was not tested

=== modified file 'mysql-test/t/not_embedded_server.test'
--- a/mysql-test/t/not_embedded_server.test	2009-12-04 23:02:48 +0000
+++ b/mysql-test/t/not_embedded_server.test	2010-11-15 15:18:04 +0000
@@ -54,3 +54,57 @@ lock tables t1 read;
 flush privileges;
 unlock tables;
 drop table t1;
+
+--echo #
+--echo # Bug#54812: assert in Diagnostics_area::set_ok_status during EXPLAIN
+--echo #
+
+CREATE USER nopriv_user@localhost;
+
+connection default;
+--echo connection: default
+
+--disable_warnings
+DROP TABLE IF EXISTS t1,t2,t3;
+DROP FUNCTION IF EXISTS f;
+--enable_warnings
+
+CREATE TABLE t1 (key1 INT PRIMARY KEY);
+CREATE TABLE t2 (key2 INT);
+INSERT INTO t1 VALUES (1),(2);
+
+CREATE FUNCTION f() RETURNS INT RETURN 1;
+
+GRANT FILE ON *.* TO 'nopriv_user'@'localhost';
+
+FLUSH PRIVILEGES;
+
+connect (con1,localhost,nopriv_user,,);
+connection con1;
+--echo connection: con1
+
+--error ER_PROCACCESS_DENIED_ERROR
+SELECT MAX(key1) FROM t1 WHERE f() < 1 INTO OUTFILE 'mytest';
+
+--error ER_PROCACCESS_DENIED_ERROR
+INSERT INTO t2 SELECT MAX(key1) FROM t1 WHERE f() < 1;
+
+--error ER_PROCACCESS_DENIED_ERROR
+SELECT MAX(key1) INTO @dummy FROM t1 WHERE f() < 1;
+
+--error ER_PROCACCESS_DENIED_ERROR
+CREATE TABLE t3 (i INT) AS SELECT MAX(key1) FROM t1 WHERE f() < 1;
+
+disconnect con1;
+--source include/wait_until_disconnected.inc
+
+connection default;
+--echo connection: default
+
+DROP TABLE t1,t2;
+DROP FUNCTION f;
+DROP USER nopriv_user@localhost;
+
+--echo #
+--echo # End Bug#54812
+--echo #

=== modified file 'mysql-test/t/partition.test'
--- a/mysql-test/t/partition.test	2010-10-01 14:06:10 +0000
+++ b/mysql-test/t/partition.test	2010-11-05 11:01:10 +0000
@@ -15,6 +15,24 @@ drop table if exists t1, t2;
 --enable_warnings
 
 --echo #
+--echo # Bug#57778: failed primary key add to partitioned innodb table
+--echo #            inconsistent and crashes
+--echo #
+CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL)
+PARTITION BY KEY (a) PARTITIONS 2;
+INSERT INTO t1 VALUES (0,1), (0,2);
+--error ER_DUP_ENTRY
+ALTER TABLE t1 ADD PRIMARY KEY (a);
+SHOW CREATE TABLE t1;
+SELECT * FROM t1;
+UPDATE t1 SET a = 1, b = 1 WHERE a = 0 AND b = 2;
+ALTER TABLE t1 ADD PRIMARY KEY (a);
+SELECT * FROM t1;
+ALTER TABLE t1 DROP PRIMARY KEY;
+SELECT * FROM t1;
+DROP TABLE t1;
+
+--echo #
 --echo # Bug#57113: ha_partition::extra(ha_extra_function):
 --echo #            Assertion `m_extra_cache' failed
 CREATE TABLE t1

=== modified file 'mysql-test/t/ps.test'
--- a/mysql-test/t/ps.test	2010-10-06 10:02:11 +0000
+++ b/mysql-test/t/ps.test	2010-11-13 15:05:02 +0000
@@ -3296,6 +3296,12 @@ SELECT @a;
 DROP PROCEDURE p1;
 DROP PROCEDURE p2;
 
+###########################################################################
+
+--source t/wl4435_generated.inc
+
+###########################################################################
+
 --echo
 --echo # End of WL#4435.
 

=== modified file 'mysql-test/t/variables-big.test'
--- a/mysql-test/t/variables-big.test	2009-03-30 10:03:25 +0000
+++ b/mysql-test/t/variables-big.test	2010-11-15 15:17:38 +0000
@@ -37,19 +37,19 @@
 
 --disable_warnings
 SET SESSION transaction_prealloc_size=1024*1024*1024*1;
---replace_column 1 <Id> 6 <Time>
+--replace_column 1 <Id> 3 <Host> 6 <Time>
 SHOW PROCESSLIST;
 SET SESSION transaction_prealloc_size=1024*1024*1024*2;
---replace_column 1 <Id> 6 <Time>
+--replace_column 1 <Id> 3 <Host> 6 <Time>
 SHOW PROCESSLIST;
 SET SESSION transaction_prealloc_size=1024*1024*1024*3;
---replace_column 1 <Id> 6 <Time>
+--replace_column 1 <Id> 3 <Host> 6 <Time>
 SHOW PROCESSLIST;
 SET SESSION transaction_prealloc_size=1024*1024*1024*4;
---replace_column 1 <Id> 6 <Time>
+--replace_column 1 <Id> 3 <Host> 6 <Time>
 SHOW PROCESSLIST;
 SET SESSION transaction_prealloc_size=1024*1024*1024*5;
---replace_column 1 <Id> 6 <Time>
+--replace_column 1 <Id> 3 <Host> 6 <Time>
 SHOW PROCESSLIST;
 --enable_warnings
 

=== added file 'mysql-test/t/wl4435_generated.inc'
--- a/mysql-test/t/wl4435_generated.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/wl4435_generated.inc	2010-11-13 15:05:02 +0000
@@ -0,0 +1,588 @@
+
+###########################################################################
+
+--echo
+--echo TINYINT
+--echo
+
+CREATE PROCEDURE p1(OUT v TINYINT)
+  SET v = 127;
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a = 127;
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo SMALLINT
+--echo
+
+CREATE PROCEDURE p1(OUT v SMALLINT)
+  SET v = 32767;
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a = 32767;
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo MEDIUMINT
+--echo
+
+CREATE PROCEDURE p1(OUT v MEDIUMINT)
+  SET v = 8388607;
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a = 8388607;
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo INT
+--echo
+
+CREATE PROCEDURE p1(OUT v INT)
+  SET v = 2147483647;
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a = 2147483647;
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo BIGINT
+--echo
+
+CREATE PROCEDURE p1(OUT v BIGINT)
+  SET v = 9223372036854775807;
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a = 9223372036854775807;
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo BIT(11)
+--echo
+
+CREATE PROCEDURE p1(OUT v BIT(11))
+  SET v = b'10100100101';
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a = b'10100100101';
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo TIMESTAMP
+--echo
+
+CREATE PROCEDURE p1(OUT v TIMESTAMP)
+  SET v = '2007-11-18 15:01:02';
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a = '2007-11-18 15:01:02';
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo DATETIME
+--echo
+
+CREATE PROCEDURE p1(OUT v DATETIME)
+  SET v = '1234-11-12 12:34:59';
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a = '1234-11-12 12:34:59';
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo TIME
+--echo
+
+CREATE PROCEDURE p1(OUT v TIME)
+  SET v = '123:45:01';
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a = '123:45:01';
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo DATE
+--echo
+
+CREATE PROCEDURE p1(OUT v DATE)
+  SET v = '1234-11-12';
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a = '1234-11-12';
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo YEAR
+--echo
+
+CREATE PROCEDURE p1(OUT v YEAR)
+  SET v = 2010;
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a = 2010;
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo FLOAT(7, 4)
+--echo
+
+CREATE PROCEDURE p1(OUT v FLOAT(7, 4))
+  SET v = 123.4567;
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a - 123.4567 < 0.00001;
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo DOUBLE(8, 5)
+--echo
+
+CREATE PROCEDURE p1(OUT v DOUBLE(8, 5))
+  SET v = 123.45678;
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a - 123.45678 < 0.000001;
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo DECIMAL(9, 6)
+--echo
+
+CREATE PROCEDURE p1(OUT v DECIMAL(9, 6))
+  SET v = 123.456789;
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a = 123.456789;
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo CHAR(32)
+--echo
+
+CREATE PROCEDURE p1(OUT v CHAR(32))
+  SET v = REPEAT('a', 16);
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a = REPEAT('a', 16);
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo VARCHAR(32)
+--echo
+
+CREATE PROCEDURE p1(OUT v VARCHAR(32))
+  SET v = REPEAT('b', 16);
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a = REPEAT('b', 16);
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo TINYTEXT
+--echo
+
+CREATE PROCEDURE p1(OUT v TINYTEXT)
+  SET v = REPEAT('c', 16);
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a = REPEAT('c', 16);
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo TEXT
+--echo
+
+CREATE PROCEDURE p1(OUT v TEXT)
+  SET v = REPEAT('d', 16);
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a = REPEAT('d', 16);
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo MEDIUMTEXT
+--echo
+
+CREATE PROCEDURE p1(OUT v MEDIUMTEXT)
+  SET v = REPEAT('e', 16);
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a = REPEAT('e', 16);
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo LONGTEXT
+--echo
+
+CREATE PROCEDURE p1(OUT v LONGTEXT)
+  SET v = REPEAT('f', 16);
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a = REPEAT('f', 16);
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo BINARY(32)
+--echo
+
+CREATE PROCEDURE p1(OUT v BINARY(32))
+  SET v = REPEAT('g', 32);
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a = REPEAT('g', 32);
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo VARBINARY(32)
+--echo
+
+CREATE PROCEDURE p1(OUT v VARBINARY(32))
+  SET v = REPEAT('h', 16);
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a = REPEAT('h', 16);
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo TINYBLOB
+--echo
+
+CREATE PROCEDURE p1(OUT v TINYBLOB)
+  SET v = REPEAT('i', 16);
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a = REPEAT('i', 16);
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo BLOB
+--echo
+
+CREATE PROCEDURE p1(OUT v BLOB)
+  SET v = REPEAT('j', 16);
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a = REPEAT('j', 16);
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo MEDIUMBLOB
+--echo
+
+CREATE PROCEDURE p1(OUT v MEDIUMBLOB)
+  SET v = REPEAT('k', 16);
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a = REPEAT('k', 16);
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo LONGBLOB
+--echo
+
+CREATE PROCEDURE p1(OUT v LONGBLOB)
+  SET v = REPEAT('l', 16);
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a = REPEAT('l', 16);
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo SET('aaa', 'bbb')
+--echo
+
+CREATE PROCEDURE p1(OUT v SET('aaa', 'bbb'))
+  SET v = 'aaa';
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a = 'aaa';
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;
+
+###########################################################################
+
+--echo
+--echo ENUM('aaa', 'bbb')
+--echo
+
+CREATE PROCEDURE p1(OUT v ENUM('aaa', 'bbb'))
+  SET v = 'aaa';
+
+PREPARE stmt1 FROM 'CALL p1(?)';
+EXECUTE stmt1 USING @a;
+
+CREATE TEMPORARY TABLE tmp1 AS SELECT @a AS c1;
+
+SHOW CREATE TABLE tmp1;
+
+SELECT @a, @a = 'aaa';
+
+DROP TEMPORARY TABLE tmp1;
+DROP PROCEDURE p1;

=== modified file 'packaging/WiX/create_msi.cmake.in'
--- a/packaging/WiX/create_msi.cmake.in	2010-07-24 15:26:45 +0000
+++ b/packaging/WiX/create_msi.cmake.in	2010-11-13 18:38:39 +0000
@@ -27,6 +27,12 @@ ENDIF()
 
 SET(ENV{VS_UNICODE_OUTPUT})
 
+# Switch off the monolithic install
+EXECUTE_PROCESS(
+  COMMAND ${CMAKE_COMMAND} -DCPACK_MONOLITHIC_INSTALL=0 ${CMAKE_BINARY_DIR}
+  OUTPUT_QUIET
+)
+
 INCLUDE(${CMAKE_BINARY_DIR}/CPackConfig.cmake)
 
 IF(CPACK_WIX_CONFIG)
@@ -318,3 +324,9 @@ EXECUTE_PROCESS(
   ${EXTRA_LIGHT_ARGS}
 )
 
+# Switch monolithic install on again
+EXECUTE_PROCESS(
+  COMMAND ${CMAKE_COMMAND} -DCPACK_MONOLITHIC_INSTALL=1 ${CMAKE_BINARY_DIR}
+  OUTPUT_QUIET
+)
+

=== modified file 'scripts/CMakeLists.txt'
--- a/scripts/CMakeLists.txt	2010-10-04 19:25:53 +0000
+++ b/scripts/CMakeLists.txt	2010-11-13 22:16:52 +0000
@@ -310,7 +310,7 @@ IF(WIN32)
   FOREACH(file ${SH_FILES})
     CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${file}.sh
        ${CMAKE_CURRENT_BINARY_DIR}/${file}.pl ESCAPE_QUOTES @ONLY)
-    INSTALL_SCRIPT(${CMAKE_CURRENT_BINARY_DIR}/${file}.pl COMPONENT ${${file}_COMPONENT})
+    INSTALL_SCRIPT(${CMAKE_CURRENT_BINARY_DIR}/${file}.pl COMPONENT Server_Scripts)
   ENDFOREACH()
 ELSE()
   # On Unix, most of the files end up in the bin directory

=== modified file 'sql-bench/CMakeLists.txt'
--- a/sql-bench/CMakeLists.txt	2010-08-12 15:19:57 +0000
+++ b/sql-bench/CMakeLists.txt	2010-11-13 22:16:52 +0000
@@ -26,13 +26,13 @@ ELSE()
 ENDIF()
 
 INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Data/ATIS
-  DESTINATION  ${prefix}sql-bench/Data)
+  DESTINATION  ${prefix}sql-bench/Data COMPONENT SqlBench)
 
 INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Data/Wisconsin
-  DESTINATION  ${prefix}sql-bench/Data)
+  DESTINATION  ${prefix}sql-bench/Data COMPONENT SqlBench)
 
 INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/limits
-  DESTINATION  ${prefix}sql-bench)
+  DESTINATION  ${prefix}sql-bench COMPONENT SqlBench)
 
 FILE(GLOB all_files ${CMAKE_CURRENT_SOURCE_DIR}/*)
 
@@ -54,10 +54,10 @@ FOREACH(file ${all_files})
   CONFIGURE_FILE(${file} ${target} COPYONLY)
   IF (ext MATCHES ".bat")
     IF(WIN32) 
-      INSTALL(FILES ${target} DESTINATION ${prefix}sql-bench)
+      INSTALL(FILES ${target} DESTINATION ${prefix}sql-bench COMPONENT SqlBench)
     ENDIF()
   ELSE()
-    INSTALL(FILES ${target} DESTINATION ${prefix}sql-bench)
+    INSTALL(FILES ${target} DESTINATION ${prefix}sql-bench COMPONENT SqlBench)
   ENDIF()
   ENDIF()
 ENDFOREACH()

=== modified file 'sql/CMakeLists.txt'
--- a/sql/CMakeLists.txt	2010-10-04 12:42:16 +0000
+++ b/sql/CMakeLists.txt	2010-11-13 22:16:52 +0000
@@ -283,7 +283,7 @@ IF(WIN32 AND MYSQLD_EXECUTABLE)
   COMPONENT DataFiles PATTERN "initdb.dep" EXCLUDE  PATTERN "bootstrap.sql" EXCLUDE)
 ELSE()
   # Not windows or cross compiling, just install an empty directory
-  INSTALL(FILES ${DUMMY_FILE} DESTINATION data/mysql)
+  INSTALL(FILES ${DUMMY_FILE} DESTINATION data/mysql COMPONENT DataFiles)
 ENDIF()
 ENDIF()
 

=== modified file 'sql/ha_partition.cc'
--- a/sql/ha_partition.cc	2010-10-06 14:34:28 +0000
+++ b/sql/ha_partition.cc	2010-11-15 22:38:26 +0000
@@ -3093,7 +3093,9 @@ int ha_partition::write_row(uchar * buf)
   bool have_auto_increment= table->next_number_field && buf == table->record[0];
   my_bitmap_map *old_map;
   THD *thd= ha_thd();
-  timestamp_auto_set_type orig_timestamp_type= table->timestamp_field_type;
+  timestamp_auto_set_type saved_timestamp_type= table->timestamp_field_type;
+  ulong saved_sql_mode= thd->variables.sql_mode;
+  bool saved_auto_inc_field_not_null= table->auto_increment_field_not_null;
 #ifdef NOT_NEEDED
   uchar *rec0= m_rec0;
 #endif
@@ -3129,6 +3131,22 @@ int ha_partition::write_row(uchar * buf)
     */
     if (error)
       goto exit;
+
+    /*
+      Don't allow generation of auto_increment value the partitions handler.
+      If a partitions handler would change the value, then it might not
+      match the partition any longer.
+      This can occur if 'SET INSERT_ID = 0; INSERT (NULL)',
+      So allow this by adding 'MODE_NO_AUTO_VALUE_ON_ZERO' to sql_mode.
+      The partitions handler::next_insert_id must always be 0. Otherwise
+      we need to forward release_auto_increment, or reset it for all
+      partitions.
+    */
+    if (table->next_number_field->val_int() == 0)
+    {
+      table->auto_increment_field_not_null= TRUE;
+      thd->variables.sql_mode|= MODE_NO_AUTO_VALUE_ON_ZERO;
+    }
   }
 
   old_map= dbug_tmp_use_all_columns(table, table->read_set);
@@ -3162,7 +3180,9 @@ int ha_partition::write_row(uchar * buf)
     set_auto_increment_if_higher(table->next_number_field);
   reenable_binlog(thd);
 exit:
-  table->timestamp_field_type= orig_timestamp_type;
+  thd->variables.sql_mode= saved_sql_mode;
+  table->auto_increment_field_not_null= saved_auto_inc_field_not_null;
+  table->timestamp_field_type= saved_timestamp_type;
   DBUG_RETURN(error);
 }
 
@@ -3229,11 +3249,24 @@ int ha_partition::update_row(const uchar
   }
   else
   {
+    Field *saved_next_number_field= table->next_number_field;
+    /*
+      Don't allow generation of auto_increment value for update.
+      table->next_number_field is never set on UPDATE.
+      But is set for INSERT ... ON DUPLICATE KEY UPDATE,
+      and since update_row() does not generate or update an auto_inc value,
+      we cannot have next_number_field set when moving a row
+      to another partition with write_row(), since that could
+      generate/update the auto_inc value.
+      This gives the same behavior for partitioned vs non partitioned tables.
+    */
+    table->next_number_field= NULL;
     DBUG_PRINT("info", ("Update from partition %d to partition %d",
 			old_part_id, new_part_id));
     tmp_disable_binlog(thd); /* Do not replicate the low-level changes. */
     error= m_file[new_part_id]->ha_write_row(new_data);
     reenable_binlog(thd);
+    table->next_number_field= saved_next_number_field;
     if (error)
       goto exit;
 
@@ -6375,9 +6408,42 @@ bool ha_partition::get_error_message(int
 */
 uint ha_partition::alter_table_flags(uint flags)
 {
+  uint flags_to_return, flags_to_check;
   DBUG_ENTER("ha_partition::alter_table_flags");
-  DBUG_RETURN(ht->alter_table_flags(flags) |
-              m_file[0]->alter_table_flags(flags)); 
+
+  flags_to_return= ht->alter_table_flags(flags);
+  flags_to_return|= m_file[0]->alter_table_flags(flags); 
+
+  /*
+    If one partition fails we must be able to revert the change for the other,
+    already altered, partitions. So both ADD and DROP can only be supported in
+    pairs.
+  */
+  flags_to_check= HA_ONLINE_ADD_INDEX_NO_WRITES;
+  flags_to_check|= HA_ONLINE_DROP_INDEX_NO_WRITES;
+  if ((flags_to_return & flags_to_check) != flags_to_check)
+    flags_to_return&= ~flags_to_check;
+  flags_to_check= HA_ONLINE_ADD_UNIQUE_INDEX_NO_WRITES;
+  flags_to_check|= HA_ONLINE_DROP_UNIQUE_INDEX_NO_WRITES;
+  if ((flags_to_return & flags_to_check) != flags_to_check)
+    flags_to_return&= ~flags_to_check;
+  flags_to_check= HA_ONLINE_ADD_PK_INDEX_NO_WRITES;
+  flags_to_check|= HA_ONLINE_DROP_PK_INDEX_NO_WRITES;
+  if ((flags_to_return & flags_to_check) != flags_to_check)
+    flags_to_return&= ~flags_to_check;
+  flags_to_check= HA_ONLINE_ADD_INDEX;
+  flags_to_check|= HA_ONLINE_DROP_INDEX;
+  if ((flags_to_return & flags_to_check) != flags_to_check)
+    flags_to_return&= ~flags_to_check;
+  flags_to_check= HA_ONLINE_ADD_UNIQUE_INDEX;
+  flags_to_check|= HA_ONLINE_DROP_UNIQUE_INDEX;
+  if ((flags_to_return & flags_to_check) != flags_to_check)
+    flags_to_return&= ~flags_to_check;
+  flags_to_check= HA_ONLINE_ADD_PK_INDEX;
+  flags_to_check|= HA_ONLINE_DROP_PK_INDEX;
+  if ((flags_to_return & flags_to_check) != flags_to_check)
+    flags_to_return&= ~flags_to_check;
+  DBUG_RETURN(flags_to_return);
 }
 
 
@@ -6412,6 +6478,7 @@ int ha_partition::add_index(TABLE *table
   handler **file;
   int ret= 0;
 
+  DBUG_ENTER("ha_partition::add_index");
   /*
     There has already been a check in fix_partition_func in mysql_alter_table
     before this call, which checks for unique/primary key violations of the
@@ -6419,8 +6486,28 @@ int ha_partition::add_index(TABLE *table
   */
   for (file= m_file; *file; file++)
     if ((ret=  (*file)->add_index(table_arg, key_info, num_of_keys)))
-      break;
-  return ret;
+      goto err;
+  DBUG_RETURN(ret);
+err:
+  if (file > m_file)
+  {
+    uint *key_numbers= (uint*) ha_thd()->alloc(sizeof(uint) * num_of_keys);
+    uint old_num_of_keys= table_arg->s->keys;
+    uint i;
+    /* The newly created keys have the last id's */
+    for (i= 0; i < num_of_keys; i++)
+      key_numbers[i]= i + old_num_of_keys;
+    if (!table_arg->key_info)
+      table_arg->key_info= key_info;
+    while (--file >= m_file)
+    {
+      (void) (*file)->prepare_drop_index(table_arg, key_numbers, num_of_keys);
+      (void) (*file)->final_drop_index(table_arg);
+    }
+    if (table_arg->key_info == key_info)
+      table_arg->key_info= NULL;
+  }
+  DBUG_RETURN(ret);
 }
 
 

=== modified file 'sql/handler.h'
--- a/sql/handler.h	2010-10-06 14:34:28 +0000
+++ b/sql/handler.h	2010-11-05 11:01:10 +0000
@@ -174,6 +174,8 @@
 /*
   These bits are set if different kinds of indexes can be created
   off-line without re-create of the table (but with a table lock).
+  Partitioning needs both ADD and DROP to be supported by its underlying
+  handlers, due to error handling, see bug#57778.
 */
 #define HA_ONLINE_ADD_INDEX_NO_WRITES           (1L << 0) /*add index w/lock*/
 #define HA_ONLINE_DROP_INDEX_NO_WRITES          (1L << 1) /*drop index w/lock*/

=== modified file 'sql/item.cc'
--- a/sql/item.cc	2010-11-04 08:36:04 +0000
+++ b/sql/item.cc	2010-11-13 15:05:02 +0000
@@ -226,8 +226,6 @@ bool Item::val_bool()
 */
 String *Item::val_str_ascii(String *str)
 {
-  DBUG_ASSERT(fixed == 1);
-
   if (!(collation.collation->state & MY_CS_NONASCII))
     return val_str(str);
   
@@ -3459,19 +3457,16 @@ Item_param::set_value(THD *thd, sp_rcont
                       str_value.charset());
     collation.set(str_value.charset(), DERIVATION_COERCIBLE);
     decimals= 0;
-    param_type= MYSQL_TYPE_STRING;
 
     break;
   }
 
   case REAL_RESULT:
     set_double(arg->val_real());
-      param_type= MYSQL_TYPE_DOUBLE;
     break;
 
   case INT_RESULT:
     set_int(arg->val_int(), arg->max_length);
-    param_type= MYSQL_TYPE_LONG;
     break;
 
   case DECIMAL_RESULT:
@@ -3483,8 +3478,6 @@ Item_param::set_value(THD *thd, sp_rcont
       return TRUE;
 
     set_decimal(dv);
-    param_type= MYSQL_TYPE_NEWDECIMAL;
-
     break;
   }
 
@@ -3516,6 +3509,7 @@ void
 Item_param::set_out_param_info(Send_field *info)
 {
   m_out_param_info= info;
+  param_type= m_out_param_info->type;
 }
 
 
@@ -3561,6 +3555,7 @@ void Item_param::make_field(Send_field *
   field->org_table_name= m_out_param_info->org_table_name;
   field->col_name= m_out_param_info->col_name;
   field->org_col_name= m_out_param_info->org_col_name;
+
   field->length= m_out_param_info->length;
   field->charsetnr= m_out_param_info->charsetnr;
   field->flags= m_out_param_info->flags;

=== modified file 'sql/sp_rcontext.h'
--- a/sql/sp_rcontext.h	2010-07-30 15:28:36 +0000
+++ b/sql/sp_rcontext.h	2010-11-13 15:05:02 +0000
@@ -220,6 +220,7 @@ private:
     during execution.
   */
   bool m_return_value_set;
+
   /**
     TRUE if the context is created for a sub-statement.
   */

=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc	2010-10-23 13:09:27 +0000
+++ b/sql/sql_class.cc	2010-11-15 15:18:04 +0000
@@ -1842,8 +1842,9 @@ void select_to_file::send_error(uint err
 bool select_to_file::send_eof()
 {
   int error= test(end_io_cache(&cache));
-  if (mysql_file_close(file, MYF(MY_WME)))
-    error= 1;
+  if (mysql_file_close(file, MYF(MY_WME)) || thd->is_error())
+    error= true;
+
   if (!error)
   {
     ::my_ok(thd,row_count);
@@ -2884,6 +2885,13 @@ bool select_dumpvar::send_eof()
   if (! row_count)
     push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                  ER_SP_FETCH_NO_DATA, ER(ER_SP_FETCH_NO_DATA));
+  /*
+    Don't send EOF if we're in error condition (which implies we've already
+    sent or are sending an error)
+  */
+  if (thd->is_error())
+    return true;
+
   ::my_ok(thd,row_count);
   return 0;
 }

=== modified file 'sql/sql_insert.cc'
--- a/sql/sql_insert.cc	2010-10-07 10:01:51 +0000
+++ b/sql/sql_insert.cc	2010-11-15 15:18:04 +0000
@@ -3506,6 +3506,9 @@ bool select_insert::send_eof()
 
   error= (thd->locked_tables_mode <= LTM_LOCK_TABLES ?
           table->file->ha_end_bulk_insert() : 0);
+  if (!error && thd->is_error())
+    error= thd->stmt_da->sql_errno();
+
   table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
   table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE);
 
@@ -4049,7 +4052,7 @@ bool select_create::send_eof()
 {
   bool tmp=select_insert::send_eof();
   if (tmp)
-    abort();
+    abort_result_set();
   else
   {
     /*
@@ -4081,7 +4084,7 @@ void select_create::abort_result_set()
   DBUG_ENTER("select_create::abort_result_set");
 
   /*
-    In select_insert::abort() we roll back the statement, including
+    In select_insert::abort_result_set() we roll back the statement, including
     truncating the transaction cache of the binary log. To do this, we
     pretend that the statement is transactional, even though it might
     be the case that it was not.

=== modified file 'sql/sql_prepare.cc'
--- a/sql/sql_prepare.cc	2010-11-03 14:15:18 +0000
+++ b/sql/sql_prepare.cc	2010-11-15 15:18:04 +0000
@@ -1185,7 +1185,7 @@ static bool insert_params_from_vars_with
   uint32 length= 0;
   THD *thd= stmt->thd;
 
-  DBUG_ENTER("insert_params_from_vars");
+  DBUG_ENTER("insert_params_from_vars_with_log");
 
   if (query->copy(stmt->query(), stmt->query_length(), default_charset_info))
     DBUG_RETURN(1);
@@ -2898,8 +2898,15 @@ bool Select_fetch_protocol_binary::send_
 
 bool Select_fetch_protocol_binary::send_eof()
 {
+  /*
+    Don't send EOF if we're in error condition (which implies we've already
+    sent or are sending an error)
+  */
+  if (thd->is_error())
+    return true;
+
   ::my_eof(thd);
-  return FALSE;
+  return false;
 }
 
 

=== modified file 'sql/sql_update.cc'
--- a/sql/sql_update.cc	2010-10-07 10:01:51 +0000
+++ b/sql/sql_update.cc	2010-11-15 15:18:04 +0000
@@ -2064,7 +2064,9 @@ bool multi_update::send_eof()
      Does updates for the last n - 1 tables, returns 0 if ok;
      error takes into account killed status gained in do_updates()
   */
-  int local_error = (table_count) ? do_updates() : 0;
+  int local_error= thd->is_error();
+  if (!local_error)
+    local_error = (table_count) ? do_updates() : 0;
   /*
     if local_error is not set ON until after do_updates() then
     later carried out killing should not affect binlogging.

=== modified file 'support-files/CMakeLists.txt'
--- a/support-files/CMakeLists.txt	2010-08-12 15:19:57 +0000
+++ b/support-files/CMakeLists.txt	2010-11-13 22:16:52 +0000
@@ -61,12 +61,17 @@ IF(UNIX)
     CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${script}.sh 
                    ${CMAKE_CURRENT_BINARY_DIR}/${script} @ONLY )
 
+    IF(script MATCHES ".ini")
+      SET(comp IniFiles)
+    ELSE()
+      SET(comp Server_Scripts)
+    ENDIF()
     INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${script} 
-       DESTINATION ${inst_location}
+       DESTINATION ${inst_location} COMPONENT ${comp}
        PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
   ENDFOREACH()
   IF(INSTALL_SUPPORTFILESDIR)
-    INSTALL(FILES magic DESTINATION ${inst_location})
+    INSTALL(FILES magic DESTINATION ${inst_location} COMPONENT SupportFiles)
   ENDIF()
 
   INSTALL(FILES mysql.m4 DESTINATION ${INSTALL_SHAREDIR}/aclocal COMPONENT Development)
@@ -83,7 +88,7 @@ IF(UNIX)
   CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mysql.server.sh 
                  ${CMAKE_CURRENT_BINARY_DIR}/mysql.server @ONLY)
   INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mysql.server 
-    DESTINATION ${inst_location}
+    DESTINATION ${inst_location} COMPONENT SupportFiles
     PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ 
     GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
 ENDIF()

=== modified file 'support-files/mysql.spec.sh'
--- a/support-files/mysql.spec.sh	2010-11-02 18:54:58 +0000
+++ b/support-files/mysql.spec.sh	2010-11-12 21:22:55 +0000
@@ -335,6 +335,7 @@ For a description of MySQL see the base 
 %package -n MySQL-shared%{product_suffix}
 Summary:        MySQL - Shared libraries
 Group:          Applications/Databases
+Provides:       mysql-shared
 Obsoletes:      MySQL-shared-community
 
 %description -n MySQL-shared%{product_suffix}

=== modified file 'tests/mysql_client_test.c'
--- a/tests/mysql_client_test.c	2010-11-03 14:15:18 +0000
+++ b/tests/mysql_client_test.c	2010-11-13 15:05:02 +0000
@@ -2103,6 +2103,255 @@ static void test_wl4435_2()
 }
 
 
+#define WL4435_TEST(sql_type, sql_value, \
+                    c_api_in_type, c_api_out_type, \
+                    c_type, c_type_ext, \
+                    printf_args, assert_condition) \
+\
+  do { \
+  int rc; \
+  MYSQL_STMT *ps; \
+  MYSQL_BIND psp; \
+  MYSQL_RES *rs_metadata; \
+  MYSQL_FIELD *fields; \
+  c_type pspv c_type_ext; \
+  my_bool psp_null; \
+  \
+  bzero(&pspv, sizeof (pspv)); \
+  \
+  rc= mysql_query(mysql, "DROP PROCEDURE IF EXISTS p1"); \
+  myquery(rc); \
+  \
+  rc= mysql_query(mysql, \
+    "CREATE PROCEDURE p1(OUT v " sql_type ") SET v = " sql_value ";"); \
+  myquery(rc); \
+  \
+  ps = mysql_simple_prepare(mysql, "CALL p1(?)"); \
+  check_stmt(ps); \
+  \
+  bzero(&psp, sizeof (psp)); \
+  psp.buffer_type= c_api_in_type; \
+  psp.is_null= &psp_null; \
+  psp.buffer= (char *) &pspv; \
+  psp.buffer_length= sizeof (psp); \
+  \
+  rc= mysql_stmt_bind_param(ps, &psp); \
+  check_execute(ps, rc); \
+  \
+  rc= mysql_stmt_execute(ps); \
+  check_execute(ps, rc); \
+  \
+  DIE_UNLESS(mysql->server_status & SERVER_PS_OUT_PARAMS); \
+  DIE_UNLESS(mysql_stmt_field_count(ps) == 1); \
+  \
+  rs_metadata= mysql_stmt_result_metadata(ps); \
+  fields= mysql_fetch_fields(rs_metadata); \
+  \
+  rc= mysql_stmt_bind_result(ps, &psp); \
+  check_execute(ps, rc); \
+  \
+  rc= mysql_stmt_fetch(ps); \
+  DIE_UNLESS(rc == 0); \
+  \
+  DIE_UNLESS(fields[0].type == c_api_out_type); \
+  printf printf_args; \
+  printf("; in type: %d; out type: %d\n", \
+         (int) c_api_in_type, (int) c_api_out_type); \
+  \
+  rc= mysql_stmt_fetch(ps); \
+  DIE_UNLESS(rc == MYSQL_NO_DATA); \
+  \
+  rc= mysql_stmt_next_result(ps); \
+  DIE_UNLESS(rc == 0); \
+  \
+  mysql_stmt_free_result(ps); \
+  mysql_stmt_close(ps); \
+  \
+  DIE_UNLESS(assert_condition); \
+  \
+  } while (0)
+
+static void test_wl4435_3()
+{
+  char tmp[255];
+
+  puts("");
+
+  // The following types are not supported:
+  //   - ENUM
+  //   - SET
+  //
+  // The following types are supported but can not be used for
+  // OUT-parameters:
+  //   - MEDIUMINT;
+  //   - BIT(..);
+  //
+  // The problem is that those types are not supported for IN-parameters,
+  // and OUT-parameters should be bound as IN-parameters before execution.
+  //
+  // The following types should not be used:
+  //   - MYSQL_TYPE_YEAR (use MYSQL_TYPE_SHORT instead);
+  //   - MYSQL_TYPE_TINY_BLOB, MYSQL_TYPE_MEDIUM_BLOB, MYSQL_TYPE_LONG_BLOB
+  //     (use MYSQL_TYPE_BLOB instead);
+
+  WL4435_TEST("TINYINT", "127",
+              MYSQL_TYPE_TINY, MYSQL_TYPE_TINY,
+              char, ,
+              ("  - TINYINT / char / MYSQL_TYPE_TINY:\t\t\t %d", (int) pspv),
+              pspv == 127);
+
+  WL4435_TEST("SMALLINT", "32767",
+              MYSQL_TYPE_SHORT, MYSQL_TYPE_SHORT,
+              short, ,
+              ("  - SMALLINT / short / MYSQL_TYPE_SHORT:\t\t %d", (int) pspv),
+              pspv == 32767);
+
+  WL4435_TEST("INT", "2147483647",
+              MYSQL_TYPE_LONG, MYSQL_TYPE_LONG,
+              int, ,
+              ("  - INT / int / MYSQL_TYPE_LONG:\t\t\t %d", pspv),
+              pspv == 2147483647l);
+
+  WL4435_TEST("BIGINT", "9223372036854775807",
+              MYSQL_TYPE_LONGLONG, MYSQL_TYPE_LONGLONG,
+              long long, ,
+              ("  - BIGINT / long long / MYSQL_TYPE_LONGLONG:\t\t %lld", pspv),
+              pspv == 9223372036854775807ll);
+
+  WL4435_TEST("TIMESTAMP", "'2007-11-18 15:01:02'",
+              MYSQL_TYPE_TIMESTAMP, MYSQL_TYPE_TIMESTAMP,
+              MYSQL_TIME, ,
+              ("  - TIMESTAMP / MYSQL_TIME / MYSQL_TYPE_TIMESTAMP:\t "
+               "%.4d-%.2d-%.2d %.2d:%.2d:%.2d",
+               (int) pspv.year, (int) pspv.month, (int) pspv.day,
+               (int) pspv.hour, (int) pspv.minute, (int) pspv.second),
+              pspv.year == 2007 && pspv.month == 11 && pspv.day == 18 &&
+              pspv.hour == 15 && pspv.minute == 1 && pspv.second == 2);
+
+  WL4435_TEST("DATETIME", "'1234-11-12 12:34:59'",
+              MYSQL_TYPE_DATETIME, MYSQL_TYPE_DATETIME,
+              MYSQL_TIME, ,
+              ("  - DATETIME / MYSQL_TIME / MYSQL_TYPE_DATETIME:\t "
+               "%.4d-%.2d-%.2d %.2d:%.2d:%.2d",
+               (int) pspv.year, (int) pspv.month, (int) pspv.day,
+               (int) pspv.hour, (int) pspv.minute, (int) pspv.second),
+              pspv.year == 1234 && pspv.month == 11 && pspv.day == 12 &&
+              pspv.hour == 12 && pspv.minute == 34 && pspv.second == 59);
+
+  WL4435_TEST("TIME", "'123:45:01'",
+              MYSQL_TYPE_TIME, MYSQL_TYPE_TIME,
+              MYSQL_TIME, ,
+              ("  - TIME / MYSQL_TIME / MYSQL_TYPE_TIME:\t\t "
+               "%.3d:%.2d:%.2d",
+               (int) pspv.hour, (int) pspv.minute, (int) pspv.second),
+              pspv.hour == 123 && pspv.minute == 45 && pspv.second == 1);
+
+  WL4435_TEST("DATE", "'1234-11-12'",
+              MYSQL_TYPE_DATE, MYSQL_TYPE_DATE,
+              MYSQL_TIME, ,
+              ("  - DATE / MYSQL_TIME / MYSQL_TYPE_DATE:\t\t "
+               "%.4d-%.2d-%.2d",
+               (int) pspv.year, (int) pspv.month, (int) pspv.day),
+              pspv.year == 1234 && pspv.month == 11 && pspv.day == 12);
+
+  WL4435_TEST("YEAR", "'2010'",
+              MYSQL_TYPE_SHORT, MYSQL_TYPE_YEAR,
+              short, ,
+              ("  - YEAR / short / MYSQL_TYPE_SHORT:\t\t\t %.4d", (int) pspv),
+              pspv == 2010);
+
+  WL4435_TEST("FLOAT(7, 4)", "123.4567",
+              MYSQL_TYPE_FLOAT, MYSQL_TYPE_FLOAT,
+              float, ,
+              ("  - FLOAT / float / MYSQL_TYPE_FLOAT:\t\t\t %g", (double) pspv),
+              pspv - 123.4567 < 0.0001);
+
+  WL4435_TEST("DOUBLE(8, 5)", "123.45678",
+              MYSQL_TYPE_DOUBLE, MYSQL_TYPE_DOUBLE,
+              double, ,
+              ("  - DOUBLE / double / MYSQL_TYPE_DOUBLE:\t\t %g", (double) pspv),
+              pspv - 123.45678 < 0.00001);
+
+  WL4435_TEST("DECIMAL(9, 6)", "123.456789",
+              MYSQL_TYPE_NEWDECIMAL, MYSQL_TYPE_NEWDECIMAL,
+              char, [255],
+              ("  - DECIMAL / char[] / MYSQL_TYPE_NEWDECIMAL:\t\t '%s'", (char *) pspv),
+              !strcmp(pspv, "123.456789"));
+
+  WL4435_TEST("CHAR(32)", "REPEAT('C', 16)",
+              MYSQL_TYPE_STRING, MYSQL_TYPE_STRING,
+              char, [255],
+              ("  - CHAR(32) / char[] / MYSQL_TYPE_STRING:\t\t '%s'", (char *) pspv),
+              !strcmp(pspv, "CCCCCCCCCCCCCCCC"));
+
+  WL4435_TEST("VARCHAR(32)", "REPEAT('V', 16)",
+              MYSQL_TYPE_VAR_STRING, MYSQL_TYPE_VAR_STRING,
+              char, [255],
+              ("  - VARCHAR(32) / char[] / MYSQL_TYPE_VAR_STRING:\t '%s'", (char *) pspv),
+              !strcmp(pspv, "VVVVVVVVVVVVVVVV"));
+
+  WL4435_TEST("TINYTEXT", "REPEAT('t', 16)",
+              MYSQL_TYPE_TINY_BLOB, MYSQL_TYPE_BLOB,
+              char, [255],
+              ("  - TINYTEXT / char[] / MYSQL_TYPE_TINY_BLOB:\t\t '%s'", (char *) pspv),
+              !strcmp(pspv, "tttttttttttttttt"));
+
+  WL4435_TEST("TEXT", "REPEAT('t', 16)",
+              MYSQL_TYPE_BLOB, MYSQL_TYPE_BLOB,
+              char, [255],
+              ("  - TEXT / char[] / MYSQL_TYPE_BLOB:\t\t\t '%s'", (char *) pspv),
+              !strcmp(pspv, "tttttttttttttttt"));
+
+  WL4435_TEST("MEDIUMTEXT", "REPEAT('t', 16)",
+              MYSQL_TYPE_MEDIUM_BLOB, MYSQL_TYPE_BLOB,
+              char, [255],
+              ("  - MEDIUMTEXT / char[] / MYSQL_TYPE_MEDIUM_BLOB:\t '%s'", (char *) pspv),
+              !strcmp(pspv, "tttttttttttttttt"));
+
+  WL4435_TEST("LONGTEXT", "REPEAT('t', 16)",
+              MYSQL_TYPE_LONG_BLOB, MYSQL_TYPE_BLOB,
+              char, [255],
+              ("  - LONGTEXT / char[] / MYSQL_TYPE_LONG_BLOB:\t\t '%s'", (char *) pspv),
+              !strcmp(pspv, "tttttttttttttttt"));
+
+  WL4435_TEST("BINARY(32)", "REPEAT('\1', 16)",
+              MYSQL_TYPE_STRING, MYSQL_TYPE_STRING,
+              char, [255],
+              ("  - BINARY(32) / char[] / MYSQL_TYPE_STRING:\t\t '%s'", (char *) pspv),
+              memset(tmp, 1, 16) && !memcmp(tmp, pspv, 16));
+
+  WL4435_TEST("VARBINARY(32)", "REPEAT('\1', 16)",
+              MYSQL_TYPE_VAR_STRING, MYSQL_TYPE_VAR_STRING,
+              char, [255],
+              ("  - VARBINARY(32) / char[] / MYSQL_TYPE_VAR_STRING:\t '%s'", (char *) pspv),
+              memset(tmp, 1, 16) && !memcmp(tmp, pspv, 16));
+
+  WL4435_TEST("TINYBLOB", "REPEAT('\2', 16)",
+              MYSQL_TYPE_TINY_BLOB, MYSQL_TYPE_BLOB,
+              char, [255],
+              ("  - TINYBLOB / char[] / MYSQL_TYPE_TINY_BLOB:\t\t '%s'", (char *) pspv),
+              memset(tmp, 2, 16) && !memcmp(tmp, pspv, 16));
+
+  WL4435_TEST("BLOB", "REPEAT('\2', 16)",
+              MYSQL_TYPE_BLOB, MYSQL_TYPE_BLOB,
+              char, [255],
+              ("  - BLOB / char[] / MYSQL_TYPE_BLOB:\t\t\t '%s'", (char *) pspv),
+              memset(tmp, 2, 16) && !memcmp(tmp, pspv, 16));
+
+  WL4435_TEST("MEDIUMBLOB", "REPEAT('\2', 16)",
+              MYSQL_TYPE_MEDIUM_BLOB, MYSQL_TYPE_BLOB,
+              char, [255],
+              ("  - MEDIUMBLOB / char[] / MYSQL_TYPE_MEDIUM_BLOB:\t '%s'", (char *) pspv),
+              memset(tmp, 2, 16) && !memcmp(tmp, pspv, 16));
+
+  WL4435_TEST("LONGBLOB", "REPEAT('\2', 16)",
+              MYSQL_TYPE_LONG_BLOB, MYSQL_TYPE_BLOB,
+              char, [255],
+              ("  - LONGBLOB / char[] / MYSQL_TYPE_LONG_BLOB:\t\t '%s'", (char *) pspv),
+              memset(tmp, 2, 16) && !memcmp(tmp, pspv, 16));
+}
+
+
 /* Test simple prepare field results */
 
 static void test_prepare_field_result()
@@ -19468,6 +19717,7 @@ static struct my_tests_st my_tests[]= {
   { "test_wl4284_1", test_wl4284_1 },
   { "test_wl4435",   test_wl4435 },
   { "test_wl4435_2", test_wl4435_2 },
+  { "test_wl4435_3", test_wl4435_3 },
   { "test_bug38486", test_bug38486 },
   { "test_bug33831", test_bug33831 },
   { "test_bug40365", test_bug40365 },

=== modified file 'win/README'
--- a/win/README	2010-11-04 10:11:43 +0000
+++ b/win/README	2010-11-11 12:32:12 +0000
@@ -1,114 +1,8 @@
 Windows building readme
 ======================================
 
-----------------IMPORTANT----------------------------
-This readme outlines the instructions for building 
-MySQL for Windows staring from version 5.1.
-This readme does not apply to MySQL versions 5.0 
-or ealier.
------------------------------------------------------
-
 The Windows build system uses a tool named CMake to generate build files for
 a variety of project systems.  This tool is combined with a set of jscript
 files to enable building of MySQL for Windows directly out of a bzr clone.
-For relevant information, please refer to http://forge.mysql.com/wiki/CMake
-The steps required are below.
-
-Step 1:
--------
-
-Install a Windows C++ compiler.  If you don't have one, you can use
-the free compiler "Visual C++ 2005 express edition", which from Cmake
-point of view is same as Visual studio 8:
-http://msdn.microsoft.com/vstudio/express/
-
-Step 2
-------
-Download and install CMake.  It can be downloaded from http://www.cmake.org. 
-Once it is installed, modify your path to make sure you can execute
-the cmake binary.
-
-Step 3
-------
-Download and install bison for Windows.  It can be downloaded from
-http://gnuwin32.sourceforge.net/packages/bison.htm.  Please download using
-the link named "Complete package, excluding sources".  This includes an
-installer that will install bison.  After the installer finishes, modify
-your path so that you can execute bison.
-
-(As an alternative you can take the sql_yacc.yy and sql_yacc.h files from a
-matching mysql tar distribution and drop them into the sql directory just
-before you start the build)
-
-Step 4
-------
-One of the nice CMake features is "out-of-source" build support, which 
-means not building in the source directory, but in dedicated build 
-directory. This keeps the source directory clean and allows for more than 
-single build tree for the same source tree (e.g debug and release, 32 and 
-64 bit etc). We'll create subdirectory "bld" in the source directory for 
-this purpose. Clone your bzr tree to any location you like.
-
-Step 5
-------
-From the root of your installation directory use cmake . -L to see the 
-various configuration parameters.
-
-So the command line could look like:
-
-cmake .. -G "target" -DWITH_INNOBASE_STORAGE_ENGINE=1
-
-The recommended way of configuring would be to use -DBUILD_CONFIG=mysql_release
-to build binaries exactly the same as the official MySQL releases. 
-
-Step 6
-------
-
-From the root of your installation directory/bzr clone, you can
-use cmake to compile the sources.  Use cmake --help when necessary.
-Before you start building the sources, please remove the old build area
-created from an earlier run and start afresh.
-
-C:\> del bld 
-C:\> md bld 
-C:\> cd  bld 
-C:\> cmake .. -G "target name" -DBUILD_CONFIG=mysql_release
-
-
-For Example:
-To generate the Win64 project files using Visual Studio 9, you would run
-cmake .. -G "Visual Studio 9 2008 Win64" 
-
-Other target names supported using CMake 2.6 patch 4 are:
-
-  Visual Studio 7              "Visual Studio 7 .NET 2003"
-  Visual Studio 8              "Visual Studio 8 2005"
-  Visual Studio 8 (64 bit)     "Visual Studio 8 2005 Win64"
-  Visual Studio 9              "Visual Studio 9 2008"
-  Visual Studio 9 (64 bit)     "Visual Studio 9 2008 Win64"
-
-For generating project files using Visual Studio 10, you need CMake 2.8
-or higher and corresponding target names are
-  Visual Studio 10              "Visual Studio 10" 
-  Visual Studio 10 (64 bit)     "Visual Studio 10 Win64" 
- 
-Step 7
-------
-From the root of your bzr clone, start your build.
-
-For Visual Studio, execute mysql.sln.  This will start the IDE
-and you can click the build solution menu option.
-
-Alternatively, you could start the build from command line as follows
-
-devenv mysql.sln /build relwithdebinfo
- 
-Current issues
---------------
-1. After changing configuration (eg. adding or removing a storage engine), it
-may be necessary to clean the build tree to remove any stale objects.
-
-2. To use Visual C++ Express Edition you also need to install the Platform SDK.
-Please see this link: http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
-At step 5 you only need to add the libraries advapi32.lib and user32.lib to
-the file "corewin_express.vsprops" in order to avoid link errors.
+For relevant information and/or for building binaries from source distribution, 
+please refer to http://forge.mysql.com/wiki/CMake

No bundle (reason: revision is a merge).
Thread
bzr commit into mysql-5.5-bugteam branch (marc.alff:3121) Marc Alff16 Nov