List:Commits« Previous MessageNext Message »
From:Marc Alff Date:January 23 2012 3:46pm
Subject:bzr push into mysql-trunk-wl5259 branch (marc.alff:3357 to 3358)
View as plain text  
 3358 Marc Alff	2012-01-23 [merge]
      Merge mysql-trunk --> mysql-trunk-wl5259

    modified:
      cmake/build_configurations/mysql_release.cmake
      include/m_ctype.h
      mysql-test/include/have_example_plugin.inc
      mysql-test/include/have_semisync_plugin.inc
      mysql-test/include/have_simple_parser.inc
      mysql-test/include/have_udf.inc
      mysql-test/r/ctype_utf8.result
      mysql-test/r/partition_binlog_stmt.result
      mysql-test/r/partition_explicit_prune.result
      mysql-test/r/xa.result
      mysql-test/suite/parts/r/partition-dml-1-9-innodb.result
      mysql-test/suite/parts/r/partition-dml-1-9-myisam.result
      mysql-test/suite/perfschema/r/pfs_upgrade.result
      mysql-test/suite/perfschema/r/schema.result
      mysql-test/suite/perfschema/r/table_schema.result
      mysql-test/suite/rpl/r/rpl_log_pos.result
      mysql-test/suite/rpl/r/rpl_manual_change_index_file.result
      mysql-test/suite/rpl/r/rpl_packet.result
      mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result
      mysql-test/t/ctype_utf8.test
      mysql-test/t/partition_binlog_stmt.test
      mysql-test/t/partition_explicit_prune.test
      mysql-test/t/udf_skip_grants-master.opt
      mysql-test/t/xa.test
      mysys/charset-def.c
      sql/rpl_master.cc
      sql/sql_lex.cc
      storage/innobase/dict/dict0load.cc
      storage/innobase/handler/ha_innodb.cc
      storage/innobase/os/os0file.cc
      storage/innobase/trx/trx0trx.cc
      storage/innobase/ut/ut0crc32.cc
      strings/ctype-ucs2.c
      strings/ctype-utf8.c
 3357 Marc Alff	2012-01-20
      Added time columns

    modified:
      mysql-test/suite/perfschema/include/hostcache_dump.inc
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_again_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_bad_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_good_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_addrinfo_noname_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_format.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_again_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv4_nameinfo_noname_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_again_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_bad_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_allow.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_good_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_addrinfo_noname_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_again_deny.result
      mysql-test/suite/perfschema/r/hostcache_ipv6_nameinfo_noname_deny.result
      mysql-test/suite/perfschema/r/hostcache_peer_addr.result
      scripts/mysql_system_tables.sql
      sql/hostname.cc
      sql/hostname.h
      storage/perfschema/pfs_engine_table.cc
      storage/perfschema/pfs_engine_table.h
      storage/perfschema/table_host_cache.cc
      storage/perfschema/table_host_cache.h
=== modified file 'cmake/build_configurations/mysql_release.cmake'
--- a/cmake/build_configurations/mysql_release.cmake	2011-12-08 20:30:18 +0000
+++ b/cmake/build_configurations/mysql_release.cmake	2012-01-20 19:32:00 +0000
@@ -149,11 +149,19 @@ IF(UNIX)
   # Default GCC flags
   IF(CMAKE_COMPILER_IS_GNUCC)
     SET(COMMON_C_FLAGS               "-g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing")
+    # Disable inline optimizations for valgrind testing to avoid false positives
+    IF(WITH_VALGRIND)
+      SET(COMMON_C_FLAGS             "-fno-inline ${COMMON_C_FLAGS}")
+    ENDIF()
     SET(CMAKE_C_FLAGS_DEBUG          "-O ${COMMON_C_FLAGS}")
     SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_C_FLAGS}")
   ENDIF()
   IF(CMAKE_COMPILER_IS_GNUCXX)
     SET(COMMON_CXX_FLAGS               "-g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing")
+    # Disable inline optimizations for valgrind testing to avoid false positives
+    IF(WITH_VALGRIND)
+      SET(COMMON_CXX_FLAGS             "-fno-inline ${COMMON_CXX_FLAGS}")
+    ENDIF()
     SET(CMAKE_CXX_FLAGS_DEBUG          "-O ${COMMON_CXX_FLAGS}")
     SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_CXX_FLAGS}")
   ENDIF()
@@ -166,7 +174,7 @@ IF(UNIX)
         SET(COMMON_CXX_FLAGS               "+DSitanium2 -mt -Aa")
         SET(CMAKE_C_FLAGS_DEBUG            "+O0 -g ${COMMON_C_FLAGS}")
         SET(CMAKE_CXX_FLAGS_DEBUG          "+O0 -g ${COMMON_CXX_FLAGS}")
-	# We have seen compiler bugs with optimisation and -g, so disabled for now
+        # We have seen compiler bugs with optimisation and -g, so disabled for now
         SET(CMAKE_C_FLAGS_RELWITHDEBINFO   "+O2 ${COMMON_C_FLAGS}")
         SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "+O2 ${COMMON_CXX_FLAGS}")
       ENDIF()

=== modified file 'include/m_ctype.h'
--- a/include/m_ctype.h	2011-06-30 15:50:45 +0000
+++ b/include/m_ctype.h	2012-01-23 10:02:54 +0000
@@ -73,6 +73,7 @@ typedef struct unicase_info_st
 
 extern MY_UNICASE_INFO my_unicase_default;
 extern MY_UNICASE_INFO my_unicase_turkish;
+extern MY_UNICASE_INFO my_unicase_mysql500;
 extern MY_UNICASE_INFO my_unicase_unicode520;
 
 #define MY_UCA_MAX_CONTRACTION 6
@@ -454,6 +455,7 @@ extern CHARSET_INFO my_charset_tis620_bi
 extern CHARSET_INFO my_charset_ucs2_general_ci;
 extern CHARSET_INFO my_charset_ucs2_bin;
 extern CHARSET_INFO my_charset_ucs2_unicode_ci;
+extern CHARSET_INFO my_charset_ucs2_general_mysql500_ci;
 extern CHARSET_INFO my_charset_ujis_japanese_ci;
 extern CHARSET_INFO my_charset_ujis_bin;
 extern CHARSET_INFO my_charset_utf16_bin;
@@ -469,6 +471,7 @@ extern MYSQL_PLUGIN_IMPORT CHARSET_INFO
 extern CHARSET_INFO my_charset_utf8_tolower_ci;
 extern CHARSET_INFO my_charset_utf8_unicode_ci;
 extern CHARSET_INFO my_charset_utf8_bin;
+extern CHARSET_INFO my_charset_utf8_general_mysql500_ci;
 extern CHARSET_INFO my_charset_utf8mb4_bin;
 extern CHARSET_INFO my_charset_utf8mb4_general_ci;
 extern CHARSET_INFO my_charset_utf8mb4_unicode_ci;

=== modified file 'mysql-test/include/have_example_plugin.inc'
--- a/mysql-test/include/have_example_plugin.inc	2010-11-17 10:16:13 +0000
+++ b/mysql-test/include/have_example_plugin.inc	2012-01-20 11:35:48 +0000
@@ -15,7 +15,7 @@ if (!$EXAMPLE_PLUGIN) {
 #
 # Check if --plugin-dir was setup for exampledb
 #
-if (`SELECT CONCAT('--plugin-dir=', @@plugin_dir) != '$EXAMPLE_PLUGIN_OPT'`) {
+if (`SELECT CONCAT('--plugin-dir=', REPLACE(@@plugin_dir, '\\\\', '/')) != '$EXAMPLE_PLUGIN_OPT/'`) {
   --skip Example plugin requires that --plugin-dir is set to the example plugin dir (either the .opt file does not contain \$EXAMPLE_PLUGIN_OPT or another plugin is in use)
 }
 enable_query_log;

=== modified file 'mysql-test/include/have_semisync_plugin.inc'
--- a/mysql-test/include/have_semisync_plugin.inc	2010-11-17 10:16:13 +0000
+++ b/mysql-test/include/have_semisync_plugin.inc	2012-01-20 11:35:48 +0000
@@ -16,6 +16,6 @@ if (!$SEMISYNC_MASTER_PLUGIN)
 #
 # Check if --plugin-dir was setup for semisync
 #
-if (`SELECT CONCAT('--plugin-dir=', @@plugin_dir) != '$SEMISYNC_PLUGIN_OPT'`) {
+if (`SELECT CONCAT('--plugin-dir=', REPLACE(@@plugin_dir, '\\\\', '/')) != '$SEMISYNC_PLUGIN_OPT/'`) {
   --skip SEMISYNC plugin requires that --plugin-dir is set to the semisync plugin dir (either the .opt file does not contain \$SEMISYNC_PLUGIN_OPT or another plugin is in use)
 }

=== modified file 'mysql-test/include/have_simple_parser.inc'
--- a/mysql-test/include/have_simple_parser.inc	2010-11-17 10:16:13 +0000
+++ b/mysql-test/include/have_simple_parser.inc	2012-01-20 11:35:48 +0000
@@ -15,6 +15,6 @@ if (!$SIMPLE_PARSER) {
 #
 # Check if --plugin-dir was setup for simple parser
 #
-if (`SELECT CONCAT('--plugin-dir=', @@plugin_dir) != '$SIMPLE_PARSER_OPT'`) {
+if (`SELECT CONCAT('--plugin-dir=', REPLACE(@@plugin_dir, '\\\\', '/')) != '$SIMPLE_PARSER_OPT/'`) {
   --skip simple parser requires that --plugin-dir is set to the udf plugin dir (either the .opt file does not contain \$UDF_EXAMPLE_LIB_OPT or another plugin is in use)
 }

=== modified file 'mysql-test/include/have_udf.inc'
--- a/mysql-test/include/have_udf.inc	2010-11-17 10:16:13 +0000
+++ b/mysql-test/include/have_udf.inc	2012-01-20 11:35:48 +0000
@@ -15,6 +15,6 @@ if (!$UDF_EXAMPLE_LIB) {
 #
 # Check if --plugin-dir was setup for udf
 #
-if (`SELECT CONCAT('--plugin-dir=', @@plugin_dir) != '$UDF_EXAMPLE_LIB_OPT'`) {
+if (`SELECT CONCAT('--plugin-dir=', REPLACE(@@plugin_dir, '\\\\', '/')) != '$UDF_EXAMPLE_LIB_OPT/'`) {
   --skip UDF requires that --plugin-dir is set to the udf plugin dir (either the .opt file does not contain \$UDF_EXAMPLE_LIB_OPT or another plugin is in use)
 }

=== modified file 'mysql-test/r/ctype_utf8.result'
--- a/mysql-test/r/ctype_utf8.result	2011-11-01 11:52:24 +0000
+++ b/mysql-test/r/ctype_utf8.result	2012-01-23 10:02:54 +0000
@@ -2019,6 +2019,30 @@ D120
 SELECT HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20));
 HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20))
 D120D18E
+#
+# Bug#11752408 - 43593: DUMP/BACKUP/RESTORE/UPGRADE TOOLS FAILS BECAUSE OF UTF8_GENERAL_CI
+#
+CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_general_mysql500_ci);
+INSERT INTO t1 VALUES ('a'),('r'),('s'),(_latin1 0xDF),(_latin1 0xF7),('t'),('z');
+SELECT * FROM t1 ORDER BY a;
+a
+a
+r
+s
+t
+z
+ß
+÷
+SELECT a, COUNT(*) FROM t1 GROUP BY a;
+a	COUNT(*)
+a	1
+r	1
+s	1
+t	1
+z	1
+ß	1
+
 SET NAMES utf8mb3;

=== modified file 'mysql-test/r/partition_binlog_stmt.result'
--- a/mysql-test/r/partition_binlog_stmt.result	2010-10-01 12:16:00 +0000
+++ b/mysql-test/r/partition_binlog_stmt.result	2012-01-20 13:19:39 +0000
@@ -8,6 +8,6 @@ name TINYBLOB NOT NULL,
 modified TIMESTAMP DEFAULT '0000-00-00 00:00:00',
 INDEX namelocs (name(255))) ENGINE = MyISAM
 PARTITION BY HASH(id) PARTITIONS 2;
-LOAD DATA LOCAL INFILE 'init_file.txt'
+LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/init_file.txt'
 INTO TABLE t1 (name);
 DROP TABLE t1;

=== modified file 'mysql-test/r/partition_explicit_prune.result'
--- a/mysql-test/r/partition_explicit_prune.result	2011-12-14 05:03:54 +0000
+++ b/mysql-test/r/partition_explicit_prune.result	2012-01-21 00:47:05 +0000
@@ -1,3 +1,182 @@
+#
+# Bug#13559657: PARTITION SELECTION DOES NOT WORK WITH VIEWS
+#
+CREATE TABLE t1 (a int)
+ENGINE = InnoDB
+PARTITION BY HASH (a) PARTITIONS 2;
+INSERT INTO t1 VALUES (0), (1), (2), (3);
+CREATE VIEW v1 AS SELECT a FROM t1 PARTITION (p0);
+SHOW CREATE VIEW v1;
+View	Create View	character_set_client	collation_connection
+v1	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` PARTITION (`p0`)	latin1	latin1_swedish_ci
+FLUSH STATUS;
+SELECT * FROM v1;
+a
+0
+2
+SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
+WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
+VARIABLE_NAME	VARIABLE_VALUE
+HANDLER_COMMIT	1
+HANDLER_EXTERNAL_LOCK	4
+HANDLER_READ_FIRST	1
+HANDLER_READ_KEY	1
+HANDLER_READ_RND_NEXT	3
+HANDLER_WRITE	17
+# 4 locks (1 table, 1 partition lock/unlock)
+FLUSH STATUS;
+SELECT a FROM t1 PARTITION (p0);
+a
+0
+2
+SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
+WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
+VARIABLE_NAME	VARIABLE_VALUE
+HANDLER_COMMIT	1
+HANDLER_EXTERNAL_LOCK	4
+HANDLER_READ_FIRST	1
+HANDLER_READ_KEY	1
+HANDLER_READ_RND_NEXT	3
+HANDLER_WRITE	17
+# 4 locks (1 table, 1 partition lock/unlock)
+FLUSH STATUS;
+INSERT INTO v1 VALUES (10);
+SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
+WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
+VARIABLE_NAME	VARIABLE_VALUE
+HANDLER_COMMIT	1
+HANDLER_EXTERNAL_LOCK	4
+HANDLER_WRITE	18
+# 4 locks (1 table, 1 partition lock/unlock)
+FLUSH STATUS;
+INSERT INTO v1 VALUES (11);
+ERROR HY000: Found a row not matching the given partition set
+SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
+WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
+VARIABLE_NAME	VARIABLE_VALUE
+HANDLER_EXTERNAL_LOCK	4
+HANDLER_ROLLBACK	1
+HANDLER_WRITE	17
+# 4 locks (1 table, 1 partition lock/unlock)
+FLUSH STATUS;
+SELECT * FROM v1;
+a
+0
+10
+2
+SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
+WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
+VARIABLE_NAME	VARIABLE_VALUE
+HANDLER_COMMIT	1
+HANDLER_EXTERNAL_LOCK	4
+HANDLER_READ_FIRST	1
+HANDLER_READ_KEY	1
+HANDLER_READ_RND_NEXT	4
+HANDLER_WRITE	17
+# 4 locks (1 table, 1 partition lock/unlock)
+FLUSH STATUS;
+SELECT a FROM t1 PARTITION (p0);
+a
+0
+10
+2
+SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
+WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
+VARIABLE_NAME	VARIABLE_VALUE
+HANDLER_COMMIT	1
+HANDLER_EXTERNAL_LOCK	4
+HANDLER_READ_FIRST	1
+HANDLER_READ_KEY	1
+HANDLER_READ_RND_NEXT	4
+HANDLER_WRITE	17
+# 4 locks (1 table, 1 partition lock/unlock)
+SELECT * FROM t1;
+a
+0
+1
+10
+2
+3
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT a FROM t1 PARTITION (p0) WITH CHECK OPTION;
+FLUSH STATUS;
+INSERT INTO v1 VALUES (20);
+SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
+WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
+VARIABLE_NAME	VARIABLE_VALUE
+HANDLER_COMMIT	1
+HANDLER_EXTERNAL_LOCK	4
+HANDLER_WRITE	18
+# 4 locks (1 table, 1 partition lock/unlock)
+FLUSH STATUS;
+INSERT INTO v1 VALUES (21);
+ERROR HY000: Found a row not matching the given partition set
+SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
+WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
+VARIABLE_NAME	VARIABLE_VALUE
+HANDLER_EXTERNAL_LOCK	4
+HANDLER_ROLLBACK	1
+HANDLER_WRITE	17
+# 4 locks (1 table, 1 partition lock/unlock)
+SELECT * FROM v1;
+a
+0
+10
+2
+20
+SELECT * FROM t1;
+a
+0
+1
+10
+2
+20
+3
+DROP VIEW v1;
+CREATE VIEW v1 AS
+SELECT a FROM t1 PARTITION (p0) WHERE a = 30 WITH CHECK OPTION;
+FLUSH STATUS;
+INSERT INTO v1 VALUES (30);
+SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
+WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
+VARIABLE_NAME	VARIABLE_VALUE
+HANDLER_COMMIT	1
+HANDLER_EXTERNAL_LOCK	4
+HANDLER_WRITE	18
+# 4 locks (1 table, 1 partition lock/unlock)
+FLUSH STATUS;
+INSERT INTO v1 VALUES (31);
+ERROR HY000: CHECK OPTION failed 'test.v1'
+SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
+WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
+VARIABLE_NAME	VARIABLE_VALUE
+HANDLER_EXTERNAL_LOCK	4
+HANDLER_ROLLBACK	1
+HANDLER_WRITE	17
+FLUSH STATUS;
+INSERT INTO v1 VALUES (32);
+ERROR HY000: CHECK OPTION failed 'test.v1'
+SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
+WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
+VARIABLE_NAME	VARIABLE_VALUE
+HANDLER_EXTERNAL_LOCK	4
+HANDLER_ROLLBACK	1
+HANDLER_WRITE	17
+# 4 locks (1 table, 1 partition lock/unlock)
+SELECT * FROM v1;
+a
+30
+SELECT * FROM t1;
+a
+0
+1
+10
+2
+20
+3
+30
+DROP VIEW v1;
+DROP TABLE t1;
 # Original tests for WL#5217
 # Must have InnoDB as engine to get the same statistics results.
 # embedded uses MyISAM as default. CREATE SELECT uses the default engine.

=== modified file 'mysql-test/r/xa.result'
--- a/mysql-test/r/xa.result	2011-12-22 10:38:23 +0000
+++ b/mysql-test/r/xa.result	2012-01-20 10:07:05 +0000
@@ -217,12 +217,14 @@ INSERT INTO t2 SELECT a FROM t1;
 # Connection default
 # Waiting until INSERT ... is blocked
 DELETE FROM t1;
-COMMIT;
 # Connection con2
 # Reaping: INSERT INTO t2 SELECT a FROM t1
 ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
 XA COMMIT 'xid1';
 ERROR XA102: XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected
+# Connection default
+COMMIT;
+# Connection con2
 XA START 'xid1';
 XA END 'xid1';
 XA PREPARE 'xid1';

=== modified file 'mysql-test/suite/parts/r/partition-dml-1-9-innodb.result'
--- a/mysql-test/suite/parts/r/partition-dml-1-9-innodb.result	2011-03-24 13:10:37 +0000
+++ b/mysql-test/suite/parts/r/partition-dml-1-9-innodb.result	2012-01-20 14:44:16 +0000
@@ -126,10 +126,6 @@ SELECT t1.a, t2.b FROM t1 PARTITION (`p0
 WHERE t1.a = t2.a;
 SELECT * FROM v1;
 a	b
--3	(pNeg-)subp0
--4	(pNeg-)subp0
--1	(pNeg-)subp0
--2	(pNeg-)subp0
 3	(p0-29-)subp3
 21	(p0-29-)subp5
 24	(p0-29-)subp5
@@ -138,26 +134,6 @@ a	b
 22	(p0-29-)subp5
 2	(p0-29-)subp3
 23	(p0-29-)subp5
-33	(p30-299-)subp6
-231	(p30-299-)subp8
-234	(p30-299-)subp8
-31	(p30-299-)subp6
-34	(p30-299-)subp6
-232	(p30-299-)subp8
-32	(p30-299-)subp6
-233	(p30-299-)subp8
-303	(p300-2999-)subp8
-301	(p300-2999-)subp8
-304	(p300-2999-)subp8
-302	(p300-2999-)subp8
-3003	(p3000-299999-)subp12
-299997	(p3000-299999-)subp14
-3001	(p3000-299999-)subp12
-3004	(p3000-299999-)subp12
-299998	(p3000-299999-)subp14
-3002	(p3000-299999-)subp12
-299996	(p3000-299999-)subp14
-299999	(p3000-299999-)subp14
 SELECT * FROM t1 PARTITION (`p0-29`);
 a	b
 1	(p0-29-)subp3

=== modified file 'mysql-test/suite/parts/r/partition-dml-1-9-myisam.result'
--- a/mysql-test/suite/parts/r/partition-dml-1-9-myisam.result	2011-03-24 13:10:37 +0000
+++ b/mysql-test/suite/parts/r/partition-dml-1-9-myisam.result	2012-01-20 14:44:16 +0000
@@ -126,10 +126,6 @@ SELECT t1.a, t2.b FROM t1 PARTITION (`p0
 WHERE t1.a = t2.a;
 SELECT * FROM v1;
 a	b
--3	(pNeg-)subp0
--4	(pNeg-)subp0
--1	(pNeg-)subp0
--2	(pNeg-)subp0
 3	(p0-29-)subp3
 21	(p0-29-)subp5
 24	(p0-29-)subp5
@@ -138,26 +134,6 @@ a	b
 22	(p0-29-)subp5
 2	(p0-29-)subp3
 23	(p0-29-)subp5
-33	(p30-299-)subp6
-231	(p30-299-)subp8
-234	(p30-299-)subp8
-31	(p30-299-)subp6
-34	(p30-299-)subp6
-232	(p30-299-)subp8
-32	(p30-299-)subp6
-233	(p30-299-)subp8
-303	(p300-2999-)subp8
-301	(p300-2999-)subp8
-304	(p300-2999-)subp8
-302	(p300-2999-)subp8
-3003	(p3000-299999-)subp12
-299997	(p3000-299999-)subp14
-3001	(p3000-299999-)subp12
-3004	(p3000-299999-)subp12
-299998	(p3000-299999-)subp14
-3002	(p3000-299999-)subp12
-299996	(p3000-299999-)subp14
-299999	(p3000-299999-)subp14
 SELECT * FROM t1 PARTITION (`p0-29`);
 a	b
 1	(p0-29-)subp3

=== modified file 'mysql-test/suite/perfschema/r/pfs_upgrade.result'
--- a/mysql-test/suite/perfschema/r/pfs_upgrade.result	2012-01-13 10:54:10 +0000
+++ b/mysql-test/suite/perfschema/r/pfs_upgrade.result	2012-01-23 15:45:22 +0000
@@ -26,40 +26,40 @@ ERROR 1050 (42S01) at line 322: Table 'f
 ERROR 1050 (42S01) at line 335: Table 'socket_instances' already exists
 ERROR 1050 (42S01) at line 365: Table 'socket_summary_by_instance' already exists
 ERROR 1050 (42S01) at line 394: Table 'socket_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line 416: Table 'host_cache' already exists
-ERROR 1050 (42S01) at line 425: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line 439: Table 'objects_summary_global_by_type' already exists
-ERROR 1050 (42S01) at line 449: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line 459: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line 468: Table 'setup_actors' already exists
-ERROR 1050 (42S01) at line 476: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line 485: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line 496: Table 'setup_objects' already exists
-ERROR 1050 (42S01) at line 504: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line 549: Table 'table_io_waits_summary_by_index_usage' already exists
-ERROR 1050 (42S01) at line 593: Table 'table_io_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 672: Table 'table_lock_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 692: Table 'threads' already exists
-ERROR 1050 (42S01) at line 708: Table 'events_stages_current' already exists
-ERROR 1050 (42S01) at line 724: Table 'events_stages_history' already exists
-ERROR 1050 (42S01) at line 740: Table 'events_stages_history_long' already exists
-ERROR 1050 (42S01) at line 753: Table 'events_stages_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 766: Table 'events_stages_summary_by_host_by_event_name' already exists
-ERROR 1050 (42S01) at line 779: Table 'events_stages_summary_by_user_by_event_name' already exists
-ERROR 1050 (42S01) at line 793: Table 'events_stages_summary_by_account_by_event_name' already exists
-ERROR 1050 (42S01) at line 805: Table 'events_stages_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 849: Table 'events_statements_current' already exists
-ERROR 1050 (42S01) at line 893: Table 'events_statements_history' already exists
-ERROR 1050 (42S01) at line 937: Table 'events_statements_history_long' already exists
-ERROR 1050 (42S01) at line 969: Table 'events_statements_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 1001: Table 'events_statements_summary_by_host_by_event_name' already exists
-ERROR 1050 (42S01) at line 1033: Table 'events_statements_summary_by_user_by_event_name' already exists
-ERROR 1050 (42S01) at line 1066: Table 'events_statements_summary_by_account_by_event_name' already exists
-ERROR 1050 (42S01) at line 1097: Table 'events_statements_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 1106: Table 'hosts' already exists
-ERROR 1050 (42S01) at line 1115: Table 'users' already exists
-ERROR 1050 (42S01) at line 1125: Table 'accounts' already exists
-ERROR 1644 (HY000) at line 1545: Unexpected content found in the performance_schema database.
+ERROR 1050 (42S01) at line 420: Table 'host_cache' already exists
+ERROR 1050 (42S01) at line 429: Table 'mutex_instances' already exists
+ERROR 1050 (42S01) at line 443: Table 'objects_summary_global_by_type' already exists
+ERROR 1050 (42S01) at line 453: Table 'performance_timers' already exists
+ERROR 1050 (42S01) at line 463: Table 'rwlock_instances' already exists
+ERROR 1050 (42S01) at line 472: Table 'setup_actors' already exists
+ERROR 1050 (42S01) at line 480: Table 'setup_consumers' already exists
+ERROR 1050 (42S01) at line 489: Table 'setup_instruments' already exists
+ERROR 1050 (42S01) at line 500: Table 'setup_objects' already exists
+ERROR 1050 (42S01) at line 508: Table 'setup_timers' already exists
+ERROR 1050 (42S01) at line 553: Table 'table_io_waits_summary_by_index_usage' already exists
+ERROR 1050 (42S01) at line 597: Table 'table_io_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 676: Table 'table_lock_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 696: Table 'threads' already exists
+ERROR 1050 (42S01) at line 712: Table 'events_stages_current' already exists
+ERROR 1050 (42S01) at line 728: Table 'events_stages_history' already exists
+ERROR 1050 (42S01) at line 744: Table 'events_stages_history_long' already exists
+ERROR 1050 (42S01) at line 757: Table 'events_stages_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 770: Table 'events_stages_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line 783: Table 'events_stages_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line 797: Table 'events_stages_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line 809: Table 'events_stages_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 853: Table 'events_statements_current' already exists
+ERROR 1050 (42S01) at line 897: Table 'events_statements_history' already exists
+ERROR 1050 (42S01) at line 941: Table 'events_statements_history_long' already exists
+ERROR 1050 (42S01) at line 973: Table 'events_statements_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 1005: Table 'events_statements_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line 1037: Table 'events_statements_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line 1070: Table 'events_statements_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line 1101: Table 'events_statements_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 1110: Table 'hosts' already exists
+ERROR 1050 (42S01) at line 1119: Table 'users' already exists
+ERROR 1050 (42S01) at line 1129: Table 'accounts' already exists
+ERROR 1644 (HY000) at line 1549: Unexpected content found in the performance_schema database.
 FATAL ERROR: Upgrade failed
 show tables like "user_table";
 Tables_in_performance_schema (user_table)
@@ -90,40 +90,40 @@ ERROR 1050 (42S01) at line 322: Table 'f
 ERROR 1050 (42S01) at line 335: Table 'socket_instances' already exists
 ERROR 1050 (42S01) at line 365: Table 'socket_summary_by_instance' already exists
 ERROR 1050 (42S01) at line 394: Table 'socket_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line 416: Table 'host_cache' already exists
-ERROR 1050 (42S01) at line 425: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line 439: Table 'objects_summary_global_by_type' already exists
-ERROR 1050 (42S01) at line 449: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line 459: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line 468: Table 'setup_actors' already exists
-ERROR 1050 (42S01) at line 476: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line 485: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line 496: Table 'setup_objects' already exists
-ERROR 1050 (42S01) at line 504: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line 549: Table 'table_io_waits_summary_by_index_usage' already exists
-ERROR 1050 (42S01) at line 593: Table 'table_io_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 672: Table 'table_lock_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 692: Table 'threads' already exists
-ERROR 1050 (42S01) at line 708: Table 'events_stages_current' already exists
-ERROR 1050 (42S01) at line 724: Table 'events_stages_history' already exists
-ERROR 1050 (42S01) at line 740: Table 'events_stages_history_long' already exists
-ERROR 1050 (42S01) at line 753: Table 'events_stages_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 766: Table 'events_stages_summary_by_host_by_event_name' already exists
-ERROR 1050 (42S01) at line 779: Table 'events_stages_summary_by_user_by_event_name' already exists
-ERROR 1050 (42S01) at line 793: Table 'events_stages_summary_by_account_by_event_name' already exists
-ERROR 1050 (42S01) at line 805: Table 'events_stages_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 849: Table 'events_statements_current' already exists
-ERROR 1050 (42S01) at line 893: Table 'events_statements_history' already exists
-ERROR 1050 (42S01) at line 937: Table 'events_statements_history_long' already exists
-ERROR 1050 (42S01) at line 969: Table 'events_statements_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 1001: Table 'events_statements_summary_by_host_by_event_name' already exists
-ERROR 1050 (42S01) at line 1033: Table 'events_statements_summary_by_user_by_event_name' already exists
-ERROR 1050 (42S01) at line 1066: Table 'events_statements_summary_by_account_by_event_name' already exists
-ERROR 1050 (42S01) at line 1097: Table 'events_statements_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 1106: Table 'hosts' already exists
-ERROR 1050 (42S01) at line 1115: Table 'users' already exists
-ERROR 1050 (42S01) at line 1125: Table 'accounts' already exists
-ERROR 1644 (HY000) at line 1545: Unexpected content found in the performance_schema database.
+ERROR 1050 (42S01) at line 420: Table 'host_cache' already exists
+ERROR 1050 (42S01) at line 429: Table 'mutex_instances' already exists
+ERROR 1050 (42S01) at line 443: Table 'objects_summary_global_by_type' already exists
+ERROR 1050 (42S01) at line 453: Table 'performance_timers' already exists
+ERROR 1050 (42S01) at line 463: Table 'rwlock_instances' already exists
+ERROR 1050 (42S01) at line 472: Table 'setup_actors' already exists
+ERROR 1050 (42S01) at line 480: Table 'setup_consumers' already exists
+ERROR 1050 (42S01) at line 489: Table 'setup_instruments' already exists
+ERROR 1050 (42S01) at line 500: Table 'setup_objects' already exists
+ERROR 1050 (42S01) at line 508: Table 'setup_timers' already exists
+ERROR 1050 (42S01) at line 553: Table 'table_io_waits_summary_by_index_usage' already exists
+ERROR 1050 (42S01) at line 597: Table 'table_io_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 676: Table 'table_lock_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 696: Table 'threads' already exists
+ERROR 1050 (42S01) at line 712: Table 'events_stages_current' already exists
+ERROR 1050 (42S01) at line 728: Table 'events_stages_history' already exists
+ERROR 1050 (42S01) at line 744: Table 'events_stages_history_long' already exists
+ERROR 1050 (42S01) at line 757: Table 'events_stages_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 770: Table 'events_stages_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line 783: Table 'events_stages_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line 797: Table 'events_stages_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line 809: Table 'events_stages_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 853: Table 'events_statements_current' already exists
+ERROR 1050 (42S01) at line 897: Table 'events_statements_history' already exists
+ERROR 1050 (42S01) at line 941: Table 'events_statements_history_long' already exists
+ERROR 1050 (42S01) at line 973: Table 'events_statements_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 1005: Table 'events_statements_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line 1037: Table 'events_statements_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line 1070: Table 'events_statements_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line 1101: Table 'events_statements_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 1110: Table 'hosts' already exists
+ERROR 1050 (42S01) at line 1119: Table 'users' already exists
+ERROR 1050 (42S01) at line 1129: Table 'accounts' already exists
+ERROR 1644 (HY000) at line 1549: Unexpected content found in the performance_schema database.
 FATAL ERROR: Upgrade failed
 show tables like "user_view";
 Tables_in_performance_schema (user_view)
@@ -152,40 +152,40 @@ ERROR 1050 (42S01) at line 322: Table 'f
 ERROR 1050 (42S01) at line 335: Table 'socket_instances' already exists
 ERROR 1050 (42S01) at line 365: Table 'socket_summary_by_instance' already exists
 ERROR 1050 (42S01) at line 394: Table 'socket_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line 416: Table 'host_cache' already exists
-ERROR 1050 (42S01) at line 425: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line 439: Table 'objects_summary_global_by_type' already exists
-ERROR 1050 (42S01) at line 449: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line 459: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line 468: Table 'setup_actors' already exists
-ERROR 1050 (42S01) at line 476: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line 485: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line 496: Table 'setup_objects' already exists
-ERROR 1050 (42S01) at line 504: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line 549: Table 'table_io_waits_summary_by_index_usage' already exists
-ERROR 1050 (42S01) at line 593: Table 'table_io_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 672: Table 'table_lock_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 692: Table 'threads' already exists
-ERROR 1050 (42S01) at line 708: Table 'events_stages_current' already exists
-ERROR 1050 (42S01) at line 724: Table 'events_stages_history' already exists
-ERROR 1050 (42S01) at line 740: Table 'events_stages_history_long' already exists
-ERROR 1050 (42S01) at line 753: Table 'events_stages_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 766: Table 'events_stages_summary_by_host_by_event_name' already exists
-ERROR 1050 (42S01) at line 779: Table 'events_stages_summary_by_user_by_event_name' already exists
-ERROR 1050 (42S01) at line 793: Table 'events_stages_summary_by_account_by_event_name' already exists
-ERROR 1050 (42S01) at line 805: Table 'events_stages_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 849: Table 'events_statements_current' already exists
-ERROR 1050 (42S01) at line 893: Table 'events_statements_history' already exists
-ERROR 1050 (42S01) at line 937: Table 'events_statements_history_long' already exists
-ERROR 1050 (42S01) at line 969: Table 'events_statements_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 1001: Table 'events_statements_summary_by_host_by_event_name' already exists
-ERROR 1050 (42S01) at line 1033: Table 'events_statements_summary_by_user_by_event_name' already exists
-ERROR 1050 (42S01) at line 1066: Table 'events_statements_summary_by_account_by_event_name' already exists
-ERROR 1050 (42S01) at line 1097: Table 'events_statements_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 1106: Table 'hosts' already exists
-ERROR 1050 (42S01) at line 1115: Table 'users' already exists
-ERROR 1050 (42S01) at line 1125: Table 'accounts' already exists
-ERROR 1644 (HY000) at line 1545: Unexpected content found in the performance_schema database.
+ERROR 1050 (42S01) at line 420: Table 'host_cache' already exists
+ERROR 1050 (42S01) at line 429: Table 'mutex_instances' already exists
+ERROR 1050 (42S01) at line 443: Table 'objects_summary_global_by_type' already exists
+ERROR 1050 (42S01) at line 453: Table 'performance_timers' already exists
+ERROR 1050 (42S01) at line 463: Table 'rwlock_instances' already exists
+ERROR 1050 (42S01) at line 472: Table 'setup_actors' already exists
+ERROR 1050 (42S01) at line 480: Table 'setup_consumers' already exists
+ERROR 1050 (42S01) at line 489: Table 'setup_instruments' already exists
+ERROR 1050 (42S01) at line 500: Table 'setup_objects' already exists
+ERROR 1050 (42S01) at line 508: Table 'setup_timers' already exists
+ERROR 1050 (42S01) at line 553: Table 'table_io_waits_summary_by_index_usage' already exists
+ERROR 1050 (42S01) at line 597: Table 'table_io_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 676: Table 'table_lock_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 696: Table 'threads' already exists
+ERROR 1050 (42S01) at line 712: Table 'events_stages_current' already exists
+ERROR 1050 (42S01) at line 728: Table 'events_stages_history' already exists
+ERROR 1050 (42S01) at line 744: Table 'events_stages_history_long' already exists
+ERROR 1050 (42S01) at line 757: Table 'events_stages_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 770: Table 'events_stages_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line 783: Table 'events_stages_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line 797: Table 'events_stages_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line 809: Table 'events_stages_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 853: Table 'events_statements_current' already exists
+ERROR 1050 (42S01) at line 897: Table 'events_statements_history' already exists
+ERROR 1050 (42S01) at line 941: Table 'events_statements_history_long' already exists
+ERROR 1050 (42S01) at line 973: Table 'events_statements_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 1005: Table 'events_statements_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line 1037: Table 'events_statements_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line 1070: Table 'events_statements_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line 1101: Table 'events_statements_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 1110: Table 'hosts' already exists
+ERROR 1050 (42S01) at line 1119: Table 'users' already exists
+ERROR 1050 (42S01) at line 1129: Table 'accounts' already exists
+ERROR 1644 (HY000) at line 1549: Unexpected content found in the performance_schema database.
 FATAL ERROR: Upgrade failed
 select name from mysql.proc where db='performance_schema';
 name
@@ -214,40 +214,40 @@ ERROR 1050 (42S01) at line 322: Table 'f
 ERROR 1050 (42S01) at line 335: Table 'socket_instances' already exists
 ERROR 1050 (42S01) at line 365: Table 'socket_summary_by_instance' already exists
 ERROR 1050 (42S01) at line 394: Table 'socket_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line 416: Table 'host_cache' already exists
-ERROR 1050 (42S01) at line 425: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line 439: Table 'objects_summary_global_by_type' already exists
-ERROR 1050 (42S01) at line 449: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line 459: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line 468: Table 'setup_actors' already exists
-ERROR 1050 (42S01) at line 476: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line 485: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line 496: Table 'setup_objects' already exists
-ERROR 1050 (42S01) at line 504: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line 549: Table 'table_io_waits_summary_by_index_usage' already exists
-ERROR 1050 (42S01) at line 593: Table 'table_io_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 672: Table 'table_lock_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 692: Table 'threads' already exists
-ERROR 1050 (42S01) at line 708: Table 'events_stages_current' already exists
-ERROR 1050 (42S01) at line 724: Table 'events_stages_history' already exists
-ERROR 1050 (42S01) at line 740: Table 'events_stages_history_long' already exists
-ERROR 1050 (42S01) at line 753: Table 'events_stages_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 766: Table 'events_stages_summary_by_host_by_event_name' already exists
-ERROR 1050 (42S01) at line 779: Table 'events_stages_summary_by_user_by_event_name' already exists
-ERROR 1050 (42S01) at line 793: Table 'events_stages_summary_by_account_by_event_name' already exists
-ERROR 1050 (42S01) at line 805: Table 'events_stages_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 849: Table 'events_statements_current' already exists
-ERROR 1050 (42S01) at line 893: Table 'events_statements_history' already exists
-ERROR 1050 (42S01) at line 937: Table 'events_statements_history_long' already exists
-ERROR 1050 (42S01) at line 969: Table 'events_statements_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 1001: Table 'events_statements_summary_by_host_by_event_name' already exists
-ERROR 1050 (42S01) at line 1033: Table 'events_statements_summary_by_user_by_event_name' already exists
-ERROR 1050 (42S01) at line 1066: Table 'events_statements_summary_by_account_by_event_name' already exists
-ERROR 1050 (42S01) at line 1097: Table 'events_statements_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 1106: Table 'hosts' already exists
-ERROR 1050 (42S01) at line 1115: Table 'users' already exists
-ERROR 1050 (42S01) at line 1125: Table 'accounts' already exists
-ERROR 1644 (HY000) at line 1545: Unexpected content found in the performance_schema database.
+ERROR 1050 (42S01) at line 420: Table 'host_cache' already exists
+ERROR 1050 (42S01) at line 429: Table 'mutex_instances' already exists
+ERROR 1050 (42S01) at line 443: Table 'objects_summary_global_by_type' already exists
+ERROR 1050 (42S01) at line 453: Table 'performance_timers' already exists
+ERROR 1050 (42S01) at line 463: Table 'rwlock_instances' already exists
+ERROR 1050 (42S01) at line 472: Table 'setup_actors' already exists
+ERROR 1050 (42S01) at line 480: Table 'setup_consumers' already exists
+ERROR 1050 (42S01) at line 489: Table 'setup_instruments' already exists
+ERROR 1050 (42S01) at line 500: Table 'setup_objects' already exists
+ERROR 1050 (42S01) at line 508: Table 'setup_timers' already exists
+ERROR 1050 (42S01) at line 553: Table 'table_io_waits_summary_by_index_usage' already exists
+ERROR 1050 (42S01) at line 597: Table 'table_io_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 676: Table 'table_lock_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 696: Table 'threads' already exists
+ERROR 1050 (42S01) at line 712: Table 'events_stages_current' already exists
+ERROR 1050 (42S01) at line 728: Table 'events_stages_history' already exists
+ERROR 1050 (42S01) at line 744: Table 'events_stages_history_long' already exists
+ERROR 1050 (42S01) at line 757: Table 'events_stages_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 770: Table 'events_stages_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line 783: Table 'events_stages_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line 797: Table 'events_stages_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line 809: Table 'events_stages_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 853: Table 'events_statements_current' already exists
+ERROR 1050 (42S01) at line 897: Table 'events_statements_history' already exists
+ERROR 1050 (42S01) at line 941: Table 'events_statements_history_long' already exists
+ERROR 1050 (42S01) at line 973: Table 'events_statements_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 1005: Table 'events_statements_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line 1037: Table 'events_statements_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line 1070: Table 'events_statements_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line 1101: Table 'events_statements_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 1110: Table 'hosts' already exists
+ERROR 1050 (42S01) at line 1119: Table 'users' already exists
+ERROR 1050 (42S01) at line 1129: Table 'accounts' already exists
+ERROR 1644 (HY000) at line 1549: Unexpected content found in the performance_schema database.
 FATAL ERROR: Upgrade failed
 select name from mysql.proc where db='performance_schema';
 name
@@ -276,40 +276,40 @@ ERROR 1050 (42S01) at line 322: Table 'f
 ERROR 1050 (42S01) at line 335: Table 'socket_instances' already exists
 ERROR 1050 (42S01) at line 365: Table 'socket_summary_by_instance' already exists
 ERROR 1050 (42S01) at line 394: Table 'socket_summary_by_event_name' already exists
-ERROR 1050 (42S01) at line 416: Table 'host_cache' already exists
-ERROR 1050 (42S01) at line 425: Table 'mutex_instances' already exists
-ERROR 1050 (42S01) at line 439: Table 'objects_summary_global_by_type' already exists
-ERROR 1050 (42S01) at line 449: Table 'performance_timers' already exists
-ERROR 1050 (42S01) at line 459: Table 'rwlock_instances' already exists
-ERROR 1050 (42S01) at line 468: Table 'setup_actors' already exists
-ERROR 1050 (42S01) at line 476: Table 'setup_consumers' already exists
-ERROR 1050 (42S01) at line 485: Table 'setup_instruments' already exists
-ERROR 1050 (42S01) at line 496: Table 'setup_objects' already exists
-ERROR 1050 (42S01) at line 504: Table 'setup_timers' already exists
-ERROR 1050 (42S01) at line 549: Table 'table_io_waits_summary_by_index_usage' already exists
-ERROR 1050 (42S01) at line 593: Table 'table_io_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 672: Table 'table_lock_waits_summary_by_table' already exists
-ERROR 1050 (42S01) at line 692: Table 'threads' already exists
-ERROR 1050 (42S01) at line 708: Table 'events_stages_current' already exists
-ERROR 1050 (42S01) at line 724: Table 'events_stages_history' already exists
-ERROR 1050 (42S01) at line 740: Table 'events_stages_history_long' already exists
-ERROR 1050 (42S01) at line 753: Table 'events_stages_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 766: Table 'events_stages_summary_by_host_by_event_name' already exists
-ERROR 1050 (42S01) at line 779: Table 'events_stages_summary_by_user_by_event_name' already exists
-ERROR 1050 (42S01) at line 793: Table 'events_stages_summary_by_account_by_event_name' already exists
-ERROR 1050 (42S01) at line 805: Table 'events_stages_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 849: Table 'events_statements_current' already exists
-ERROR 1050 (42S01) at line 893: Table 'events_statements_history' already exists
-ERROR 1050 (42S01) at line 937: Table 'events_statements_history_long' already exists
-ERROR 1050 (42S01) at line 969: Table 'events_statements_summary_by_thread_by_event_name' already exists
-ERROR 1050 (42S01) at line 1001: Table 'events_statements_summary_by_host_by_event_name' already exists
-ERROR 1050 (42S01) at line 1033: Table 'events_statements_summary_by_user_by_event_name' already exists
-ERROR 1050 (42S01) at line 1066: Table 'events_statements_summary_by_account_by_event_name' already exists
-ERROR 1050 (42S01) at line 1097: Table 'events_statements_summary_global_by_event_name' already exists
-ERROR 1050 (42S01) at line 1106: Table 'hosts' already exists
-ERROR 1050 (42S01) at line 1115: Table 'users' already exists
-ERROR 1050 (42S01) at line 1125: Table 'accounts' already exists
-ERROR 1644 (HY000) at line 1545: Unexpected content found in the performance_schema database.
+ERROR 1050 (42S01) at line 420: Table 'host_cache' already exists
+ERROR 1050 (42S01) at line 429: Table 'mutex_instances' already exists
+ERROR 1050 (42S01) at line 443: Table 'objects_summary_global_by_type' already exists
+ERROR 1050 (42S01) at line 453: Table 'performance_timers' already exists
+ERROR 1050 (42S01) at line 463: Table 'rwlock_instances' already exists
+ERROR 1050 (42S01) at line 472: Table 'setup_actors' already exists
+ERROR 1050 (42S01) at line 480: Table 'setup_consumers' already exists
+ERROR 1050 (42S01) at line 489: Table 'setup_instruments' already exists
+ERROR 1050 (42S01) at line 500: Table 'setup_objects' already exists
+ERROR 1050 (42S01) at line 508: Table 'setup_timers' already exists
+ERROR 1050 (42S01) at line 553: Table 'table_io_waits_summary_by_index_usage' already exists
+ERROR 1050 (42S01) at line 597: Table 'table_io_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 676: Table 'table_lock_waits_summary_by_table' already exists
+ERROR 1050 (42S01) at line 696: Table 'threads' already exists
+ERROR 1050 (42S01) at line 712: Table 'events_stages_current' already exists
+ERROR 1050 (42S01) at line 728: Table 'events_stages_history' already exists
+ERROR 1050 (42S01) at line 744: Table 'events_stages_history_long' already exists
+ERROR 1050 (42S01) at line 757: Table 'events_stages_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 770: Table 'events_stages_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line 783: Table 'events_stages_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line 797: Table 'events_stages_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line 809: Table 'events_stages_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 853: Table 'events_statements_current' already exists
+ERROR 1050 (42S01) at line 897: Table 'events_statements_history' already exists
+ERROR 1050 (42S01) at line 941: Table 'events_statements_history_long' already exists
+ERROR 1050 (42S01) at line 973: Table 'events_statements_summary_by_thread_by_event_name' already exists
+ERROR 1050 (42S01) at line 1005: Table 'events_statements_summary_by_host_by_event_name' already exists
+ERROR 1050 (42S01) at line 1037: Table 'events_statements_summary_by_user_by_event_name' already exists
+ERROR 1050 (42S01) at line 1070: Table 'events_statements_summary_by_account_by_event_name' already exists
+ERROR 1050 (42S01) at line 1101: Table 'events_statements_summary_global_by_event_name' already exists
+ERROR 1050 (42S01) at line 1110: Table 'hosts' already exists
+ERROR 1050 (42S01) at line 1119: Table 'users' already exists
+ERROR 1050 (42S01) at line 1129: Table 'accounts' already exists
+ERROR 1644 (HY000) at line 1549: Unexpected content found in the performance_schema database.
 FATAL ERROR: Upgrade failed
 select name from mysql.event where db='performance_schema';
 name

=== modified file 'mysql-test/suite/perfschema/r/schema.result'
--- a/mysql-test/suite/perfschema/r/schema.result	2012-01-10 21:02:53 +0000
+++ b/mysql-test/suite/perfschema/r/schema.result	2012-01-23 15:45:22 +0000
@@ -659,7 +659,11 @@ host_cache	CREATE TABLE `host_cache` (
   `COUNT_AUTHENTICATION_ERRORS` bigint(20) NOT NULL,
   `COUNT_USER_ACL_ERRORS` bigint(20) NOT NULL,
   `COUNT_LOCAL_ERRORS` bigint(20) NOT NULL,
-  `COUNT_UNKNOWN_ERRORS` bigint(20) NOT NULL
+  `COUNT_UNKNOWN_ERRORS` bigint(20) NOT NULL,
+  `FIRST_SEEN` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
+  `LAST_SEEN` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
+  `FIRST_ERROR_SEEN` timestamp(6) NULL DEFAULT '0000-00-00 00:00:00.000000',
+  `LAST_ERROR_SEEN` timestamp(6) NULL DEFAULT '0000-00-00 00:00:00.000000'
 ) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
 show create table hosts;
 Table	Create Table

=== modified file 'mysql-test/suite/perfschema/r/table_schema.result'
--- a/mysql-test/suite/perfschema/r/table_schema.result	2012-01-10 21:02:53 +0000
+++ b/mysql-test/suite/perfschema/r/table_schema.result	2012-01-23 15:45:22 +0000
@@ -485,6 +485,10 @@ def	performance_schema	host_cache	COUNT_
 def	performance_schema	host_cache	COUNT_USER_ACL_ERRORS	14	NULL	NO	bigint	NULL	NULL	19	0	NULL	NULL	NULL	bigint(20)			select,insert,update,references	
 def	performance_schema	host_cache	COUNT_LOCAL_ERRORS	15	NULL	NO	bigint	NULL	NULL	19	0	NULL	NULL	NULL	bigint(20)			select,insert,update,references	
 def	performance_schema	host_cache	COUNT_UNKNOWN_ERRORS	16	NULL	NO	bigint	NULL	NULL	19	0	NULL	NULL	NULL	bigint(20)			select,insert,update,references	
+def	performance_schema	host_cache	FIRST_SEEN	17	0000-00-00 00:00:00.000000	NO	timestamp	NULL	NULL	NULL	NULL	6	NULL	NULL	timestamp(6)			select,insert,update,references	
+def	performance_schema	host_cache	LAST_SEEN	18	0000-00-00 00:00:00.000000	NO	timestamp	NULL	NULL	NULL	NULL	6	NULL	NULL	timestamp(6)			select,insert,update,references	
+def	performance_schema	host_cache	FIRST_ERROR_SEEN	19	0000-00-00 00:00:00.000000	YES	timestamp	NULL	NULL	NULL	NULL	6	NULL	NULL	timestamp(6)			select,insert,update,references	
+def	performance_schema	host_cache	LAST_ERROR_SEEN	20	0000-00-00 00:00:00.000000	YES	timestamp	NULL	NULL	NULL	NULL	6	NULL	NULL	timestamp(6)			select,insert,update,references	
 def	performance_schema	mutex_instances	NAME	1	NULL	NO	varchar	128	384	NULL	NULL	NULL	utf8	utf8_general_ci	varchar(128)			select,insert,update,references	
 def	performance_schema	mutex_instances	OBJECT_INSTANCE_BEGIN	2	NULL	NO	bigint	NULL	NULL	20	0	NULL	NULL	NULL	bigint(20) unsigned			select,insert,update,references	
 def	performance_schema	mutex_instances	LOCKED_BY_THREAD_ID	3	NULL	YES	int	NULL	NULL	10	0	NULL	NULL	NULL	int(11)			select,insert,update,references	

=== modified file 'mysql-test/suite/rpl/r/rpl_log_pos.result'
--- a/mysql-test/suite/rpl/r/rpl_log_pos.result	2012-01-19 20:03:07 +0000
+++ b/mysql-test/suite/rpl/r/rpl_log_pos.result	2012-01-22 17:00:21 +0000
@@ -12,7 +12,7 @@ change master to master_log_pos=MASTER_L
 Read_Master_Log_Pos = '75'
 start slave;
 include/wait_for_slave_io_error.inc [errno=1236]
-Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the start event position from 'master-bin.000001' at XXX, the last event was read from 'master-bin.000001' at XXX, the last byte read was read from 'master-bin.000001' at XXX.''
+Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the first event 'master-bin.000001' at XXX, the last event read from 'master-bin.000001' at XXX, the last byte read from 'master-bin.000001' at XXX.''
 include/stop_slave_sql.inc
 show master status;
 File	Position	Binlog_Do_DB	Binlog_Ignore_DB

=== modified file 'mysql-test/suite/rpl/r/rpl_manual_change_index_file.result'
--- a/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result	2012-01-19 20:03:07 +0000
+++ b/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result	2012-01-22 17:00:21 +0000
@@ -8,7 +8,7 @@ CREATE TABLE t1(c1 INT);
 FLUSH LOGS;
 call mtr.add_suppression('Got fatal error 1236 from master when reading data from binary log: .*could not find next log');
 include/wait_for_slave_io_error.inc [errno=1236]
-Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'could not find next log; the start event position from 'master-bin.000001' at XXX, the last event was read from 'master-bin.000002' at XXX, the last byte read was read from 'master-bin.000002' at XXX.''
+Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'could not find next log; the first event 'master-bin.000001' at XXX, the last event read from 'master-bin.000002' at XXX, the last byte read from 'master-bin.000002' at XXX.''
 CREATE TABLE t2(c1 INT);
 FLUSH LOGS;
 CREATE TABLE t3(c1 INT);

=== modified file 'mysql-test/suite/rpl/r/rpl_packet.result'
--- a/mysql-test/suite/rpl/r/rpl_packet.result	2012-01-19 20:03:07 +0000
+++ b/mysql-test/suite/rpl/r/rpl_packet.result	2012-01-22 17:00:21 +0000
@@ -40,7 +40,7 @@ DROP TABLE t1;
 CREATE TABLE t1 (f1 int PRIMARY KEY, f2 LONGTEXT, f3 LONGTEXT) ENGINE=MyISAM;
 INSERT INTO t1(f1, f2, f3) VALUES(1, REPEAT('a', @@global.max_allowed_packet), REPEAT('b', @@global.max_allowed_packet));
 include/wait_for_slave_io_error.inc [errno=1236]
-Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the start event position from '' at XXX, the last event was read from 'master-bin.000001' at XXX, the last byte read was read from 'master-bin.000001' at XXX.''
+Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the first event '' at XXX, the last event read from 'master-bin.000001' at XXX, the last byte read from 'master-bin.000001' at XXX.''
 STOP SLAVE;
 RESET SLAVE;
 RESET MASTER;

=== modified file 'mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result'
--- a/mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result	2012-01-19 20:03:07 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result	2012-01-22 17:00:21 +0000
@@ -78,7 +78,7 @@ CHANGE MASTER TO master_log_pos=MASTER_P
 START SLAVE;
 include/wait_for_slave_param.inc [Last_IO_Errno]
 Last_IO_Errno = '1236'
-Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position; the start event position from 'master-bin.000001' at XXX, the last event was read from './master-bin.000001' at XXX, the last byte read was read from './master-bin.000001' at XXX.''
+Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position; the first event 'master-bin.000001' at XXX, the last event read from './master-bin.000001' at XXX, the last byte read from './master-bin.000001' at XXX.''
 include/stop_slave.inc
 RESET SLAVE;
 RESET MASTER;

=== modified file 'mysql-test/t/ctype_utf8.test'
--- a/mysql-test/t/ctype_utf8.test	2011-10-12 13:58:31 +0000
+++ b/mysql-test/t/ctype_utf8.test	2012-01-23 10:02:54 +0000
@@ -1475,6 +1475,14 @@ SELECT HEX(LPAD(_utf8 0xD18F, 3, 0x20));
 SELECT HEX(INSERT(_utf8 0xD18F, 2, 1, 0x20));
 SELECT HEX(INSERT(_utf8 0xD18FD18E, 2, 1, 0x20));
 
+--echo #
+--echo # Bug#11752408 - 43593: DUMP/BACKUP/RESTORE/UPGRADE TOOLS FAILS BECAUSE OF UTF8_GENERAL_CI
+--echo #
+CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_general_mysql500_ci);
+INSERT INTO t1 VALUES ('a'),('r'),('s'),(_latin1 0xDF),(_latin1 0xF7),('t'),('z');
+SELECT * FROM t1 ORDER BY a;
+SELECT a, COUNT(*) FROM t1 GROUP BY a;
+DROP TABLE t1;
 
 --echo End of 5.1 tests
 

=== modified file 'mysql-test/t/partition_binlog_stmt.test'
--- a/mysql-test/t/partition_binlog_stmt.test	2010-10-01 12:16:00 +0000
+++ b/mysql-test/t/partition_binlog_stmt.test	2012-01-20 13:19:39 +0000
@@ -8,7 +8,7 @@ DROP TABLE IF EXISTS t1;
 --echo #
 --echo # Bug#51851: Server with SBR locks mutex twice on LOAD DATA into
 --echo #            partitioned MyISAM table
---write_file init_file.txt
+--write_file $MYSQLTEST_VARDIR/tmp/init_file.txt
 abcd
 EOF
 
@@ -19,8 +19,9 @@ CREATE TABLE t1
  INDEX namelocs (name(255))) ENGINE = MyISAM
 PARTITION BY HASH(id) PARTITIONS 2;
 
-LOAD DATA LOCAL INFILE 'init_file.txt'
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+eval LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/tmp/init_file.txt'
 INTO TABLE t1 (name);
 
---remove_file init_file.txt
+--remove_file $MYSQLTEST_VARDIR/tmp/init_file.txt
 DROP TABLE t1;

=== modified file 'mysql-test/t/partition_explicit_prune.test'
--- a/mysql-test/t/partition_explicit_prune.test	2011-02-01 11:38:39 +0000
+++ b/mysql-test/t/partition_explicit_prune.test	2012-01-21 00:47:05 +0000
@@ -1,6 +1,88 @@
 --source include/have_innodb.inc
 --source include/have_partition.inc
 
+# Helper statement
+let $get_handler_status_counts= SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
+WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
+
+--echo #
+--echo # Bug#13559657: PARTITION SELECTION DOES NOT WORK WITH VIEWS
+--echo #
+CREATE TABLE t1 (a int)
+ENGINE = InnoDB
+PARTITION BY HASH (a) PARTITIONS 2;
+INSERT INTO t1 VALUES (0), (1), (2), (3);
+CREATE VIEW v1 AS SELECT a FROM t1 PARTITION (p0);
+SHOW CREATE VIEW v1;
+FLUSH STATUS;
+--sorted_result
+SELECT * FROM v1;
+eval $get_handler_status_counts;
+--echo # 4 locks (1 table, 1 partition lock/unlock)
+FLUSH STATUS;
+--sorted_result
+SELECT a FROM t1 PARTITION (p0);
+eval $get_handler_status_counts;
+--echo # 4 locks (1 table, 1 partition lock/unlock)
+FLUSH STATUS;
+INSERT INTO v1 VALUES (10);
+eval $get_handler_status_counts;
+--echo # 4 locks (1 table, 1 partition lock/unlock)
+FLUSH STATUS;
+--error ER_ROW_DOES_NOT_MATCH_GIVEN_PARTITION_SET
+INSERT INTO v1 VALUES (11);
+eval $get_handler_status_counts;
+--echo # 4 locks (1 table, 1 partition lock/unlock)
+FLUSH STATUS;
+--sorted_result
+SELECT * FROM v1;
+eval $get_handler_status_counts;
+--echo # 4 locks (1 table, 1 partition lock/unlock)
+FLUSH STATUS;
+--sorted_result
+SELECT a FROM t1 PARTITION (p0);
+eval $get_handler_status_counts;
+--echo # 4 locks (1 table, 1 partition lock/unlock)
+--sorted_result
+SELECT * FROM t1;
+DROP VIEW v1;
+CREATE VIEW v1 AS SELECT a FROM t1 PARTITION (p0) WITH CHECK OPTION;
+FLUSH STATUS;
+INSERT INTO v1 VALUES (20);
+eval $get_handler_status_counts;
+--echo # 4 locks (1 table, 1 partition lock/unlock)
+FLUSH STATUS;
+--error ER_ROW_DOES_NOT_MATCH_GIVEN_PARTITION_SET
+INSERT INTO v1 VALUES (21);
+eval $get_handler_status_counts;
+--echo # 4 locks (1 table, 1 partition lock/unlock)
+--sorted_result
+SELECT * FROM v1;
+--sorted_result
+SELECT * FROM t1;
+DROP VIEW v1;
+CREATE VIEW v1 AS
+SELECT a FROM t1 PARTITION (p0) WHERE a = 30 WITH CHECK OPTION;
+FLUSH STATUS;
+INSERT INTO v1 VALUES (30);
+eval $get_handler_status_counts;
+--echo # 4 locks (1 table, 1 partition lock/unlock)
+FLUSH STATUS;
+--error ER_VIEW_CHECK_FAILED
+INSERT INTO v1 VALUES (31);
+eval $get_handler_status_counts;
+FLUSH STATUS;
+--error ER_VIEW_CHECK_FAILED
+INSERT INTO v1 VALUES (32);
+eval $get_handler_status_counts;
+--echo # 4 locks (1 table, 1 partition lock/unlock)
+--sorted_result
+SELECT * FROM v1;
+--sorted_result
+SELECT * FROM t1;
+DROP VIEW v1;
+DROP TABLE t1;
+
 --echo # Original tests for WL#5217
 
 --echo # Must have InnoDB as engine to get the same statistics results.
@@ -8,9 +90,6 @@
 SET @old_default_storage_engine = @@default_storage_engine;
 SET @@default_storage_engine = 'InnoDB';
 
-let $get_handler_status_counts= SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS
-WHERE VARIABLE_NAME LIKE 'HANDLER_%' AND VARIABLE_VALUE > 0;
-
 --let $MYSQLD_DATADIR= `SELECT @@datadir`
 
 --echo # Test to show if I_S affects HANDLER_ counts

=== modified file 'mysql-test/t/udf_skip_grants-master.opt'
--- a/mysql-test/t/udf_skip_grants-master.opt	2007-12-24 14:42:13 +0000
+++ b/mysql-test/t/udf_skip_grants-master.opt	2012-01-20 11:35:48 +0000
@@ -1 +1,2 @@
 --skip-grant-tables
+$UDF_EXAMPLE_LIB_OPT

=== modified file 'mysql-test/t/xa.test'
--- a/mysql-test/t/xa.test	2011-12-22 09:27:58 +0000
+++ b/mysql-test/t/xa.test	2012-01-20 10:07:05 +0000
@@ -364,7 +364,6 @@ let $wait_condition=
 --echo # Waiting until INSERT ... is blocked
 --source include/wait_condition.inc
 DELETE FROM t1;
-COMMIT;
 
 --echo # Connection con2
 --connection con2
@@ -373,6 +372,14 @@ COMMIT;
 --reap
 --error ER_XA_RBDEADLOCK
 XA COMMIT 'xid1';
+
+--echo # Connection default
+connection default;
+
+COMMIT;
+
+--echo # Connection con2
+connection con2;
 # This caused the assert to be triggered
 XA START 'xid1';
 

=== modified file 'mysys/charset-def.c'
--- a/mysys/charset-def.c	2011-06-30 15:50:45 +0000
+++ b/mysys/charset-def.c	2012-01-23 10:02:54 +0000
@@ -223,6 +223,7 @@ my_bool init_compiled_charsets(myf flags
 #ifdef HAVE_CHARSET_ucs2
   add_compiled_collation(&my_charset_ucs2_general_ci);
   add_compiled_collation(&my_charset_ucs2_bin);
+  add_compiled_collation(&my_charset_ucs2_general_mysql500_ci);
 #ifdef HAVE_UCA_COLLATIONS
   add_compiled_collation(&my_charset_ucs2_unicode_ci);
   add_compiled_collation(&my_charset_ucs2_german2_uca_ci);
@@ -259,6 +260,7 @@ my_bool init_compiled_charsets(myf flags
 #ifdef HAVE_CHARSET_utf8
   add_compiled_collation(&my_charset_utf8_general_ci);
   add_compiled_collation(&my_charset_utf8_bin);
+  add_compiled_collation(&my_charset_utf8_general_mysql500_ci);
 #ifdef HAVE_UTF8_GENERAL_CS
   add_compiled_collation(&my_charset_utf8_general_cs);
 #endif

=== modified file 'sql/rpl_master.cc'
--- a/sql/rpl_master.cc	2012-01-17 22:32:29 +0000
+++ b/sql/rpl_master.cc	2012-01-22 17:00:21 +0000
@@ -629,7 +629,6 @@ void mysql_binlog_send(THD* thd, char* l
   String* packet = &thd->packet;
   int error;
   const char *errmsg = "Unknown error";
-  char llbuff0[22], llbuff1[22], llbuff2[22];
   char error_text[MAX_SLAVE_ERRMSG]; // to be send to slave via my_message()
   NET* net = &thd->net;
   mysql_mutex_t *log_lock;
@@ -1275,12 +1274,14 @@ err:
        detailing the fatal error message with coordinates 
        of the last position read.
     */
-    const char *fmt= "%s; the start event position from '%s' at %s, the last event was read from '%s' at %s, the last byte read was read from '%s' at %s.";
-    my_snprintf(error_text, sizeof(error_text), fmt, errmsg,
-                p_start_coord->file_name,
-                (llstr(p_start_coord->pos, llbuff0), llbuff0),
-                p_coord->file_name, (llstr(p_coord->pos, llbuff1), llbuff1),
-                log_file_name,    (llstr(my_b_tell(&log), llbuff2), llbuff2));
+    my_snprintf(error_text, sizeof(error_text),
+                "%s; the first event '%s' at %lld, "
+                "the last event read from '%s' at %lld, "
+                "the last byte read from '%s' at %lld.",
+                errmsg,
+                p_start_coord->file_name, p_start_coord->pos,
+                p_coord->file_name, p_coord->pos,
+                log_file_name, my_b_tell(&log));
   }
   else
     strcpy(error_text, errmsg);

=== modified file 'sql/sql_lex.cc'
--- a/sql/sql_lex.cc	2012-01-10 18:58:10 +0000
+++ b/sql/sql_lex.cc	2012-01-20 14:44:16 +0000
@@ -2494,6 +2494,20 @@ void TABLE_LIST::print(THD *thd, String
         append_identifier(thd, str, table_name, table_name_length);
         cmp_name= table_name;
       }
+      if (partition_names && partition_names->elements)
+      {
+        int i, num_parts= partition_names->elements;
+        List_iterator<String> name_it(*(partition_names));
+        str->append(STRING_WITH_LEN(" PARTITION ("));
+        for (i= 1; i <= num_parts; i++)
+        {
+          String *name= name_it++;
+          append_identifier(thd, str, name->c_ptr(), name->length());
+          if (i != num_parts)
+            str->append(',');
+        }
+        str->append(')');
+      }
     }
     if (my_strcasecmp(table_alias_charset, cmp_name, alias))
     {

=== modified file 'storage/innobase/dict/dict0load.cc'
--- a/storage/innobase/dict/dict0load.cc	2012-01-18 15:39:14 +0000
+++ b/storage/innobase/dict/dict0load.cc	2012-01-20 08:32:09 +0000
@@ -2240,8 +2240,9 @@ dict_load_foreign(
 		/* Not found */
 
 		fprintf(stderr,
-			"InnoDB: Error A: cannot load foreign constraint "
-			"%.*s\n", (int) id_len, id);
+			"InnoDB: Error: cannot load foreign constraint "
+			"%.*s: could not find the relevant record in "
+			"SYS_FOREIGN\n", (int) id_len, id);
 
 		btr_pcur_close(&pcur);
 		mtr_commit(&mtr);
@@ -2256,8 +2257,9 @@ dict_load_foreign(
 	if (len != id_len || ut_memcmp(id, field, len) != 0) {
 
 		fprintf(stderr,
-			"InnoDB: Error B: cannot load foreign constraint "
-			"%.*s\n", (int) id_len, id);
+			"InnoDB: Error: cannot load foreign constraint "
+			"%.*s: found %.*s instead in SYS_FOREIGN\n",
+			(int) id_len, id, (int) len, field);
 
 		btr_pcur_close(&pcur);
 		mtr_commit(&mtr);

=== modified file 'storage/innobase/handler/ha_innodb.cc'
--- a/storage/innobase/handler/ha_innodb.cc	2012-01-18 15:39:14 +0000
+++ b/storage/innobase/handler/ha_innodb.cc	2012-01-23 09:38:29 +0000
@@ -99,12 +99,8 @@ static bool innodb_inited = 0;
 
 #define INSIDE_HA_INNOBASE_CC
 
-/* In the Windows plugin, the return value of current_thd is
-undefined.  Map it to NULL. */
-
 #define EQ_CURRENT_THD(thd) ((thd) == current_thd)
 
-
 static struct handlerton* innodb_hton_ptr;
 
 static const long AUTOINC_OLD_STYLE_LOCKING = 0;

=== modified file 'storage/innobase/os/os0file.cc'
--- a/storage/innobase/os/os0file.cc	2012-01-19 14:15:22 +0000
+++ b/storage/innobase/os/os0file.cc	2012-01-20 15:51:33 +0000
@@ -3242,6 +3242,9 @@ os_aio_native_aio_supported(void)
 	buf = static_cast<byte*>(ut_malloc(UNIV_PAGE_SIZE * 2));
 	ptr = static_cast<byte*>(ut_align(buf, UNIV_PAGE_SIZE));
 
+	/* Suppress valgrind warning. */
+	memset(buf, 0x00, UNIV_PAGE_SIZE * 2);
+
 	memset(&iocb, 0x0, sizeof(iocb));
 	p_iocb = &iocb;
 	io_prep_pwrite(p_iocb, fd, ptr, UNIV_PAGE_SIZE, 0);

=== modified file 'storage/innobase/trx/trx0trx.cc'
--- a/storage/innobase/trx/trx0trx.cc	2011-12-19 08:43:28 +0000
+++ b/storage/innobase/trx/trx0trx.cc	2012-01-21 03:30:27 +0000
@@ -2055,5 +2055,4 @@ trx_start_if_not_started(
 	}
 
 	ut_error;
-
 }

=== modified file 'storage/innobase/ut/ut0crc32.cc'
--- a/storage/innobase/ut/ut0crc32.cc	2011-11-24 10:49:07 +0000
+++ b/storage/innobase/ut/ut0crc32.cc	2012-01-18 13:29:45 +0000
@@ -142,21 +142,10 @@ ut_cpuid(
 	ib_uint32_t*	features_edx)	/*!< out: CPU features edx */
 {
 	ib_uint32_t	sig;
-	asm volatile (
-		"mov %%ebx, %%edi;"	/* Save %ebx */
-		"cpuid;"
-		"mov %%ebx, %%esi;"
-		"mov %%edi, %%ebx;"
-		: "=S" (vend[0]), "=c" (vend[2]), "=d" (vend[1])
-		: "a" (0)
-		: "edi");
-	asm volatile (
-		"mov %%ebx, %%edi;"	/* Save %ebx */
-		"cpuid;"
-		"mov %%edi, %%ebx;"
-		: "=a" (sig), "=c" (*features_ecx), "=d" (*features_edx)
-		: "a" (1)
-		: "edi");
+	asm("cpuid" : "=b" (vend[0]), "=c" (vend[2]), "=d" (vend[1]) : "a" (0));
+	asm("cpuid" : "=a" (sig), "=c" (*features_ecx), "=d" (*features_edx)
+	    : "a" (1)
+	    : "ebx");
 
 	*model = ((sig >> 4) & 0xF);
 	*family = ((sig >> 8) & 0xF);

=== modified file 'strings/ctype-ucs2.c'
--- a/strings/ctype-ucs2.c	2011-08-29 12:08:58 +0000
+++ b/strings/ctype-ucs2.c	2012-01-23 10:02:54 +0000
@@ -3410,6 +3410,41 @@ CHARSET_INFO my_charset_ucs2_general_ci=
     &my_collation_ucs2_general_ci_handler
 };
 
+
+CHARSET_INFO my_charset_ucs2_general_mysql500_ci=
+{
+  159, 0, 0,                                       /* number           */
+  MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, /* state */
+  "ucs2",                                          /* cs name          */
+  "ucs2_general_mysql500_ci",                      /* name             */
+  "",                                              /* comment          */
+  NULL,                                            /* tailoring        */
+  ctype_ucs2,                                      /* ctype            */
+  to_lower_ucs2,                                   /* to_lower         */
+  to_upper_ucs2,                                   /* to_upper         */
+  to_upper_ucs2,                                   /* sort_order       */
+  NULL,                                            /* uca              */
+  NULL,                                            /* tab_to_uni       */
+  NULL,                                            /* tab_from_uni     */
+  &my_unicase_mysql500,                            /* caseinfo         */
+  NULL,                                            /* state_map        */
+  NULL,                                            /* ident_map        */
+  1,                                               /* strxfrm_multiply */
+  1,                                               /* caseup_multiply  */
+  1,                                               /* casedn_multiply  */
+  2,                                               /* mbminlen         */
+  2,                                               /* mbmaxlen         */
+  0,                                               /* min_sort_char    */
+  0xFFFF,                                          /* max_sort_char    */
+  ' ',                                             /* pad char         */
+  0,                          /* escape_with_backslash_is_dangerous    */
+  1,                                               /* levels_for_compare */
+  1,                                               /* levels_for_order   */
+  &my_charset_ucs2_handler,
+  &my_collation_ucs2_general_ci_handler
+};
+
+
 CHARSET_INFO my_charset_ucs2_bin=
 {
     90,0,0,		/* number       */

=== modified file 'strings/ctype-utf8.c'
--- a/strings/ctype-utf8.c	2011-08-29 12:08:58 +0000
+++ b/strings/ctype-utf8.c	2012-01-23 10:02:54 +0000
@@ -192,6 +192,141 @@ static MY_UNICASE_CHARACTER plane00[]={
 };
 
 
+/*
+  Almost similar to plane00, but maps sorting order
+  for U+00DF to 0x00DF instead of 0x0053.
+*/
+static MY_UNICASE_CHARACTER plane00_mysql500[]={
+  {0x0000,0x0000,0x0000},  {0x0001,0x0001,0x0001},
+  {0x0002,0x0002,0x0002},  {0x0003,0x0003,0x0003},
+  {0x0004,0x0004,0x0004},  {0x0005,0x0005,0x0005},
+  {0x0006,0x0006,0x0006},  {0x0007,0x0007,0x0007},
+  {0x0008,0x0008,0x0008},  {0x0009,0x0009,0x0009},
+  {0x000A,0x000A,0x000A},  {0x000B,0x000B,0x000B},
+  {0x000C,0x000C,0x000C},  {0x000D,0x000D,0x000D},
+  {0x000E,0x000E,0x000E},  {0x000F,0x000F,0x000F},
+  {0x0010,0x0010,0x0010},  {0x0011,0x0011,0x0011},
+  {0x0012,0x0012,0x0012},  {0x0013,0x0013,0x0013},
+  {0x0014,0x0014,0x0014},  {0x0015,0x0015,0x0015},
+  {0x0016,0x0016,0x0016},  {0x0017,0x0017,0x0017},
+  {0x0018,0x0018,0x0018},  {0x0019,0x0019,0x0019},
+  {0x001A,0x001A,0x001A},  {0x001B,0x001B,0x001B},
+  {0x001C,0x001C,0x001C},  {0x001D,0x001D,0x001D},
+  {0x001E,0x001E,0x001E},  {0x001F,0x001F,0x001F},
+  {0x0020,0x0020,0x0020},  {0x0021,0x0021,0x0021},
+  {0x0022,0x0022,0x0022},  {0x0023,0x0023,0x0023},
+  {0x0024,0x0024,0x0024},  {0x0025,0x0025,0x0025},
+  {0x0026,0x0026,0x0026},  {0x0027,0x0027,0x0027},
+  {0x0028,0x0028,0x0028},  {0x0029,0x0029,0x0029},
+  {0x002A,0x002A,0x002A},  {0x002B,0x002B,0x002B},
+  {0x002C,0x002C,0x002C},  {0x002D,0x002D,0x002D},
+  {0x002E,0x002E,0x002E},  {0x002F,0x002F,0x002F},
+  {0x0030,0x0030,0x0030},  {0x0031,0x0031,0x0031},
+  {0x0032,0x0032,0x0032},  {0x0033,0x0033,0x0033},
+  {0x0034,0x0034,0x0034},  {0x0035,0x0035,0x0035},
+  {0x0036,0x0036,0x0036},  {0x0037,0x0037,0x0037},
+  {0x0038,0x0038,0x0038},  {0x0039,0x0039,0x0039},
+  {0x003A,0x003A,0x003A},  {0x003B,0x003B,0x003B},
+  {0x003C,0x003C,0x003C},  {0x003D,0x003D,0x003D},
+  {0x003E,0x003E,0x003E},  {0x003F,0x003F,0x003F},
+  {0x0040,0x0040,0x0040},  {0x0041,0x0061,0x0041},
+  {0x0042,0x0062,0x0042},  {0x0043,0x0063,0x0043},
+  {0x0044,0x0064,0x0044},  {0x0045,0x0065,0x0045},
+  {0x0046,0x0066,0x0046},  {0x0047,0x0067,0x0047},
+  {0x0048,0x0068,0x0048},  {0x0049,0x0069,0x0049},
+  {0x004A,0x006A,0x004A},  {0x004B,0x006B,0x004B},
+  {0x004C,0x006C,0x004C},  {0x004D,0x006D,0x004D},
+  {0x004E,0x006E,0x004E},  {0x004F,0x006F,0x004F},
+  {0x0050,0x0070,0x0050},  {0x0051,0x0071,0x0051},
+  {0x0052,0x0072,0x0052},  {0x0053,0x0073,0x0053},
+  {0x0054,0x0074,0x0054},  {0x0055,0x0075,0x0055},
+  {0x0056,0x0076,0x0056},  {0x0057,0x0077,0x0057},
+  {0x0058,0x0078,0x0058},  {0x0059,0x0079,0x0059},
+  {0x005A,0x007A,0x005A},  {0x005B,0x005B,0x005B},
+  {0x005C,0x005C,0x005C},  {0x005D,0x005D,0x005D},
+  {0x005E,0x005E,0x005E},  {0x005F,0x005F,0x005F},
+  {0x0060,0x0060,0x0060},  {0x0041,0x0061,0x0041},
+  {0x0042,0x0062,0x0042},  {0x0043,0x0063,0x0043},
+  {0x0044,0x0064,0x0044},  {0x0045,0x0065,0x0045},
+  {0x0046,0x0066,0x0046},  {0x0047,0x0067,0x0047},
+  {0x0048,0x0068,0x0048},  {0x0049,0x0069,0x0049},
+  {0x004A,0x006A,0x004A},  {0x004B,0x006B,0x004B},
+  {0x004C,0x006C,0x004C},  {0x004D,0x006D,0x004D},
+  {0x004E,0x006E,0x004E},  {0x004F,0x006F,0x004F},
+  {0x0050,0x0070,0x0050},  {0x0051,0x0071,0x0051},
+  {0x0052,0x0072,0x0052},  {0x0053,0x0073,0x0053},
+  {0x0054,0x0074,0x0054},  {0x0055,0x0075,0x0055},
+  {0x0056,0x0076,0x0056},  {0x0057,0x0077,0x0057},
+  {0x0058,0x0078,0x0058},  {0x0059,0x0079,0x0059},
+  {0x005A,0x007A,0x005A},  {0x007B,0x007B,0x007B},
+  {0x007C,0x007C,0x007C},  {0x007D,0x007D,0x007D},
+  {0x007E,0x007E,0x007E},  {0x007F,0x007F,0x007F},
+  {0x0080,0x0080,0x0080},  {0x0081,0x0081,0x0081},
+  {0x0082,0x0082,0x0082},  {0x0083,0x0083,0x0083},
+  {0x0084,0x0084,0x0084},  {0x0085,0x0085,0x0085},
+  {0x0086,0x0086,0x0086},  {0x0087,0x0087,0x0087},
+  {0x0088,0x0088,0x0088},  {0x0089,0x0089,0x0089},
+  {0x008A,0x008A,0x008A},  {0x008B,0x008B,0x008B},
+  {0x008C,0x008C,0x008C},  {0x008D,0x008D,0x008D},
+  {0x008E,0x008E,0x008E},  {0x008F,0x008F,0x008F},
+  {0x0090,0x0090,0x0090},  {0x0091,0x0091,0x0091},
+  {0x0092,0x0092,0x0092},  {0x0093,0x0093,0x0093},
+  {0x0094,0x0094,0x0094},  {0x0095,0x0095,0x0095},
+  {0x0096,0x0096,0x0096},  {0x0097,0x0097,0x0097},
+  {0x0098,0x0098,0x0098},  {0x0099,0x0099,0x0099},
+  {0x009A,0x009A,0x009A},  {0x009B,0x009B,0x009B},
+  {0x009C,0x009C,0x009C},  {0x009D,0x009D,0x009D},
+  {0x009E,0x009E,0x009E},  {0x009F,0x009F,0x009F},
+  {0x00A0,0x00A0,0x00A0},  {0x00A1,0x00A1,0x00A1},
+  {0x00A2,0x00A2,0x00A2},  {0x00A3,0x00A3,0x00A3},
+  {0x00A4,0x00A4,0x00A4},  {0x00A5,0x00A5,0x00A5},
+  {0x00A6,0x00A6,0x00A6},  {0x00A7,0x00A7,0x00A7},
+  {0x00A8,0x00A8,0x00A8},  {0x00A9,0x00A9,0x00A9},
+  {0x00AA,0x00AA,0x00AA},  {0x00AB,0x00AB,0x00AB},
+  {0x00AC,0x00AC,0x00AC},  {0x00AD,0x00AD,0x00AD},
+  {0x00AE,0x00AE,0x00AE},  {0x00AF,0x00AF,0x00AF},
+  {0x00B0,0x00B0,0x00B0},  {0x00B1,0x00B1,0x00B1},
+  {0x00B2,0x00B2,0x00B2},  {0x00B3,0x00B3,0x00B3},
+  {0x00B4,0x00B4,0x00B4},  {0x039C,0x00B5,0x039C},
+  {0x00B6,0x00B6,0x00B6},  {0x00B7,0x00B7,0x00B7},
+  {0x00B8,0x00B8,0x00B8},  {0x00B9,0x00B9,0x00B9},
+  {0x00BA,0x00BA,0x00BA},  {0x00BB,0x00BB,0x00BB},
+  {0x00BC,0x00BC,0x00BC},  {0x00BD,0x00BD,0x00BD},
+  {0x00BE,0x00BE,0x00BE},  {0x00BF,0x00BF,0x00BF},
+  {0x00C0,0x00E0,0x0041},  {0x00C1,0x00E1,0x0041},
+  {0x00C2,0x00E2,0x0041},  {0x00C3,0x00E3,0x0041},
+  {0x00C4,0x00E4,0x0041},  {0x00C5,0x00E5,0x0041},
+  {0x00C6,0x00E6,0x00C6},  {0x00C7,0x00E7,0x0043},
+  {0x00C8,0x00E8,0x0045},  {0x00C9,0x00E9,0x0045},
+  {0x00CA,0x00EA,0x0045},  {0x00CB,0x00EB,0x0045},
+  {0x00CC,0x00EC,0x0049},  {0x00CD,0x00ED,0x0049},
+  {0x00CE,0x00EE,0x0049},  {0x00CF,0x00EF,0x0049},
+  {0x00D0,0x00F0,0x00D0},  {0x00D1,0x00F1,0x004E},
+  {0x00D2,0x00F2,0x004F},  {0x00D3,0x00F3,0x004F},
+  {0x00D4,0x00F4,0x004F},  {0x00D5,0x00F5,0x004F},
+  {0x00D6,0x00F6,0x004F},  {0x00D7,0x00D7,0x00D7},
+  {0x00D8,0x00F8,0x00D8},  {0x00D9,0x00F9,0x0055},
+  {0x00DA,0x00FA,0x0055},  {0x00DB,0x00FB,0x0055},
+  {0x00DC,0x00FC,0x0055},  {0x00DD,0x00FD,0x0059},
+  {0x00DE,0x00FE,0x00DE},  {0x00DF,0x00DF,0x00DF},
+  {0x00C0,0x00E0,0x0041},  {0x00C1,0x00E1,0x0041},
+  {0x00C2,0x00E2,0x0041},  {0x00C3,0x00E3,0x0041},
+  {0x00C4,0x00E4,0x0041},  {0x00C5,0x00E5,0x0041},
+  {0x00C6,0x00E6,0x00C6},  {0x00C7,0x00E7,0x0043},
+  {0x00C8,0x00E8,0x0045},  {0x00C9,0x00E9,0x0045},
+  {0x00CA,0x00EA,0x0045},  {0x00CB,0x00EB,0x0045},
+  {0x00CC,0x00EC,0x0049},  {0x00CD,0x00ED,0x0049},
+  {0x00CE,0x00EE,0x0049},  {0x00CF,0x00EF,0x0049},
+  {0x00D0,0x00F0,0x00D0},  {0x00D1,0x00F1,0x004E},
+  {0x00D2,0x00F2,0x004F},  {0x00D3,0x00F3,0x004F},
+  {0x00D4,0x00F4,0x004F},  {0x00D5,0x00F5,0x004F},
+  {0x00D6,0x00F6,0x004F},  {0x00F7,0x00F7,0x00F7},
+  {0x00D8,0x00F8,0x00D8},  {0x00D9,0x00F9,0x0055},
+  {0x00DA,0x00FA,0x0055},  {0x00DB,0x00FB,0x0055},
+  {0x00DC,0x00FC,0x0055},  {0x00DD,0x00FD,0x0059},
+  {0x00DE,0x00FE,0x00DE},  {0x0178,0x00FF,0x0059}
+};
+
 
 static MY_UNICASE_CHARACTER plane01[]={
   {0x0100,0x0101,0x0041},  {0x0100,0x0101,0x0041},
@@ -1549,6 +1684,54 @@ MY_UNICASE_INFO my_unicase_default=
 
 
 /*
+  Reproduce old utf8_general_ci behaviour before we fixed Bug#27877.
+*/
+MY_UNICASE_CHARACTER *my_unicase_pages_mysql500[256]={
+ plane00_mysql500,
+          plane01, plane02, plane03, plane04, plane05,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL, plane1E, plane1F,
+    NULL, plane21,    NULL,    NULL, plane24,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,
+    NULL,    NULL,    NULL,    NULL,    NULL,    NULL,    NULL, planeFF
+
+};
+
+
+MY_UNICASE_INFO my_unicase_mysql500=
+{
+  0xFFFF,
+  my_unicase_pages_mysql500
+};
+
+
+/*
   Turkish lower/upper mapping:
   1. LOWER(0x0049 LATIN CAPITAL LETTER I) -> 
            0x0131 LATIN SMALL   LETTER DOTLESS I
@@ -5895,6 +6078,40 @@ CHARSET_INFO my_charset_utf8_tolower_ci=
 };
 
 
+CHARSET_INFO my_charset_utf8_general_mysql500_ci=
+{
+  223,0,0,                                      /* number           */
+  MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE,  /* state            */
+  "utf8",                                       /* cs name          */
+  "utf8_general_mysql500_ci",                   /* name             */
+  "",                                           /* comment          */
+  NULL,                                         /* tailoring        */
+  ctype_utf8,                                   /* ctype            */
+  to_lower_utf8,                                /* to_lower         */
+  to_upper_utf8,                                /* to_upper         */
+  to_upper_utf8,                                /* sort_order       */
+  NULL,                                         /* uca              */
+  NULL,                                         /* tab_to_uni       */
+  NULL,                                         /* tab_from_uni     */
+  &my_unicase_mysql500,                         /* caseinfo         */
+  NULL,                                         /* state_map        */
+  NULL,                                         /* ident_map        */
+  1,                                            /* strxfrm_multiply */
+  1,                                            /* caseup_multiply  */
+  1,                                            /* casedn_multiply  */
+  1,                                            /* mbminlen         */
+  3,                                            /* mbmaxlen         */
+  0,                                            /* min_sort_char    */
+  0xFFFF,                                       /* max_sort_char    */
+  ' ',                                          /* pad char         */
+  0,                          /* escape_with_backslash_is_dangerous */
+  1,                                            /* levels_for_compare */
+  1,                                            /* levels_for_order   */
+  &my_charset_utf8_handler,
+  &my_collation_utf8_general_ci_handler
+};
+
+
 CHARSET_INFO my_charset_utf8_bin=
 {
     83,0,0,             /* number       */
@@ -7407,6 +7624,7 @@ CHARSET_INFO my_charset_filename=
     &my_collation_filename_handler
 };
 
+
 #ifdef MY_TEST_UTF8
 #include <stdio.h>
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-wl5259 branch (marc.alff:3357 to 3358) Marc Alff23 Jan