List:Commits« Previous MessageNext Message »
From:Marc Alff Date:March 16 2011 8:59am
Subject:bzr push into mysql-trunk branch (marc.alff:3256 to 3257)
View as plain text  
 3257 Marc Alff	2011-03-16 [merge]
      Merge mysql-trunk --> mysql-trunk-wl4896

    removed:
      mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile-slave.opt
    added:
      mysql-test/r/ssl_cipher.result
      mysql-test/suite/binlog/r/binlog_incident_ignore.result
      mysql-test/suite/binlog/t/binlog_incident_ignore-master.opt
      mysql-test/suite/binlog/t/binlog_incident_ignore.test
      mysql-test/suite/rpl/r/rpl_skip_incident.result
      mysql-test/suite/rpl/t/rpl_skip_incident-master.opt
      mysql-test/suite/rpl/t/rpl_skip_incident-slave.opt
      mysql-test/suite/rpl/t/rpl_skip_incident.test
      mysql-test/suite/sys_vars/r/max_long_data_size_basic.result
      mysql-test/suite/sys_vars/t/max_long_data_size_basic.test
      mysql-test/t/ssl_cipher-master.opt
      mysql-test/t/ssl_cipher.test
    renamed:
      regex/tests => regex/tests_include.h
    modified:
      client/mysqltest.cc
      extra/yassl/src/yassl_int.cpp
      mysql-test/collections/default.daily
      mysql-test/collections/default.push
      mysql-test/extra/binlog_tests/binlog.test
      mysql-test/extra/binlog_tests/database.test
      mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test
      mysql-test/extra/rpl_tests/rpl_conflicts.test
      mysql-test/extra/rpl_tests/rpl_extra_col_master.test
      mysql-test/extra/rpl_tests/rpl_extra_col_slave.test
      mysql-test/extra/rpl_tests/rpl_loaddata.test
      mysql-test/extra/rpl_tests/rpl_row_basic.test
      mysql-test/extra/rpl_tests/rpl_row_empty_imgs.test
      mysql-test/extra/rpl_tests/rpl_row_tabledefs.test
      mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test
      mysql-test/extra/rpl_tests/rpl_stop_middle_group.test
      mysql-test/include/mtr_warnings.sql
      mysql-test/include/wait_for_status_var.inc
      mysql-test/lib/My/Find.pm
      mysql-test/lib/mtr_cases.pm
      mysql-test/lib/mtr_report.pm
      mysql-test/mysql-test-run.pl
      mysql-test/r/archive_plugin.result
      mysql-test/r/blackhole_plugin.result
      mysql-test/r/flush_read_lock.result
      mysql-test/r/func_analyse.result
      mysql-test/r/information_schema.result
      mysql-test/r/information_schema_parameters.result
      mysql-test/r/information_schema_routines.result
      mysql-test/r/mysqld--help-notwin.result
      mysql-test/r/mysqld--help-win.result
      mysql-test/r/mysqltest.result
      mysql-test/r/system_mysql_db.result
      mysql-test/r/variables.result
      mysql-test/suite/binlog/r/binlog_base64_flag.result
      mysql-test/suite/binlog/r/binlog_database.result
      mysql-test/suite/binlog/r/binlog_row_binlog.result
      mysql-test/suite/binlog/r/binlog_stm_binlog.result
      mysql-test/suite/binlog/t/binlog_base64_flag.test
      mysql-test/suite/funcs_1/r/is_columns_is.result
      mysql-test/suite/funcs_1/r/is_columns_mysql.result
      mysql-test/suite/funcs_1/r/is_routines.result
      mysql-test/suite/perfschema/r/relaylog.result
      mysql-test/suite/perfschema/t/relaylog.test
      mysql-test/suite/rpl/r/rpl_binlog_corruption.result
      mysql-test/suite/rpl/r/rpl_bug33931.result
      mysql-test/suite/rpl/r/rpl_checksum.result
      mysql-test/suite/rpl/r/rpl_checksum_cache.result
      mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result
      mysql-test/suite/rpl/r/rpl_corruption.result
      mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result
      mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result
      mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result
      mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result
      mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result
      mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
      mysql-test/suite/rpl/r/rpl_idempotency.result
      mysql-test/suite/rpl/r/rpl_ignore_table.result
      mysql-test/suite/rpl/r/rpl_incident.result
      mysql-test/suite/rpl/r/rpl_init_slave_errors.result
      mysql-test/suite/rpl/r/rpl_known_bugs_detection.result
      mysql-test/suite/rpl/r/rpl_loaddata.result
      mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
      mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result
      mysql-test/suite/rpl/r/rpl_rotate_logs.result
      mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result
      mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result
      mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result
      mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result
      mysql-test/suite/rpl/r/rpl_row_colSize.result
      mysql-test/suite/rpl/r/rpl_row_conflicts.result
      mysql-test/suite/rpl/r/rpl_row_idempotency.result
      mysql-test/suite/rpl/r/rpl_row_img_eng_full.result
      mysql-test/suite/rpl/r/rpl_row_img_sanity.result
      mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result
      mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result
      mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result
      mysql-test/suite/rpl/r/rpl_show_errors.result
      mysql-test/suite/rpl/r/rpl_skip_error.result
      mysql-test/suite/rpl/r/rpl_slave_grp_exec.result
      mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result
      mysql-test/suite/rpl/r/rpl_slave_load_tmpdir_not_exist.result
      mysql-test/suite/rpl/r/rpl_slave_start.result
      mysql-test/suite/rpl/r/rpl_slow_query_log.result
      mysql-test/suite/rpl/r/rpl_stm_EE_err2.result
      mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result
      mysql-test/suite/rpl/r/rpl_stm_conflicts.result
      mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result
      mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result
      mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result
      mysql-test/suite/rpl/r/rpl_stop_slave.result
      mysql-test/suite/rpl/r/rpl_temporary_errors.result
      mysql-test/suite/rpl/r/rpl_typeconv.result
      mysql-test/suite/rpl/t/rpl_binlog_corruption.test
      mysql-test/suite/rpl/t/rpl_bug33931.test
      mysql-test/suite/rpl/t/rpl_checksum.test
      mysql-test/suite/rpl/t/rpl_checksum_cache.test
      mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test
      mysql-test/suite/rpl/t/rpl_corruption.test
      mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test
      mysql-test/suite/rpl/t/rpl_heartbeat_basic.test
      mysql-test/suite/rpl/t/rpl_idempotency.test
      mysql-test/suite/rpl/t/rpl_ignore_table.test
      mysql-test/suite/rpl/t/rpl_incident.test
      mysql-test/suite/rpl/t/rpl_init_slave_errors.test
      mysql-test/suite/rpl/t/rpl_known_bugs_detection.test
      mysql-test/suite/rpl/t/rpl_loaddata_fatal.test
      mysql-test/suite/rpl/t/rpl_rotate_logs.test
      mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test
      mysql-test/suite/rpl/t/rpl_row_colSize.test
      mysql-test/suite/rpl/t/rpl_row_idempotency.test
      mysql-test/suite/rpl/t/rpl_row_img_sanity.test
      mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test
      mysql-test/suite/rpl/t/rpl_show_errors.test
      mysql-test/suite/rpl/t/rpl_skip_error.test
      mysql-test/suite/rpl/t/rpl_slave_grp_exec.test
      mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test
      mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist.test
      mysql-test/suite/rpl/t/rpl_slave_start.test
      mysql-test/suite/rpl/t/rpl_slow_query_log.test
      mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test
      mysql-test/suite/rpl/t/rpl_stop_slave.test
      mysql-test/suite/rpl/t/rpl_temporary_errors.test
      mysql-test/suite/rpl/t/rpl_typeconv.test
      mysql-test/t/archive_plugin.test
      mysql-test/t/blackhole_plugin.test
      mysql-test/t/file_contents.test
      mysql-test/t/flush_read_lock.test
      mysql-test/t/func_analyse.test
      mysql-test/t/information_schema.test
      mysql-test/t/mysqlbinlog_raw_mode.test
      mysql-test/t/mysqltest.test
      mysql-test/t/partition_mgm_err2.test
      mysql-test/t/repair.test
      mysql-test/t/show_check.test
      mysql-test/t/variables.test
      regex/CMakeLists.txt
      regex/main.c
      scripts/mysql_system_tables.sql
      scripts/mysql_system_tables_fix.sql
      sql/binlog.cc
      sql/item.cc
      sql/log_event.cc
      sql/log_event.h
      sql/mysqld.cc
      sql/mysqld.h
      sql/rpl_slave.cc
      sql/sql_analyse.cc
      sql/sql_db.cc
      sql/sql_prepare.cc
      sql/sql_show.cc
      sql/sys_vars.cc
      strings/uca-dump.c
      tests/mysql_client_test.c
      unittest/mysys/my_vsnprintf-t.c
      regex/tests_include.h
 3256 Christopher Powers	2011-03-14
      WL#4896 "Performance Schema Net IO"
      
      - API change: Updated ps_abi_v1.h.pp

    modified:
      include/mysql/psi/psi_abi_v1.h.pp
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc	2011-02-23 04:53:07 +0000
+++ b/client/mysqltest.cc	2011-03-07 15:17:39 +0000
@@ -3049,83 +3049,6 @@ int do_modify_var(struct st_command *com
 
 
 /*
-  Wrapper for 'system' function
-
-  NOTE
-  If mysqltest is executed from cygwin shell, the command will be
-  executed in the "windows command interpreter" cmd.exe and we prepend "sh"
-  to make it be executed by cygwins "bash". Thus commands like "rm",
-  "mkdir" as well as shellscripts can executed by "system" in Windows.
-
-*/
-
-int my_system(DYNAMIC_STRING* ds_cmd)
-{
-#if defined __WIN__ && defined USE_CYGWIN
-  /* Dump the command into a sh script file and execute with system */
-  str_to_file(tmp_sh_name, ds_cmd->str, ds_cmd->length);
-  return system(tmp_sh_cmd);
-#else
-  return system(ds_cmd->str);
-#endif
-}
-
-
-/*
-  SYNOPSIS
-  do_system
-  command	called command
-
-  DESCRIPTION
-  system <command>
-
-  Eval the query to expand any $variables in the command.
-  Execute the command with the "system" command.
-
-*/
-
-void do_system(struct st_command *command)
-{
-  DYNAMIC_STRING ds_cmd;
-  DBUG_ENTER("do_system");
-
-  if (strlen(command->first_argument) == 0)
-    die("Missing arguments to system, nothing to do!");
-
-  init_dynamic_string(&ds_cmd, 0, command->query_len + 64, 256);
-
-  /* Eval the system command, thus replacing all environment variables */
-  do_eval(&ds_cmd, command->first_argument, command->end, !is_windows);
-
-#ifdef __WIN__
-#ifndef USE_CYGWIN
-   /* Replace /dev/null with NUL */
-   while(replace(&ds_cmd, "/dev/null", 9, "NUL", 3) == 0)
-     ;
-#endif
-#endif
-
-
-  DBUG_PRINT("info", ("running system command '%s' as '%s'",
-                      command->first_argument, ds_cmd.str));
-  if (my_system(&ds_cmd))
-  {
-    if (command->abort_on_error)
-      die("system command '%s' failed", command->first_argument);
-
-    /* If ! abort_on_error, log message and continue */
-    dynstr_append(&ds_res, "system command '");
-    replace_dynstr_append(&ds_res, command->first_argument);
-    dynstr_append(&ds_res, "' failed\n");
-  }
-
-  command->last_argument= command->end;
-  dynstr_free(&ds_cmd);
-  DBUG_VOID_RETURN;
-}
-
-
-/*
   SYNOPSIS
   set_wild_chars
   set  true to set * etc. as wild char, false to reset
@@ -8615,7 +8538,10 @@ int main(int argc, char **argv)
       case Q_INC: do_modify_var(command, DO_INC); break;
       case Q_DEC: do_modify_var(command, DO_DEC); break;
       case Q_ECHO: do_echo(command); command_executed++; break;
-      case Q_SYSTEM: do_system(command); break;
+      case Q_SYSTEM:
+        die("'system' command  is deprecated, use exec or\n"\
+            "  see the manual for portable commands to use");
+	break;
       case Q_REMOVE_FILE: do_remove_file(command); break;
       case Q_REMOVE_FILES_WILDCARD: do_remove_files_wildcard(command); break;
       case Q_MKDIR: do_mkdir(command); break;

=== modified file 'extra/yassl/src/yassl_int.cpp'
--- a/extra/yassl/src/yassl_int.cpp	2009-09-23 13:21:29 +0000
+++ b/extra/yassl/src/yassl_int.cpp	2011-03-11 10:46:34 +0000
@@ -308,7 +308,7 @@ SSL::SSL(SSL_CTX* ctx) 
             SetError(YasslError(err));
             return;
         }
-        else if (serverSide) {
+        else if (serverSide && !(ctx->GetCiphers().setSuites_)) {
             // remove RSA or DSA suites depending on cert key type
             ProtocolVersion pv = secure_.get_connection().version_;
             

=== modified file 'mysql-test/collections/default.daily'
--- a/mysql-test/collections/default.daily	2011-03-10 04:31:19 +0000
+++ b/mysql-test/collections/default.daily	2011-03-11 09:58:45 +0000
@@ -1,4 +1,5 @@
-perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=normal               --vardir=var-normal                                                                  --report-features --skip-test-list=collections/disabled-daily.list
+
+perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=normal               --vardir=var-normal                                                                  --report-features --skip-test-list=collections/disabled-daily.list --unit-tests
 perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=n_mix                --vardir=var-n_mix                                  --mysqld=--binlog-format=mixed --skip-test-list=collections/disabled-daily.list
 perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=row                --vardir=var-row                                  --mysqld=--binlog-format=row --skip-test-list=collections/disabled-daily.list
 perl mysql-test-run.pl --force --timer  --debug-server --parallel=auto --experimental=collections/default.experimental --comment=ps_row               --vardir=var-ps_row                                 --mysqld=--binlog-format=row     --ps-protocol --skip-test-list=collections/disabled-daily.list

=== modified file 'mysql-test/collections/default.push'
--- a/mysql-test/collections/default.push	2011-02-08 06:34:01 +0000
+++ b/mysql-test/collections/default.push	2011-02-21 13:56:58 +0000
@@ -1,4 +1,4 @@
-perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
+perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list --unit-tests
 perl mysql-test-run.pl --timer --force --parallel=auto --comment=main_ps_row --vardir=var-main-ps_row --suite=main --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
 perl mysql-test-run.pl --timer --force --parallel=auto --comment=main_embedded --vardir=var-main_emebbed  --suite=main --embedded --experimental=collections/default.experimental --skip-ndb
 perl mysql-test-run.pl --timer --force --parallel=auto --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1 --experimental=collections/default.experimental --skip-ndb

=== modified file 'mysql-test/extra/binlog_tests/binlog.test'
--- a/mysql-test/extra/binlog_tests/binlog.test	2010-12-05 22:51:49 +0000
+++ b/mysql-test/extra/binlog_tests/binlog.test	2011-02-23 20:01:27 +0000
@@ -350,6 +350,7 @@ SHOW SESSION VARIABLES LIKE "%_checks";
 --echo # INSERT INTO t1 VALUES(2)
 --echo # foreign_key_checks=1 and unique_checks=1
 --echo # It should not change current session's variables, even error happens
+call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.t1; Duplicate entry .2. for key .PRIMARY., Error_code: 1062");
 --error 1062
 BINLOG '
 dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=

=== modified file 'mysql-test/extra/binlog_tests/database.test'
--- a/mysql-test/extra/binlog_tests/database.test	2010-06-30 07:12:50 +0000
+++ b/mysql-test/extra/binlog_tests/database.test	2011-03-15 10:54:06 +0000
@@ -64,3 +64,31 @@ let $MYSQLD_DATADIR= `SELECT @@datadir`;
 --remove_file $MYSQLD_DATADIR/testing_1/fake_file.$prefix
 --echo # Now we can drop the database.
 DROP DATABASE testing_1;
+
+
+--echo #
+--echo # Bug#11765416 58381: FAILED DROP DATABASE CAN BREAK STATEMENT
+--echo #              BASED REPLICATION
+--echo #
+
+USE test;
+--disable_warnings
+DROP DATABASE IF EXISTS db1;
+DROP TABLE IF EXISTS t3;
+--enable_warnings
+
+CREATE DATABASE db1;
+CREATE TABLE db1.t1 (a INT);
+CREATE TABLE db1.t2 (b INT, KEY(b)) engine=innodb;
+CREATE TABLE t3 (a INT, KEY (a), FOREIGN KEY(a) REFERENCES db1.t2(b))
+  engine=innodb;
+RESET MASTER;
+
+--error ER_ROW_IS_REFERENCED
+DROP DATABASE db1;                      # Fails because of the fk
+SHOW TABLES FROM db1;                   # t1 was dropped, t2 remains
+--source include/show_binlog_events.inc # Check that the binlog drops t1
+
+# Cleanup
+DROP TABLE t3;
+DROP DATABASE db1;

=== modified file 'mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test'
--- a/mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test	2010-12-19 17:22:30 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test	2011-02-23 20:01:27 +0000
@@ -388,6 +388,7 @@ source include/start_slave.inc;
 CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage.*");
 CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_stmt_cache_size' bytes of storage.*");
 CALL mtr.add_suppression("Writing one row to the row-based binary log failed.*");
+CALL mtr.add_suppression("Slave SQL.*The incident LOST_EVENTS occured on the master. Message: error writing to the binary log");
 
 connection master;
 TRUNCATE t1;

=== modified file 'mysql-test/extra/rpl_tests/rpl_conflicts.test'
--- a/mysql-test/extra/rpl_tests/rpl_conflicts.test	2011-02-07 15:31:01 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_conflicts.test	2011-02-23 20:01:27 +0000
@@ -97,6 +97,7 @@ if (`SELECT @@global.binlog_format != 'R
   --disable_query_log
   --eval SELECT "$err" as 'Last_SQL_Error (expected "duplicate key" error)'
   --enable_query_log
+  call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.* Error_code: 1062");
 
   SELECT * FROM t1;
 
@@ -141,6 +142,7 @@ connection slave;
 # replication continues.
 if (`SELECT @@global.binlog_format = 'ROW' AND @@global.slave_exec_mode = 'STRICT'`) {
   --echo ---- Wait until slave stops with an error ----
+  call mtr.add_suppression("Slave SQL.*Can.t find record in .t1., Error_code: 1032");
   let $slave_sql_errno= 1032; # ER_KEY_NOT_FOUND
   source include/wait_for_slave_sql_error.inc;
 

=== modified file 'mysql-test/extra/rpl_tests/rpl_extra_col_master.test'
--- a/mysql-test/extra/rpl_tests/rpl_extra_col_master.test	2010-12-19 17:22:30 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_extra_col_master.test	2011-02-23 20:01:27 +0000
@@ -121,6 +121,13 @@ SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9,
        hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20;
 
 #connection slave;
+
+call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535");
+call mtr.add_suppression("Slave SQL.*Error .Can.t DROP .c7.; check that column.key exists. on query.* 1091");
+call mtr.add_suppression("Slave SQL.*Error .Unknown column .c7. in .t15.. on query.* 1054");
+call mtr.add_suppression("Slave SQL.*Error .Key column .c6. doesn.t exist in table. on query.* 1072");
+call mtr.add_suppression("Slave SQL.*Column 2 of table .test.t1.. cannot be converted from type.* Error_code: 1677");
+
 sync_slave_with_master;
 --echo
 --echo * Select count and 20 rows from Slave *

=== modified file 'mysql-test/extra/rpl_tests/rpl_extra_col_slave.test'
--- a/mysql-test/extra/rpl_tests/rpl_extra_col_slave.test	2010-12-19 17:22:30 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_extra_col_slave.test	2011-02-23 20:01:27 +0000
@@ -14,6 +14,7 @@
 #################################################
 
 call mtr.add_suppression("Slave: Unknown table 'test.t6' Error_code: 1051");
+call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]*. cannot be converted from type.* Error_code: 1677");
 
 --echo **** Diff Table Def Start ****
 
@@ -769,6 +770,10 @@ RESET MASTER;
 connection slave;
 START SLAVE;
 
+call mtr.add_suppression("Error .Unknown table .t6.. on query.* Error_code: 1051");
+call mtr.add_suppression("Error .Duplicate column name .c6.. on query.* Error_code: 1060");
+call mtr.add_suppression("Table definition on master and slave does not match: Column . ...e mismatch.* Error_code: 1535");
+
 --echo *** Master Data Insert ***
 connection master;
 set @b1 = 'b1b1b1b1';

=== modified file 'mysql-test/extra/rpl_tests/rpl_loaddata.test'
--- a/mysql-test/extra/rpl_tests/rpl_loaddata.test	2010-12-19 17:22:30 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_loaddata.test	2011-02-23 20:01:27 +0000
@@ -69,6 +69,8 @@ eval $lower_stmt_head infile '../../std_
 save_master_pos;
 connection slave;
 # 1062 = ER_DUP_ENTRY
+call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* Error_code: 1062");
+call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*Error_code: 0");
 --let $slave_sql_errno= 1062
 --source include/wait_for_slave_sql_error_and_skip.inc
 

=== modified file 'mysql-test/extra/rpl_tests/rpl_row_basic.test'
--- a/mysql-test/extra/rpl_tests/rpl_row_basic.test	2010-12-19 17:22:30 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_row_basic.test	2011-02-23 20:01:27 +0000
@@ -382,6 +382,9 @@ source include/diff_tables.inc;
 
 connection slave;
 SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
+call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* Error_code: 1535");
+call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table test.t1.* Error_code: 1032");
+call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t.. cannot be converted from type.*, Error_code: 1677");
 
 --let $rpl_only_running_threads= 1
 --source include/rpl_reset.inc

=== modified file 'mysql-test/extra/rpl_tests/rpl_row_empty_imgs.test'
--- a/mysql-test/extra/rpl_tests/rpl_row_empty_imgs.test	2010-12-19 17:22:30 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_row_empty_imgs.test	2011-02-23 20:01:27 +0000
@@ -205,6 +205,7 @@ if ($lower_engine == ndb)
 
 SET SQL_LOG_BIN=0;
 call mtr.add_suppression("Slave: Can\'t find record in \'t1\' Error_code: 1032");
+call mtr.add_suppression("Slave SQL: Could not execute Update_rows event on table test.t1; Can.t find record in .t1.* Error_code: 1032");
 SET SQL_LOG_BIN=1;
 
 # NOTE: Because of BUG#52473, when using NDB this will make the test

=== modified file 'mysql-test/extra/rpl_tests/rpl_row_tabledefs.test'
--- a/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test	2010-06-22 09:34:59 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test	2011-02-23 20:01:27 +0000
@@ -147,6 +147,8 @@ sync_slave_with_master;
 connection master;
 INSERT INTO t4 VALUES (4);
 connection slave;
+call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column [012] type mismatch.* Error_code: 1535");
+call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]. cannot be converted from type.* Error_code: 1677");
 --let $slave_skip_counter= 2
 --let $slave_sql_errno= 1677
 --let $show_slave_sql_error= 1

=== modified file 'mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test'
--- a/mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test	2011-02-07 15:31:01 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test	2011-02-23 20:01:27 +0000
@@ -24,6 +24,7 @@ insert into t1 values(1),(2);
 drop table t1;
 
 connection slave;
+call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.* error code=1062.*Error on slave:.* Error_code: 0");
 --echo (expect different error codes on master and slave)
 --let $slave_sql_errno= 0
 --let $show_slave_sql_error= 1

=== modified file 'mysql-test/extra/rpl_tests/rpl_stop_middle_group.test'
--- a/mysql-test/extra/rpl_tests/rpl_stop_middle_group.test	2011-02-14 16:32:36 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_stop_middle_group.test	2011-02-23 20:01:27 +0000
@@ -23,6 +23,8 @@ insert into tm set a=null; # to simulate
 commit;
 
 connection slave;
+call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table");
+call mtr.add_suppression("Slave SQL.*The slave SQL is stopped, leaving the current group of events unfinished with a non-transaction table changed.");
 
 # slave will catch the killed status but won't shut down immediately
 # only after the whole group has done (commit)

=== modified file 'mysql-test/include/mtr_warnings.sql'
--- a/mysql-test/include/mtr_warnings.sql	2011-02-02 13:41:10 +0000
+++ b/mysql-test/include/mtr_warnings.sql	2011-02-23 20:01:27 +0000
@@ -125,7 +125,6 @@ INSERT INTO global_suppressions VALUES
  ("Slave: The incident LOST_EVENTS occured on the master"),
  ("Slave: Unknown error.* 1105"),
  ("Slave: Can't drop database.* database doesn't exist"),
- ("Slave SQL:.*(Error_code: \[\[:digit:\]\]+|Query:.*)"),
  ("Sort aborted"),
  ("Time-out in NDB"),
  ("Warning:\s+One can only use the --user.*root"),

=== modified file 'mysql-test/include/wait_for_status_var.inc'
--- a/mysql-test/include/wait_for_status_var.inc	2011-02-27 20:23:44 +0000
+++ b/mysql-test/include/wait_for_status_var.inc	2011-03-15 21:46:30 +0000
@@ -81,7 +81,7 @@ while (`$_query`)
   sleep 0.1;
   let $_show_status_value= query_get_value("SHOW $status_type STATUS LIKE '$status_var'", Value, 1);
   let $_query= SELECT NOT('$_show_status_value' $_status_var_comparsion '$status_var_value');
-  if ($is_number)
+  if ($_is_number)
   {
     let $_query= SELECT NOT($_show_status_value $_status_var_comparsion $status_var_value);
   }

=== modified file 'mysql-test/lib/My/Find.pm'
--- a/mysql-test/lib/My/Find.pm	2011-01-18 10:21:37 +0000
+++ b/mysql-test/lib/My/Find.pm	2011-02-24 14:11:05 +0000
@@ -28,8 +28,6 @@ use My::Platform;
 use base qw(Exporter);
 our @EXPORT= qw(my_find_bin my_find_dir my_find_file NOT_REQUIRED);
 
-our $vs_config_dir;
-
 my $bin_extension= ".exe" if IS_WINDOWS;
 
 # Helper function to be used for fourth parameter to find functions
@@ -158,7 +156,8 @@ sub my_find_paths {
   # User can select to look in a special build dir
   # which is a subdirectory of any of the paths
   my @extra_dirs;
-  my $build_dir= $vs_config_dir || $ENV{MTR_VS_CONFIG} || $ENV{MTR_BUILD_DIR};
+  my $build_dir= $::opt_config_dir || $ENV{MTR_VS_CONFIG}
+                                   || $ENV{MTR_BUILD_DIR};
   push(@extra_dirs, $build_dir) if defined $build_dir;
 
   if (defined $extension){

=== modified file 'mysql-test/lib/mtr_cases.pm'
--- a/mysql-test/lib/mtr_cases.pm	2011-01-18 11:09:49 +0000
+++ b/mysql-test/lib/mtr_cases.pm	2011-03-08 09:43:05 +0000
@@ -287,9 +287,11 @@ sub collect_one_suite($)
 			      "mysql-test/suite",
 			      "mysql-test",
 			      # Look in storage engine specific suite dirs
-			      "storage/*/mysql-test-suites"
+			      "storage/*/mtr",
+			      # Look in plugin specific suite dir
+			      "plugin/$suite/tests",
 			     ],
-			     [$suite]);
+			     [$suite, "mtr"]);
     }
     mtr_verbose("suitedir: $suitedir");
   }

=== modified file 'mysql-test/lib/mtr_report.pm'
--- a/mysql-test/lib/mtr_report.pm	2011-01-18 10:21:37 +0000
+++ b/mysql-test/lib/mtr_report.pm	2011-02-28 15:11:53 +0000
@@ -32,6 +32,7 @@ our @EXPORT= qw(report_option mtr_print_
 use mtr_match;
 use My::Platform;
 use POSIX qw[ _exit ];
+use IO::Handle qw[ flush ];
 require "mtr_io.pl";
 
 my $tot_real_time= 0;
@@ -72,7 +73,7 @@ sub _mtr_report_test_name ($) {
   print _name(). _timestamp();
   printf "%-40s ", $tname;
   my $worker = $tinfo->{worker};
-  printf "w$worker " if $worker;
+  print "w$worker " if defined $worker;
 
   return $tname;
 }
@@ -487,6 +488,7 @@ sub mtr_warning (@) {
 
 # Print error to screen and then exit
 sub mtr_error (@) {
+  IO::Handle::flush(\*STDOUT) if IS_WINDOWS;
   print STDERR _name(). _timestamp().
     "mysql-test-run: *** ERROR: ". join(" ", @_). "\n";
   if (IS_WINDOWS)

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2011-03-09 14:30:37 +0000
+++ b/mysql-test/mysql-test-run.pl	2011-03-11 09:58:45 +0000
@@ -195,6 +195,10 @@ my $opt_debug_common;
 our $opt_debug_server;
 our @opt_cases;                  # The test cases names in argv
 our $opt_embedded_server;
+# -1 indicates use default, override with env.var.
+my $opt_ctest= env_or_val(MTR_UNIT_TESTS => -1);
+# Unit test report stored here for delayed printing
+my $ctest_report;
 
 # Options used when connecting to an already running server
 my %opts_extern;
@@ -494,6 +498,10 @@ sub main {
     mtr_error("Not all tests completed");
   }
 
+  mark_time_used('init');
+
+  push @$completed, run_ctest() if $opt_ctest;
+
   mtr_print_line();
 
   if ( $opt_gcov ) {
@@ -501,6 +509,11 @@ sub main {
 		 $opt_gcov_msg, $opt_gcov_err);
   }
 
+  if ($ctest_report) {
+    print "$ctest_report\n";
+    mtr_print_line();
+  }
+
   print_total_times($opt_parallel) if $opt_report_times;
 
   mtr_report_stats("Completed", $completed);
@@ -1057,6 +1070,7 @@ sub command_line_setup {
 	     'max-connections=i'        => \$opt_max_connections,
 	     'default-myisam!'          => \&collect_option,
 	     'report-times'             => \$opt_report_times,
+	     'unit-tests!'              => \$opt_ctest,
 
              'help|h'                   => \$opt_usage,
 	     # list-options is internal, not listed in help
@@ -1487,6 +1501,14 @@ sub command_line_setup {
   }
 
   # --------------------------------------------------------------------------
+  # Don't run ctest if tests or suites named
+  # --------------------------------------------------------------------------
+
+  $opt_ctest= 0 if $opt_ctest == -1 && ($opt_suites || @opt_cases);
+  # Override: disable if running in the PB test environment
+  $opt_ctest= 0 if $opt_ctest == -1 && defined $ENV{PB2WORKDIR};
+
+  # --------------------------------------------------------------------------
   # Check use of wait-all
   # --------------------------------------------------------------------------
 
@@ -5678,6 +5700,78 @@ sub valgrind_exit_reports() {
   return $found_err;
 }
 
+sub run_ctest() {
+  my $olddir= getcwd();
+  chdir ($bindir) or die ("Could not chdir to $bindir");
+  my $tinfo;
+  my $no_ctest= (IS_WINDOWS) ? 256 : -1;
+  my $ctest_vs= "";
+
+  # Just ignore if not configured/built to run ctest
+  if (! -f "CTestTestfile.cmake") {
+    chdir($olddir);
+    return;
+  }
+
+  # Add vs-config option if needed
+  $ctest_vs= "-C $opt_vs_config" if $opt_vs_config;
+
+  # Also silently ignore if we don't have ctest and didn't insist
+  # Special override: also ignore in Pushbuild, some platforms may not have it
+  # Now, run ctest and collect output
+  my $ctest_out= `ctest $ctest_vs 2>&1`;
+  if ($? == $no_ctest && $opt_ctest == -1 && ! defined $ENV{PB2WORKDIR}) {
+    chdir($olddir);
+    return;
+  }
+
+  # Create minimalistic "test" for the reporting
+  $tinfo = My::Test->new
+    (
+     name           => 'unit_tests',
+    );
+  # Set dummy worker id to align report with normal tests
+  $tinfo->{worker} = 0 if $opt_parallel > 1;
+
+  my $ctfail= 0;		# Did ctest fail?
+  if ($?) {
+    $ctfail= 1;
+    $tinfo->{result}= 'MTR_RES_FAILED';
+    $tinfo->{comment}= "ctest failed with exit code $?, see result below";
+    $ctest_out= "" unless $ctest_out;
+  }
+  my $ctfile= "$opt_vardir/ctest.log";
+  my $ctres= 0;			# Did ctest produce report summary?
+
+  open (CTEST, " > $ctfile") or die ("Could not open output file $ctfile");
+
+  # Put ctest output in log file, while analyzing results
+  for (split ('\n', $ctest_out)) {
+    print CTEST "$_\n";
+    if (/tests passed/) {
+      $ctres= 1;
+      $ctest_report .= "\nUnit tests: $_\n";
+    }
+    if ( /FAILED/ or /\(Failed\)/ ) {
+      $ctfail= 1;
+      $ctest_report .= "  $_\n";
+    }
+  }
+  close CTEST;
+
+  # Set needed 'attributes' for test reporting
+  $tinfo->{comment}.= "\nctest did not pruduce report summary" if ! $ctres;
+  $tinfo->{result}= ($ctres && !$ctfail)
+    ? 'MTR_RES_PASSED' : 'MTR_RES_FAILED';
+  $ctest_report .= "Report from unit tests in $ctfile";
+  $tinfo->{failures}= ($tinfo->{result} eq 'MTR_RES_FAILED');
+
+  mark_time_used('test');
+  mtr_report_test($tinfo);
+  chdir($olddir);
+  return $tinfo;
+}
+
 #
 # Usage
 #
@@ -5897,6 +5991,9 @@ Misc options
                         engine to InnoDB.
   report-times          Report how much time has been spent on different
                         phases of test execution.
+  nounit-tests          Do not run unit tests. Normally run if configured
+                        and if not running named tests/suites
+  unit-tests            Run unit tests even if they would otherwise not be run
 
 Some options that control enabling a feature for normal test runs,
 can be turned off by prepending 'no' to the option, e.g. --notimer.

=== modified file 'mysql-test/r/archive_plugin.result'
--- a/mysql-test/r/archive_plugin.result	2010-04-27 08:29:51 +0000
+++ b/mysql-test/r/archive_plugin.result	2011-03-14 13:19:13 +0000
@@ -10,6 +10,9 @@ UNINSTALL PLUGIN archive;
 INSTALL PLUGIN archive SONAME 'ha_archive.so';
 CREATE TABLE t1(a int) ENGINE=ARCHIVE;
 DROP TABLE t1;
+SELECT 1;
+1
+1
 UNINSTALL PLUGIN archive;
 UNINSTALL PLUGIN archive;
 ERROR 42000: PLUGIN archive does not exist

=== modified file 'mysql-test/r/blackhole_plugin.result'
--- a/mysql-test/r/blackhole_plugin.result	2010-04-27 08:29:51 +0000
+++ b/mysql-test/r/blackhole_plugin.result	2011-03-14 13:19:13 +0000
@@ -10,6 +10,9 @@ UNINSTALL PLUGIN blackhole;
 INSTALL PLUGIN blackhole SONAME 'ha_blackhole.so';
 CREATE TABLE t1(a int) ENGINE=BLACKHOLE;
 DROP TABLE t1;
+SELECT 1;
+1
+1
 UNINSTALL PLUGIN blackhole;
 UNINSTALL PLUGIN blackhole;
 ERROR 42000: PLUGIN blackhole does not exist

=== modified file 'mysql-test/r/flush_read_lock.result'
--- a/mysql-test/r/flush_read_lock.result	2010-11-11 17:11:05 +0000
+++ b/mysql-test/r/flush_read_lock.result	2011-02-23 11:54:58 +0000
@@ -431,6 +431,7 @@ Success: Was able to run 'execute stmt1'
 Success: Was able to run 'execute stmt1' with FTWRL active in another connection.
 Success: Was able to run FTWRL while 'execute stmt1' was active in another connection.
 deallocate prepare stmt1;
+call mtr.add_suppression("Slave SQL.*Can.t execute the query because you have a conflicting read lock., Error_code: 1223");
 #
 # 9.2.b) EXECUTE for statement which is incompatible with FTWRL
 #        should be also incompatible.

=== modified file 'mysql-test/r/func_analyse.result'
--- a/mysql-test/r/func_analyse.result	2010-07-13 17:29:44 +0000
+++ b/mysql-test/r/func_analyse.result	2011-03-14 18:11:41 +0000
@@ -124,6 +124,19 @@ ERROR HY000: Incorrect usage of PROCEDUR
 DROP TABLE t1;
 End of 5.0 tests
 #
+# Bug#11765202: Dbug_violation_helper::~Dbug_violation_helper(): Assertion `!_entered' failed.
+#
+DROP TABLE IF EXISTS t1;
+Warnings:
+Note	1051	Unknown table 'test.t1'
+CREATE TABLE t1 (a VARCHAR(2) CHARSET UTF8 NOT NULL);
+INSERT INTO t1 VALUES ('e'),('e'),('e-');
+SELECT * FROM t1 PROCEDURE ANALYSE();
+Field_name	Min_value	Max_value	Min_length	Max_length	Empties_or_zeros	Nulls	Avg_value_or_avg_length	Std	Optimal_fieldtype
+test.t1.a	e	e-	1	2	0	0	1.3333	NULL	ENUM('e','e-') NOT NULL
+DROP TABLE t1;
+End of 5.1 tests
+#
 # Bug #47338 assertion in handler::ha_external_lock
 #
 drop table if exists t1;

=== modified file 'mysql-test/r/information_schema.result'
--- a/mysql-test/r/information_schema.result	2010-12-17 18:43:38 +0000
+++ b/mysql-test/r/information_schema.result	2011-03-11 18:53:12 +0000
@@ -1,5 +1,13 @@
 DROP TABLE IF EXISTS t0,t1,t2,t3,t4,t5;
 DROP VIEW IF EXISTS v1;
+#
+# Bug#11763174 INFORMATION_SCHEMA.PARAMETERS.NUMERIC_PRECISION SHOULD BE BIGINT 
+#
+select table_name, data_type, column_type from information_schema.columns  where column_name = 'numeric_precision' and table_schema = 'information_schema';
+table_name	data_type	column_type
+COLUMNS	bigint	bigint(21) unsigned
+PARAMETERS	bigint	bigint(21) unsigned
+ROUTINES	bigint	bigint(21) unsigned
 show variables where variable_name like "skip_show_database";
 Variable_name	Value
 skip_show_database	OFF

=== modified file 'mysql-test/r/information_schema_parameters.result'
--- a/mysql-test/r/information_schema_parameters.result	2010-07-09 12:55:13 +0000
+++ b/mysql-test/r/information_schema_parameters.result	2011-03-11 18:53:12 +0000
@@ -12,7 +12,7 @@ PARAMETERS	CREATE TEMPORARY TABLE `PARAM
   `DATA_TYPE` varchar(64) NOT NULL DEFAULT '',
   `CHARACTER_MAXIMUM_LENGTH` int(21) DEFAULT NULL,
   `CHARACTER_OCTET_LENGTH` int(21) DEFAULT NULL,
-  `NUMERIC_PRECISION` int(21) DEFAULT NULL,
+  `NUMERIC_PRECISION` bigint(21) unsigned DEFAULT NULL,
   `NUMERIC_SCALE` int(21) DEFAULT NULL,
   `CHARACTER_SET_NAME` varchar(64) DEFAULT NULL,
   `COLLATION_NAME` varchar(64) DEFAULT NULL,
@@ -201,14 +201,14 @@ COLUMN_NAME	NUMERIC_PRECISION
 ORDINAL_POSITION	10
 COLUMN_DEFAULT	NULL
 IS_NULLABLE	YES
-DATA_TYPE	int
+DATA_TYPE	bigint
 CHARACTER_MAXIMUM_LENGTH	NULL
 CHARACTER_OCTET_LENGTH	NULL
-NUMERIC_PRECISION	10
+NUMERIC_PRECISION	20
 NUMERIC_SCALE	0
 CHARACTER_SET_NAME	NULL
 COLLATION_NAME	NULL
-COLUMN_TYPE	int(21)
+COLUMN_TYPE	bigint(21) unsigned
 COLUMN_KEY	
 EXTRA	
 PRIVILEGES	#
@@ -319,7 +319,7 @@ PARAMETER_NAME	varchar(64)	YES		NULL	
 DATA_TYPE	varchar(64)	NO			
 CHARACTER_MAXIMUM_LENGTH	int(21)	YES		NULL	
 CHARACTER_OCTET_LENGTH	int(21)	YES		NULL	
-NUMERIC_PRECISION	int(21)	YES		NULL	
+NUMERIC_PRECISION	bigint(21) unsigned	YES		NULL	
 NUMERIC_SCALE	int(21)	YES		NULL	
 CHARACTER_SET_NAME	varchar(64)	YES		NULL	
 COLLATION_NAME	varchar(64)	YES		NULL	

=== modified file 'mysql-test/r/information_schema_routines.result'
--- a/mysql-test/r/information_schema_routines.result	2010-07-09 12:55:13 +0000
+++ b/mysql-test/r/information_schema_routines.result	2011-03-11 18:53:12 +0000
@@ -11,7 +11,7 @@ ROUTINES	CREATE TEMPORARY TABLE `ROUTINE
   `DATA_TYPE` varchar(64) NOT NULL DEFAULT '',
   `CHARACTER_MAXIMUM_LENGTH` int(21) DEFAULT NULL,
   `CHARACTER_OCTET_LENGTH` int(21) DEFAULT NULL,
-  `NUMERIC_PRECISION` int(21) DEFAULT NULL,
+  `NUMERIC_PRECISION` bigint(21) unsigned DEFAULT NULL,
   `NUMERIC_SCALE` int(21) DEFAULT NULL,
   `CHARACTER_SET_NAME` varchar(64) DEFAULT NULL,
   `COLLATION_NAME` varchar(64) DEFAULT NULL,
@@ -197,14 +197,14 @@ COLUMN_NAME	NUMERIC_PRECISION
 ORDINAL_POSITION	9
 COLUMN_DEFAULT	NULL
 IS_NULLABLE	YES
-DATA_TYPE	int
+DATA_TYPE	bigint
 CHARACTER_MAXIMUM_LENGTH	NULL
 CHARACTER_OCTET_LENGTH	NULL
-NUMERIC_PRECISION	10
+NUMERIC_PRECISION	20
 NUMERIC_SCALE	0
 CHARACTER_SET_NAME	NULL
 COLLATION_NAME	NULL
-COLUMN_TYPE	int(21)
+COLUMN_TYPE	bigint(21) unsigned
 COLUMN_KEY	
 EXTRA	
 PRIVILEGES	#
@@ -618,7 +618,7 @@ ROUTINE_TYPE	varchar(9)	NO			
 DATA_TYPE	varchar(64)	NO			
 CHARACTER_MAXIMUM_LENGTH	int(21)	YES		NULL	
 CHARACTER_OCTET_LENGTH	int(21)	YES		NULL	
-NUMERIC_PRECISION	int(21)	YES		NULL	
+NUMERIC_PRECISION	bigint(21) unsigned	YES		NULL	
 NUMERIC_SCALE	int(21)	YES		NULL	
 CHARACTER_SET_NAME	varchar(64)	YES		NULL	
 COLLATION_NAME	varchar(64)	YES		NULL	

=== modified file 'mysql-test/r/mysqld--help-notwin.result'
--- a/mysql-test/r/mysqld--help-notwin.result	2011-02-28 16:24:05 +0000
+++ b/mysql-test/r/mysqld--help-notwin.result	2011-03-16 08:58:26 +0000
@@ -320,6 +320,10 @@ The following options may be given as th
  max_join_size records return an error
  --max-length-for-sort-data=# 
  Max number of bytes in sorted records
+ --max-long-data-size=# 
+ The maximum BLOB length to send to server from
+ mysql_send_long_data API. Deprecated option; use
+ max_allowed_packet instead.
  --max-prepared-stmt-count=# 
  Maximum number of prepared statements in the server
  --max-relay-log-size=# 
@@ -854,6 +858,7 @@ max-error-count 64
 max-heap-table-size 16777216
 max-join-size 18446744073709551615
 max-length-for-sort-data 1024
+max-long-data-size 1048576
 max-prepared-stmt-count 16382
 max-relay-log-size 0
 max-seeks-for-key 18446744073709551615

=== modified file 'mysql-test/r/mysqld--help-win.result'
--- a/mysql-test/r/mysqld--help-win.result	2011-03-11 20:47:31 +0000
+++ b/mysql-test/r/mysqld--help-win.result	2011-03-16 08:58:26 +0000
@@ -319,6 +319,10 @@ The following options may be given as th
  max_join_size records return an error
  --max-length-for-sort-data=# 
  Max number of bytes in sorted records
+ --max-long-data-size=# 
+ The maximum BLOB length to send to server from
+ mysql_send_long_data API. Deprecated option; use
+ max_allowed_packet instead.
  --max-prepared-stmt-count=# 
  Maximum number of prepared statements in the server
  --max-relay-log-size=# 
@@ -857,6 +861,7 @@ max-error-count 64
 max-heap-table-size 16777216
 max-join-size 18446744073709551615
 max-length-for-sort-data 1024
+max-long-data-size 1048576
 max-prepared-stmt-count 16382
 max-relay-log-size 0
 max-seeks-for-key 18446744073709551615

=== modified file 'mysql-test/r/mysqltest.result'
--- a/mysql-test/r/mysqltest.result	2011-01-12 10:22:11 +0000
+++ b/mysql-test/r/mysqltest.result	2011-03-07 15:17:39 +0000
@@ -412,9 +412,8 @@ mysqltest: At line 1: Cannot perform inc
 mysqltest: At line 1: End of line junk detected: "1000"
 mysqltest: At line 1: Cannot perform inc/dec on a non-numeric value
 mysqltest: At line 1: Cannot perform inc/dec on a non-numeric value
-mysqltest: At line 1: Missing arguments to system, nothing to do!
-mysqltest: At line 1: Missing arguments to system, nothing to do!
-system command 'NonExistsinfComamdn 2> /dev/null' failed
+mysqltest: At line 1: 'system' command  is deprecated, use exec or
+  see the manual for portable commands to use
 test
 test2
 test3

=== added file 'mysql-test/r/ssl_cipher.result'
--- a/mysql-test/r/ssl_cipher.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/r/ssl_cipher.result	2011-03-11 10:46:34 +0000
@@ -0,0 +1,9 @@
+#
+# BUG#11760210 - SSL_CIPHER_LIST NOT SET OR RETURNED FOR "SHOW STATUS LIKE 'SSL_CIPHER_LIST'"
+#
+SHOW STATUS LIKE 'Ssl_cipher';
+Variable_name	Value
+Ssl_cipher	AES128-SHA
+SHOW STATUS LIKE 'Ssl_cipher_list';
+Variable_name	Value
+Ssl_cipher_list	AES128-SHA

=== modified file 'mysql-test/r/system_mysql_db.result'
--- a/mysql-test/r/system_mysql_db.result	2011-02-10 11:13:41 +0000
+++ b/mysql-test/r/system_mysql_db.result	2011-03-14 18:43:19 +0000
@@ -122,7 +122,7 @@ user	CREATE TABLE `user` (
   `max_updates` int(11) unsigned NOT NULL DEFAULT '0',
   `max_connections` int(11) unsigned NOT NULL DEFAULT '0',
   `max_user_connections` int(11) unsigned NOT NULL DEFAULT '0',
-  `plugin` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+  `plugin` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
   `authentication_string` text COLLATE utf8_bin NOT NULL,
   PRIMARY KEY (`Host`,`User`)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'

=== modified file 'mysql-test/r/variables.result'
--- a/mysql-test/r/variables.result	2011-02-10 08:52:44 +0000
+++ b/mysql-test/r/variables.result	2011-03-15 13:03:22 +0000
@@ -1529,6 +1529,9 @@ ERROR HY000: Cannot drop default keycach
 SET @@global.key_cache_block_size=0;
 Warnings:
 Warning	1292	Truncated incorrect key_cache_block_size value: '0'
+select @@max_long_data_size;
+@@max_long_data_size
+1048576
 SET @@global.max_binlog_cache_size=DEFAULT;
 SET @@global.binlog_cache_size=DEFAULT;
 SET @@global.max_join_size=DEFAULT;

=== modified file 'mysql-test/suite/binlog/r/binlog_base64_flag.result'
--- a/mysql-test/suite/binlog/r/binlog_base64_flag.result	2010-12-02 13:44:21 +0000
+++ b/mysql-test/suite/binlog/r/binlog_base64_flag.result	2011-02-23 20:01:27 +0000
@@ -91,6 +91,9 @@ iONkSBcBAAAAKwAAAMQBAAAQABAAAAAAAAEAA//4
 ';
 ERROR HY000: master may suffer from http://bugs.mysql.com/bug.php?id=37426 so slave stops; check error log on slave for more info
 drop table t1, char63_utf8, char128_utf8;
+call mtr.add_suppression("Slave SQL.*master suffers from this bug: http:..bugs.mysql.com.bug.php.id=37426.* Error_code: 1105");
+call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* Error_code: 1535");
+call mtr.add_suppression("Slave SQL.*Column 1 of table .test.char128_utf8. cannot be converted.* Error_code: 1677");
 #
 # Bug #54393: crash and/or valgrind errors in 
 # mysql_client_binlog_statement

=== modified file 'mysql-test/suite/binlog/r/binlog_database.result'
--- a/mysql-test/suite/binlog/r/binlog_database.result	2010-08-20 03:37:42 +0000
+++ b/mysql-test/suite/binlog/r/binlog_database.result	2011-03-15 10:54:06 +0000
@@ -59,6 +59,29 @@ ERROR HY000: Error dropping database (ca
 # Remove the fake file.
 # Now we can drop the database.
 DROP DATABASE testing_1;
+#
+# Bug#11765416 58381: FAILED DROP DATABASE CAN BREAK STATEMENT
+#              BASED REPLICATION
+#
+USE test;
+DROP DATABASE IF EXISTS db1;
+DROP TABLE IF EXISTS t3;
+CREATE DATABASE db1;
+CREATE TABLE db1.t1 (a INT);
+CREATE TABLE db1.t2 (b INT, KEY(b)) engine=innodb;
+CREATE TABLE t3 (a INT, KEY (a), FOREIGN KEY(a) REFERENCES db1.t2(b))
+engine=innodb;
+RESET MASTER;
+DROP DATABASE db1;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
+SHOW TABLES FROM db1;
+Tables_in_db1
+t2
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `db1`; DROP TABLE IF EXISTS `t1`
+DROP TABLE t3;
+DROP DATABASE db1;
 set binlog_format=mixed;
 reset master;
 create database testing_1;
@@ -120,6 +143,29 @@ ERROR HY000: Error dropping database (ca
 # Remove the fake file.
 # Now we can drop the database.
 DROP DATABASE testing_1;
+#
+# Bug#11765416 58381: FAILED DROP DATABASE CAN BREAK STATEMENT
+#              BASED REPLICATION
+#
+USE test;
+DROP DATABASE IF EXISTS db1;
+DROP TABLE IF EXISTS t3;
+CREATE DATABASE db1;
+CREATE TABLE db1.t1 (a INT);
+CREATE TABLE db1.t2 (b INT, KEY(b)) engine=innodb;
+CREATE TABLE t3 (a INT, KEY (a), FOREIGN KEY(a) REFERENCES db1.t2(b))
+engine=innodb;
+RESET MASTER;
+DROP DATABASE db1;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
+SHOW TABLES FROM db1;
+Tables_in_db1
+t2
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `db1`; DROP TABLE IF EXISTS `t1`
+DROP TABLE t3;
+DROP DATABASE db1;
 set binlog_format=row;
 reset master;
 create database testing_1;
@@ -182,6 +228,29 @@ ERROR HY000: Error dropping database (ca
 # Remove the fake file.
 # Now we can drop the database.
 DROP DATABASE testing_1;
+#
+# Bug#11765416 58381: FAILED DROP DATABASE CAN BREAK STATEMENT
+#              BASED REPLICATION
+#
+USE test;
+DROP DATABASE IF EXISTS db1;
+DROP TABLE IF EXISTS t3;
+CREATE DATABASE db1;
+CREATE TABLE db1.t1 (a INT);
+CREATE TABLE db1.t2 (b INT, KEY(b)) engine=innodb;
+CREATE TABLE t3 (a INT, KEY (a), FOREIGN KEY(a) REFERENCES db1.t2(b))
+engine=innodb;
+RESET MASTER;
+DROP DATABASE db1;
+ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
+SHOW TABLES FROM db1;
+Tables_in_db1
+t2
+show binlog events from <binlog_start>;
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Query	#	#	use `db1`; DROP TABLE IF EXISTS `t1`
+DROP TABLE t3;
+DROP DATABASE db1;
 show databases;
 Database
 information_schema

=== added file 'mysql-test/suite/binlog/r/binlog_incident_ignore.result'
--- a/mysql-test/suite/binlog/r/binlog_incident_ignore.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/binlog/r/binlog_incident_ignore.result	2011-03-14 17:55:26 +0000
@@ -0,0 +1,13 @@
+RESET MASTER;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT * FROM t1;
+a
+1
+2
+3
+REPLACE INTO t1 VALUES (4);
+DROP TABLE t1;
+FLUSH LOGS;
+Contain RELOAD DATABASE
+1

=== modified file 'mysql-test/suite/binlog/r/binlog_row_binlog.result'
--- a/mysql-test/suite/binlog/r/binlog_row_binlog.result	2010-12-05 22:51:49 +0000
+++ b/mysql-test/suite/binlog/r/binlog_row_binlog.result	2011-02-23 20:01:27 +0000
@@ -804,6 +804,7 @@ unique_checks	OFF
 # INSERT INTO t1 VALUES(2)
 # foreign_key_checks=1 and unique_checks=1
 # It should not change current session's variables, even error happens
+call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.t1; Duplicate entry .2. for key .PRIMARY., Error_code: 1062");
 BINLOG '
 dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
 dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==

=== modified file 'mysql-test/suite/binlog/r/binlog_stm_binlog.result'
--- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result	2010-12-05 22:51:49 +0000
+++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result	2011-02-23 20:01:27 +0000
@@ -572,6 +572,7 @@ unique_checks	OFF
 # INSERT INTO t1 VALUES(2)
 # foreign_key_checks=1 and unique_checks=1
 # It should not change current session's variables, even error happens
+call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.t1; Duplicate entry .2. for key .PRIMARY., Error_code: 1062");
 BINLOG '
 dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
 dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==

=== modified file 'mysql-test/suite/binlog/t/binlog_base64_flag.test'
--- a/mysql-test/suite/binlog/t/binlog_base64_flag.test	2010-12-02 13:44:21 +0000
+++ b/mysql-test/suite/binlog/t/binlog_base64_flag.test	2011-02-23 20:01:27 +0000
@@ -151,6 +151,9 @@ iONkSBcBAAAAKwAAAMQBAAAQABAAAAAAAAEAA//4
 
 drop table t1, char63_utf8, char128_utf8;
 
+call mtr.add_suppression("Slave SQL.*master suffers from this bug: http:..bugs.mysql.com.bug.php.id=37426.* Error_code: 1105");
+call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* Error_code: 1535");
+call mtr.add_suppression("Slave SQL.*Column 1 of table .test.char128_utf8. cannot be converted.* Error_code: 1677");
 
 --echo #
 --echo # Bug #54393: crash and/or valgrind errors in 

=== added file 'mysql-test/suite/binlog/t/binlog_incident_ignore-master.opt'
--- a/mysql-test/suite/binlog/t/binlog_incident_ignore-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/binlog/t/binlog_incident_ignore-master.opt	2011-03-14 17:55:26 +0000
@@ -0,0 +1,2 @@
+--loose-debug=+d,incident_database_resync_on_replace
+--binlog-ignore-db=test
\ No newline at end of file

=== added file 'mysql-test/suite/binlog/t/binlog_incident_ignore.test'
--- a/mysql-test/suite/binlog/t/binlog_incident_ignore.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/binlog/t/binlog_incident_ignore.test	2011-03-14 17:55:26 +0000
@@ -0,0 +1,4 @@
+# The purpose of this test is to verify that incident log events
+# ignore database level binlog filters 
+
+--source suite/binlog/t/binlog_incident.test

=== modified file 'mysql-test/suite/funcs_1/r/is_columns_is.result'
--- a/mysql-test/suite/funcs_1/r/is_columns_is.result	2010-09-27 13:03:27 +0000
+++ b/mysql-test/suite/funcs_1/r/is_columns_is.result	2011-03-11 18:53:12 +0000
@@ -131,7 +131,7 @@ def	information_schema	PARAMETERS	CHARAC
 def	information_schema	PARAMETERS	COLLATION_NAME	13	NULL	YES	varchar	64	192	NULL	NULL	utf8	utf8_general_ci	varchar(64)			select	
 def	information_schema	PARAMETERS	DATA_TYPE	7		NO	varchar	64	192	NULL	NULL	utf8	utf8_general_ci	varchar(64)			select	
 def	information_schema	PARAMETERS	DTD_IDENTIFIER	14	NULL	NO	longtext	4294967295	4294967295	NULL	NULL	utf8	utf8_general_ci	longtext			select	
-def	information_schema	PARAMETERS	NUMERIC_PRECISION	10	NULL	YES	int	NULL	NULL	10	0	NULL	NULL	int(21)			select	
+def	information_schema	PARAMETERS	NUMERIC_PRECISION	10	NULL	YES	bigint	NULL	NULL	20	0	NULL	NULL	bigint(21) unsigned			select	
 def	information_schema	PARAMETERS	NUMERIC_SCALE	11	NULL	YES	int	NULL	NULL	10	0	NULL	NULL	int(21)			select	
 def	information_schema	PARAMETERS	ORDINAL_POSITION	4	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(21)			select	
 def	information_schema	PARAMETERS	PARAMETER_MODE	5	NULL	YES	varchar	5	15	NULL	NULL	utf8	utf8_general_ci	varchar(5)			select	
@@ -210,7 +210,7 @@ def	information_schema	ROUTINES	EXTERNAL
 def	information_schema	ROUTINES	EXTERNAL_NAME	16	NULL	YES	varchar	64	192	NULL	NULL	utf8	utf8_general_ci	varchar(64)			select	
 def	information_schema	ROUTINES	IS_DETERMINISTIC	19		NO	varchar	3	9	NULL	NULL	utf8	utf8_general_ci	varchar(3)			select	
 def	information_schema	ROUTINES	LAST_ALTERED	24	0000-00-00 00:00:00	NO	datetime	NULL	NULL	NULL	NULL	NULL	NULL	datetime			select	
-def	information_schema	ROUTINES	NUMERIC_PRECISION	9	NULL	YES	int	NULL	NULL	10	0	NULL	NULL	int(21)			select	
+def	information_schema	ROUTINES	NUMERIC_PRECISION	9	NULL	YES	bigint	NULL	NULL	20	0	NULL	NULL	bigint(21) unsigned			select	
 def	information_schema	ROUTINES	NUMERIC_SCALE	10	NULL	YES	int	NULL	NULL	10	0	NULL	NULL	int(21)			select	
 def	information_schema	ROUTINES	PARAMETER_STYLE	18		NO	varchar	8	24	NULL	NULL	utf8	utf8_general_ci	varchar(8)			select	
 def	information_schema	ROUTINES	ROUTINE_BODY	14		NO	varchar	8	24	NULL	NULL	utf8	utf8_general_ci	varchar(8)			select	
@@ -522,7 +522,7 @@ NULL	information_schema	PARAMETERS	ORDIN
 3.0000	information_schema	PARAMETERS	DATA_TYPE	varchar	64	192	utf8	utf8_general_ci	varchar(64)
 NULL	information_schema	PARAMETERS	CHARACTER_MAXIMUM_LENGTH	int	NULL	NULL	NULL	NULL	int(21)
 NULL	information_schema	PARAMETERS	CHARACTER_OCTET_LENGTH	int	NULL	NULL	NULL	NULL	int(21)
-NULL	information_schema	PARAMETERS	NUMERIC_PRECISION	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	PARAMETERS	NUMERIC_PRECISION	bigint	NULL	NULL	NULL	NULL	bigint(21) unsigned
 NULL	information_schema	PARAMETERS	NUMERIC_SCALE	int	NULL	NULL	NULL	NULL	int(21)
 3.0000	information_schema	PARAMETERS	CHARACTER_SET_NAME	varchar	64	192	utf8	utf8_general_ci	varchar(64)
 3.0000	information_schema	PARAMETERS	COLLATION_NAME	varchar	64	192	utf8	utf8_general_ci	varchar(64)
@@ -591,7 +591,7 @@ NULL	information_schema	PROCESSLIST	TIME
 3.0000	information_schema	ROUTINES	DATA_TYPE	varchar	64	192	utf8	utf8_general_ci	varchar(64)
 NULL	information_schema	ROUTINES	CHARACTER_MAXIMUM_LENGTH	int	NULL	NULL	NULL	NULL	int(21)
 NULL	information_schema	ROUTINES	CHARACTER_OCTET_LENGTH	int	NULL	NULL	NULL	NULL	int(21)
-NULL	information_schema	ROUTINES	NUMERIC_PRECISION	int	NULL	NULL	NULL	NULL	int(21)
+NULL	information_schema	ROUTINES	NUMERIC_PRECISION	bigint	NULL	NULL	NULL	NULL	bigint(21) unsigned
 NULL	information_schema	ROUTINES	NUMERIC_SCALE	int	NULL	NULL	NULL	NULL	int(21)
 3.0000	information_schema	ROUTINES	CHARACTER_SET_NAME	varchar	64	192	utf8	utf8_general_ci	varchar(64)
 3.0000	information_schema	ROUTINES	COLLATION_NAME	varchar	64	192	utf8	utf8_general_ci	varchar(64)

=== modified file 'mysql-test/suite/funcs_1/r/is_columns_mysql.result'
--- a/mysql-test/suite/funcs_1/r/is_columns_mysql.result	2011-02-22 05:37:44 +0000
+++ b/mysql-test/suite/funcs_1/r/is_columns_mysql.result	2011-03-14 18:43:19 +0000
@@ -236,7 +236,7 @@ def	mysql	user	max_questions	37	0	NO	int
 def	mysql	user	max_updates	38	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(11) unsigned			select,insert,update,references	
 def	mysql	user	max_user_connections	40	0	NO	int	NULL	NULL	10	0	NULL	NULL	int(11) unsigned			select,insert,update,references	
 def	mysql	user	Password	3		NO	char	41	41	NULL	NULL	latin1	latin1_bin	char(41)			select,insert,update,references	
-def	mysql	user	plugin	41		NO	char	60	180	NULL	NULL	utf8	utf8_bin	char(60)			select,insert,update,references	
+def	mysql	user	plugin	41		NO	char	64	192	NULL	NULL	utf8	utf8_bin	char(64)			select,insert,update,references	
 def	mysql	user	Process_priv	12	N	NO	enum	1	3	NULL	NULL	utf8	utf8_general_ci	enum('N','Y')			select,insert,update,references	
 def	mysql	user	References_priv	15	N	NO	enum	1	3	NULL	NULL	utf8	utf8_general_ci	enum('N','Y')			select,insert,update,references	
 def	mysql	user	Reload_priv	10	N	NO	enum	1	3	NULL	NULL	utf8	utf8_general_ci	enum('N','Y')			select,insert,update,references	
@@ -575,5 +575,5 @@ NULL	mysql	user	max_questions	int	NULL	N
 NULL	mysql	user	max_updates	int	NULL	NULL	NULL	NULL	int(11) unsigned
 NULL	mysql	user	max_connections	int	NULL	NULL	NULL	NULL	int(11) unsigned
 NULL	mysql	user	max_user_connections	int	NULL	NULL	NULL	NULL	int(11) unsigned
-3.0000	mysql	user	plugin	char	60	180	utf8	utf8_bin	char(60)
+3.0000	mysql	user	plugin	char	64	192	utf8	utf8_bin	char(64)
 1.0000	mysql	user	authentication_string	text	65535	65535	utf8	utf8_bin	text

=== modified file 'mysql-test/suite/funcs_1/r/is_routines.result'
--- a/mysql-test/suite/funcs_1/r/is_routines.result	2010-01-15 11:42:15 +0000
+++ b/mysql-test/suite/funcs_1/r/is_routines.result	2011-03-14 10:40:57 +0000
@@ -36,7 +36,7 @@ ROUTINE_TYPE	varchar(9)	NO			
 DATA_TYPE	varchar(64)	NO			
 CHARACTER_MAXIMUM_LENGTH	int(21)	YES		NULL	
 CHARACTER_OCTET_LENGTH	int(21)	YES		NULL	
-NUMERIC_PRECISION	int(21)	YES		NULL	
+NUMERIC_PRECISION	bigint(21) unsigned	YES		NULL	
 NUMERIC_SCALE	int(21)	YES		NULL	
 CHARACTER_SET_NAME	varchar(64)	YES		NULL	
 COLLATION_NAME	varchar(64)	YES		NULL	
@@ -69,7 +69,7 @@ ROUTINES	CREATE TEMPORARY TABLE `ROUTINE
   `DATA_TYPE` varchar(64) NOT NULL DEFAULT '',
   `CHARACTER_MAXIMUM_LENGTH` int(21) DEFAULT NULL,
   `CHARACTER_OCTET_LENGTH` int(21) DEFAULT NULL,
-  `NUMERIC_PRECISION` int(21) DEFAULT NULL,
+  `NUMERIC_PRECISION` bigint(21) unsigned DEFAULT NULL,
   `NUMERIC_SCALE` int(21) DEFAULT NULL,
   `CHARACTER_SET_NAME` varchar(64) DEFAULT NULL,
   `COLLATION_NAME` varchar(64) DEFAULT NULL,
@@ -102,7 +102,7 @@ ROUTINE_TYPE	varchar(9)	NO			
 DATA_TYPE	varchar(64)	NO			
 CHARACTER_MAXIMUM_LENGTH	int(21)	YES		NULL	
 CHARACTER_OCTET_LENGTH	int(21)	YES		NULL	
-NUMERIC_PRECISION	int(21)	YES		NULL	
+NUMERIC_PRECISION	bigint(21) unsigned	YES		NULL	
 NUMERIC_SCALE	int(21)	YES		NULL	
 CHARACTER_SET_NAME	varchar(64)	YES		NULL	
 COLLATION_NAME	varchar(64)	YES		NULL	

=== modified file 'mysql-test/suite/perfschema/r/relaylog.result'
--- a/mysql-test/suite/perfschema/r/relaylog.result	2011-03-10 12:30:05 +0000
+++ b/mysql-test/suite/perfschema/r/relaylog.result	2011-03-11 10:48:37 +0000
@@ -84,7 +84,11 @@ if (count_write > 0,"MANY", "NONE") as C
 if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
 if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
 from performance_schema.file_summary_by_instance
-where file_name like "%slave-%" order by file_name;
+where file_name like "%slave-%"
+  and (file_name not like "%slave-relay-bin.0%"
+       or file_name like "%slave-relay-bin.000001"
+       or file_name like "%slave-relay-bin.000002")
+order by file_name;
 FILE_NAME	EVENT_NAME	COUNT_READ	COUNT_WRITE	SUM_NUMBER_OF_BYTES_READ	SUM_NUMBER_OF_BYTES_WRITE
 slave-bin.000001	wait/io/file/sql/binlog	MANY	MANY	MANY	MANY
 slave-bin.index	wait/io/file/sql/binlog_index	NONE	NONE	NONE	NONE
@@ -135,7 +139,11 @@ if (count_write > 0,"MANY", "NONE") as C
 if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
 if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
 from performance_schema.file_summary_by_instance
-where event_name like "%relaylog%" order by file_name;
+where event_name like "%relaylog%"
+  and (file_name not like "%slave-relay-bin.0%"
+       or file_name like "%slave-relay-bin.000001"
+       or file_name like "%slave-relay-bin.000002")
+order by file_name;
 FILE_NAME	EVENT_NAME	COUNT_READ	COUNT_WRITE	SUM_NUMBER_OF_BYTES_READ	SUM_NUMBER_OF_BYTES_WRITE
 slave-relay-bin.000001	wait/io/file/sql/relaylog	MANY	MANY	MANY	MANY
 slave-relay-bin.000002	wait/io/file/sql/relaylog	MANY	MANY	MANY	MANY

=== modified file 'mysql-test/suite/perfschema/t/relaylog.test'
--- a/mysql-test/suite/perfschema/t/relaylog.test	2011-03-10 12:02:28 +0000
+++ b/mysql-test/suite/perfschema/t/relaylog.test	2011-03-11 10:45:16 +0000
@@ -31,6 +31,18 @@ drop table test.t1;
 
 --source include/show_binlog_events.inc
 
+# Notes
+#
+# The point of this test is to make sure code is properly instrumented,
+# where instruments have the proper key (binlog or relaylog),
+# it is not to dive into statistics for each instruments.
+# Different test execution sequence in different platforms do make the
+# results vary, making the test results very sensitive to changes.
+# To ensure robustness:
+# - log file rotation is limited to file .000001 and .000002
+# - statistics are normalized to "NONE" or "MANY"
+#
+
 connection master;
 -- echo "============ Performance schema on master ============"
 
@@ -99,7 +111,11 @@ select
   if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
   if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
   from performance_schema.file_summary_by_instance
-  where file_name like "%slave-%" order by file_name;
+  where file_name like "%slave-%"
+  and (file_name not like "%slave-relay-bin.0%"
+       or file_name like "%slave-relay-bin.000001"
+       or file_name like "%slave-relay-bin.000002")
+  order by file_name;
 
 -- echo "Expect a slave binlog + binlog_index"
 
@@ -138,7 +154,11 @@ select
   if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
   if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
   from performance_schema.file_summary_by_instance
-  where event_name like "%relaylog%" order by file_name;
+  where event_name like "%relaylog%"
+  and (file_name not like "%slave-relay-bin.0%"
+       or file_name like "%slave-relay-bin.000001"
+       or file_name like "%slave-relay-bin.000002")
+  order by file_name;
 
 select
   EVENT_NAME,

=== modified file 'mysql-test/suite/rpl/r/rpl_binlog_corruption.result'
--- a/mysql-test/suite/rpl/r/rpl_binlog_corruption.result	2011-02-07 15:31:01 +0000
+++ b/mysql-test/suite/rpl/r/rpl_binlog_corruption.result	2011-02-23 20:01:27 +0000
@@ -1,6 +1,7 @@
 include/master-slave.inc
 [connection master]
 call mtr.add_suppression('Found invalid event in binary log');
+call mtr.add_suppression('Slave SQL.*Relay log read failure: Could not parse relay log event entry.* 1594');
 ==== Initialize ====
 include/stop_slave.inc
 RESET SLAVE;

=== modified file 'mysql-test/suite/rpl/r/rpl_bug33931.result'
--- a/mysql-test/suite/rpl/r/rpl_bug33931.result	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_bug33931.result	2011-02-23 20:01:27 +0000
@@ -1,6 +1,7 @@
 include/master-slave.inc
 [connection master]
 call mtr.add_suppression("Failed during slave I/O thread initialization");
+call mtr.add_suppression("Slave SQL.*Failed during slave thread initialization.* 1593");
 include/stop_slave.inc
 reset slave;
 SET GLOBAL debug="d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init";

=== modified file 'mysql-test/suite/rpl/r/rpl_checksum.result'
--- a/mysql-test/suite/rpl/r/rpl_checksum.result	2011-03-08 11:29:11 +0000
+++ b/mysql-test/suite/rpl/r/rpl_checksum.result	2011-03-08 19:12:46 +0000
@@ -4,6 +4,7 @@ call mtr.add_suppression('Slave can not 
 call mtr.add_suppression('Replication event checksum verification failed');
 call mtr.add_suppression('Relay log write failure: could not queue event from master');
 call mtr.add_suppression('Event crc check failed! Most likely there is event corruption');
+call mtr.add_suppression('Slave SQL: Error initializing relay log position: I/O error reading event at position .*, Error_code: 1593');
 call mtr.add_suppression('Master is configured to log replication events with checksum, but will not send such events to slaves that cannot process');
 set @master_save_binlog_checksum= @@global.binlog_checksum;
 set @save_master_verify_checksum =  @@global.master_verify_checksum;

=== modified file 'mysql-test/suite/rpl/r/rpl_checksum_cache.result'
--- a/mysql-test/suite/rpl/r/rpl_checksum_cache.result	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_checksum_cache.result	2011-02-23 20:01:27 +0000
@@ -2,6 +2,7 @@ include/master-slave.inc
 [connection master]
 call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. Statement: insert into t2 set data=repeat.*'a', @act_size.*");
 call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. Statement: insert into t1 values.* NAME_CONST.*'n',.*, @data .*");
+call mtr.add_suppression("Slave SQL: slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table; waiting for the group completion");
 set @save_binlog_cache_size = @@global.binlog_cache_size;
 set @save_binlog_checksum = @@global.binlog_checksum;
 set @save_master_verify_checksum = @@global.master_verify_checksum;

=== modified file 'mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result'
--- a/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result	2011-02-03 16:09:33 +0000
+++ b/mysql-test/suite/rpl/r/rpl_circular_for_4_hosts.result	2011-02-23 11:54:58 +0000
@@ -5,6 +5,7 @@ include/rpl_init.inc [topology=1->2->3->
 CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=MyISAM;
 CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=InnoDB;
 include/rpl_sync.inc
+call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table");
 
 *** Testing schema A->B->C->D->A ***
 
@@ -46,6 +47,7 @@ SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
 include/start_slave.inc
 INSERT INTO t1 VALUES(6,'C',2);
 INSERT INTO t1(b,c) VALUES('B',2);
+call mtr.add_suppression("Slave SQL.*Duplicate entry .6. for key .PRIMARY.* Error_code: 1062");
 include/wait_for_slave_sql_error.inc [errno=1062]
 INSERT INTO t1(b,c) VALUES('A',2);
 INSERT INTO t1(b,c) VALUES('D',2);

=== modified file 'mysql-test/suite/rpl/r/rpl_corruption.result'
--- a/mysql-test/suite/rpl/r/rpl_corruption.result	2011-03-08 19:28:55 +0000
+++ b/mysql-test/suite/rpl/r/rpl_corruption.result	2011-03-13 19:56:40 +0000
@@ -5,33 +5,34 @@ call mtr.add_suppression('Slave I/O: Rel
 call mtr.add_suppression('event read from binlog did not pass crc check');
 call mtr.add_suppression('Replication event checksum verification failed');
 call mtr.add_suppression('Event crc check failed! Most likely there is event corruption');
+call mtr.add_suppression('Slave SQL: Error initializing relay log position: I/O error reading event at position .*, Error_code: 1593');
 SET @old_master_verify_checksum = @@master_verify_checksum;
 # 1. Creating test table/data and set corruption position for testing
 * insert/update/delete rows in table t1 *
 CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10), c VARCHAR(100));
 include/stop_slave.inc
 # 2. Corruption in master binlog and SHOW BINLOG EVENTS
-SET GLOBAL debug="+d,corrupt_read_log_event_char";
+SET GLOBAL debug="d,corrupt_read_log_event_char";
 SHOW BINLOG EVENTS;
 ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error
-SET GLOBAL debug="-d,corrupt_read_log_event_char";
+SET GLOBAL debug="";
 # 3. Master read a corrupted event from binlog and send the error to slave
-SET GLOBAL debug="+d,corrupt_read_log_event";
+SET GLOBAL debug="d,corrupt_read_log_event";
 START SLAVE IO_THREAD;
 include/wait_for_slave_io_error.inc [errno=1236]
-SET GLOBAL debug="-d,corrupt_read_log_event";
+SET GLOBAL debug="";
 # 4. Master read a corrupted event from binlog and send it to slave
 SET GLOBAL master_verify_checksum=0;
-SET GLOBAL debug="+d,corrupt_read_log_event";
+SET GLOBAL debug="d,corrupt_read_log_event";
 START SLAVE IO_THREAD;
-include/wait_for_slave_io_error.inc [errno=1595]
-SET GLOBAL debug="-d,corrupt_read_log_event";
+include/wait_for_slave_io_error.inc [errno=1595,1722]
+SET GLOBAL debug="";
 SET GLOBAL master_verify_checksum=1;
 # 5. Slave. Corruption in network
-SET GLOBAL debug="+d,corrupt_queue_event";
+SET GLOBAL debug="d,corrupt_queue_event";
 START SLAVE IO_THREAD;
-include/wait_for_slave_io_error.inc [errno=1595]
-SET GLOBAL debug="-d,corrupt_queue_event";
+include/wait_for_slave_io_error.inc [errno=1595,1722]
+SET GLOBAL debug="";
 # 6. Slave. Corruption in relay log
 SET GLOBAL debug="d,corrupt_read_log_event_char";
 START SLAVE;

=== modified file 'mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result'
--- a/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result	2011-02-23 20:01:27 +0000
@@ -57,6 +57,11 @@ f1	f2	f3	f4	f5	f6	f7	f8	f9	hex(f10)	hex(
 27	27	27	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
 29	29	29	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
 30	30	30	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
+call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535");
+call mtr.add_suppression("Slave SQL.*Error .Can.t DROP .c7.; check that column.key exists. on query.* 1091");
+call mtr.add_suppression("Slave SQL.*Error .Unknown column .c7. in .t15.. on query.* 1054");
+call mtr.add_suppression("Slave SQL.*Error .Key column .c6. doesn.t exist in table. on query.* 1072");
+call mtr.add_suppression("Slave SQL.*Column 2 of table .test.t1.. cannot be converted from type.* Error_code: 1677");
 
 * Select count and 20 rows from Slave *
 

=== modified file 'mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result'
--- a/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result	2011-02-23 20:01:27 +0000
@@ -57,6 +57,11 @@ f1	f2	f3	f4	f5	f6	f7	f8	f9	hex(f10)	hex(
 27	27	27	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
 29	29	29	second	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
 30	30	30	next	2	kaks	2	got stolen from the paradise	very fat blob	1555	123456
+call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535");
+call mtr.add_suppression("Slave SQL.*Error .Can.t DROP .c7.; check that column.key exists. on query.* 1091");
+call mtr.add_suppression("Slave SQL.*Error .Unknown column .c7. in .t15.. on query.* 1054");
+call mtr.add_suppression("Slave SQL.*Error .Key column .c6. doesn.t exist in table. on query.* 1072");
+call mtr.add_suppression("Slave SQL.*Column 2 of table .test.t1.. cannot be converted from type.* Error_code: 1677");
 
 * Select count and 20 rows from Slave *
 

=== modified file 'mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result'
--- a/mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result	2011-02-23 20:01:27 +0000
@@ -1,6 +1,7 @@
 include/master-slave.inc
 [connection master]
 call mtr.add_suppression("Slave: Unknown table 'test.t6' Error_code: 1051");
+call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]*. cannot be converted from type.* Error_code: 1677");
 **** Diff Table Def Start ****
 *** On Slave ***
 STOP SLAVE;
@@ -461,6 +462,9 @@ c4 BLOB, c5 CHAR(5)) ENGINE='InnoDB';
 RESET MASTER;
 *** Start Slave ***
 START SLAVE;
+call mtr.add_suppression("Error .Unknown table .t6.. on query.* Error_code: 1051");
+call mtr.add_suppression("Error .Duplicate column name .c6.. on query.* Error_code: 1060");
+call mtr.add_suppression("Table definition on master and slave does not match: Column . ...e mismatch.* Error_code: 1535");
 *** Master Data Insert ***
 set @b1 = 'b1b1b1b1';
 set @b1 = concat(@b1,@b1);

=== modified file 'mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result'
--- a/mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result	2011-02-23 20:01:27 +0000
@@ -1,6 +1,7 @@
 include/master-slave.inc
 [connection master]
 call mtr.add_suppression("Slave: Unknown table 'test.t6' Error_code: 1051");
+call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]*. cannot be converted from type.* Error_code: 1677");
 **** Diff Table Def Start ****
 *** On Slave ***
 STOP SLAVE;
@@ -461,6 +462,9 @@ c4 BLOB, c5 CHAR(5)) ENGINE='MyISAM';
 RESET MASTER;
 *** Start Slave ***
 START SLAVE;
+call mtr.add_suppression("Error .Unknown table .t6.. on query.* Error_code: 1051");
+call mtr.add_suppression("Error .Duplicate column name .c6.. on query.* Error_code: 1060");
+call mtr.add_suppression("Table definition on master and slave does not match: Column . ...e mismatch.* Error_code: 1535");
 *** Master Data Insert ***
 set @b1 = 'b1b1b1b1';
 set @b1 = concat(@b1,@b1);

=== modified file 'mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result'
--- a/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result	2010-12-19 17:07:28 +0000
+++ b/mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result	2011-02-23 09:31:37 +0000
@@ -42,6 +42,7 @@ UPDATE t4 LEFT JOIN (t1, t2, t5) ON (t1.
 UPDATE t4 LEFT JOIN (t1, t6, t7) ON (t4.id=t1.id and t4.id=t6.id and t4.id=t7.id) SET a=0, d=0, f=0, g=0 where t4.id=1;
 UPDATE t7 LEFT JOIN (t4, t1, t2) ON (t7.id=t4.id and t7.id=t1.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1;
 UPDATE t7 LEFT JOIN (t8, t4, t1) ON (t7.id=t8.id and t7.id=t4.id and t7.id=t1.id) SET a=0, d=0, g=0, h=0 where t7.id=1;
+call mtr.add_suppression("Slave SQL.*Error .Table .test.t[47]. doesn.t exist. on query.* Error_code: 1146");
 UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1;
 include/wait_for_slave_sql_error_and_skip.inc [errno=1146]
 Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1''

=== modified file 'mysql-test/suite/rpl/r/rpl_heartbeat_basic.result'
--- a/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result	2011-01-13 21:36:21 +0000
+++ b/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result	2011-02-23 20:01:27 +0000
@@ -207,6 +207,8 @@ Heartbeat event received
 CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10), c LONGTEXT);
 INSERT INTO t1 VALUES (1, 'on slave', NULL);
 INSERT INTO t1 VALUES (1, 'on master', NULL);
+call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.. on query.* Error_code: 1062");
+call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table");
 Heartbeat events are received while sql thread stopped (1 means 'yes'): 1
 include/stop_slave.inc
 DROP TABLE t1;

=== modified file 'mysql-test/suite/rpl/r/rpl_idempotency.result'
--- a/mysql-test/suite/rpl/r/rpl_idempotency.result	2010-12-19 17:15:12 +0000
+++ b/mysql-test/suite/rpl/r/rpl_idempotency.result	2011-02-23 11:54:58 +0000
@@ -1,8 +1,9 @@
 include/master-slave.inc
 [connection master]
-call mtr.add_suppression("Slave: Can't find record in 't.' Error_code: 1032");
-call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
-call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
+call mtr.add_suppression("Slave SQL.*Can.t find record in .t[12].* Error_code: 1032");
+call mtr.add_suppression("Slave SQL.*Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
+call mtr.add_suppression("Slave SQL.*Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
+call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.* Duplicate entry .1. for key .PRIMARY.* Error_code: 1062");
 CREATE TABLE t1 (a INT PRIMARY KEY);
 CREATE TABLE t2 (a INT);
 INSERT INTO t1 VALUES (-1),(-2),(-3);

=== modified file 'mysql-test/suite/rpl/r/rpl_ignore_table.result'
--- a/mysql-test/suite/rpl/r/rpl_ignore_table.result	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_ignore_table.result	2011-02-23 20:01:27 +0000
@@ -113,6 +113,7 @@ show grants for mysqltest4@localhost;
 Grants for mysqltest4@localhost
 GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7'
 set global slave_exec_mode='IDEMPOTENT';
+call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table mysql.* Error_code: 1032");
 drop table t1, mysqltest2.t2;
 drop table t4;
 drop database mysqltest2;

=== modified file 'mysql-test/suite/rpl/r/rpl_incident.result'
--- a/mysql-test/suite/rpl/r/rpl_incident.result	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_incident.result	2011-02-23 20:01:27 +0000
@@ -15,6 +15,7 @@ a
 2
 3
 4
+call mtr.add_suppression("Slave SQL.*The incident LOST_EVENTS occured on the master.* 1590");
 include/wait_for_slave_sql_error.inc [errno=1590]
 Last_SQL_Error = 'The incident LOST_EVENTS occured on the master. Message: <none>'
 **** On Slave ****

=== modified file 'mysql-test/suite/rpl/r/rpl_init_slave_errors.result'
--- a/mysql-test/suite/rpl/r/rpl_init_slave_errors.result	2010-12-19 17:07:28 +0000
+++ b/mysql-test/suite/rpl/r/rpl_init_slave_errors.result	2011-02-23 09:31:37 +0000
@@ -6,7 +6,7 @@ SET GLOBAL debug= "d,simulate_io_slave_e
 start slave;
 include/wait_for_slave_sql_error.inc [errno=1593]
 Last_SQL_Error = 'Failed during slave thread initialization'
-call mtr.add_suppression("Failed during slave I/O thread initialization");
+call mtr.add_suppression("Failed during slave.* thread initialization");
 SET GLOBAL debug= "";
 reset slave;
 SET GLOBAL init_slave= "garbage";

=== modified file 'mysql-test/suite/rpl/r/rpl_known_bugs_detection.result'
--- a/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_known_bugs_detection.result	2011-02-23 20:01:27 +0000
@@ -7,6 +7,7 @@ SELECT * FROM t1;
 a	b
 1	10
 2	2
+call mtr.add_suppression("Slave SQL.*suffer.*http:..bugs.mysql.com.bug.php.id=24432");
 include/wait_for_slave_sql_error.inc [errno=1105]
 Last_SQL_Error = 'Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10''
 SELECT * FROM t1;

=== modified file 'mysql-test/suite/rpl/r/rpl_loaddata.result'
--- a/mysql-test/suite/rpl/r/rpl_loaddata.result	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_loaddata.result	2011-02-23 20:01:27 +0000
@@ -27,6 +27,8 @@ drop table t3;
 create table t1(a int, b int, unique(b));
 insert into t1 values(1,10);
 load data infile '../../std_data/rpl_loaddata.dat' into table t1;
+call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* Error_code: 1062");
+call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*Error_code: 0");
 include/wait_for_slave_sql_error_and_skip.inc [errno=1062]
 include/check_slave_no_error.inc
 set sql_log_bin=0;

=== modified file 'mysql-test/suite/rpl/r/rpl_loaddata_fatal.result'
--- a/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_loaddata_fatal.result	2011-02-23 20:01:27 +0000
@@ -3,6 +3,7 @@ include/master-slave.inc
 CREATE TABLE t1 (a INT, b INT);
 INSERT INTO t1 VALUES (1,10);
 LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE t1;
+call mtr.add_suppression("Slave SQL.*Fatal error: Not enough memory, Error_code: 1593");
 include/wait_for_slave_sql_error_and_skip.inc [errno=1593]
 Last_SQL_Error = 'Fatal error: Not enough memory'
 DROP TABLE t1;

=== modified file 'mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result'
--- a/mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result	2011-02-22 08:01:58 +0000
+++ b/mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result	2011-02-23 20:01:27 +0000
@@ -140,6 +140,7 @@ include/start_slave.inc
 CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage.*");
 CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_stmt_cache_size' bytes of storage.*");
 CALL mtr.add_suppression("Writing one row to the row-based binary log failed.*");
+CALL mtr.add_suppression("Slave SQL.*The incident LOST_EVENTS occured on the master. Message: error writing to the binary log");
 TRUNCATE t1;
 SET GLOBAL max_binlog_cache_size= ORIGINAL_VALUE;
 SET GLOBAL binlog_cache_size= ORIGINAL_VALUE;

=== modified file 'mysql-test/suite/rpl/r/rpl_rotate_logs.result'
--- a/mysql-test/suite/rpl/r/rpl_rotate_logs.result	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_rotate_logs.result	2011-02-23 20:01:27 +0000
@@ -39,6 +39,7 @@ drop table temp_table, t3;
 insert into t2 values(1234);
 set insert_id=1234;
 insert into t2 values(NULL);
+call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .1234. for key .PRIMARY.. on query.* Error_code: 1062");
 include/wait_for_slave_sql_error_and_skip.inc [errno=1062]
 purge master logs to 'master-bin.000002';
 show master logs;

=== modified file 'mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result'
--- a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result	2011-02-23 20:01:27 +0000
@@ -65,6 +65,7 @@ DROP TABLE t1;
 include/rpl_reset.inc
 **** On Slave **** 
 SET GLOBAL QUERY_CACHE_SIZE=0;
+call mtr.add_suppression("Slave SQL.*Could not execute Update_rows event on table test.t1.* Error_code: 1032");
 **** On Master **** 
 CREATE TABLE t1 (a INT);
 INSERT INTO t1 VALUES (1),(2),(3);

=== modified file 'mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result'
--- a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result	2011-02-23 20:01:27 +0000
@@ -478,6 +478,9 @@ INSERT INTO t2 VALUES (1, "", 1);
 INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2);
 include/diff_tables.inc [master:t2, slave:t2]
 SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
+call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* Error_code: 1535");
+call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table test.t1.* Error_code: 1032");
+call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t.. cannot be converted from type.*, Error_code: 1677");
 include/rpl_reset.inc
 [expecting slave to replicate correctly]
 INSERT INTO t4 VALUES (1, "", 1);

=== modified file 'mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result'
--- a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result	2011-02-23 20:01:27 +0000
@@ -481,6 +481,9 @@ INSERT INTO t2 VALUES (1, "", 1);
 INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2);
 include/diff_tables.inc [master:t2, slave:t2]
 SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
+call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* Error_code: 1535");
+call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table test.t1.* Error_code: 1032");
+call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t.. cannot be converted from type.*, Error_code: 1677");
 include/rpl_reset.inc
 [expecting slave to replicate correctly]
 INSERT INTO t4 VALUES (1, "", 1);

=== modified file 'mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result'
--- a/mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result	2011-02-22 08:01:58 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result	2011-02-23 20:01:27 +0000
@@ -141,6 +141,7 @@ include/start_slave.inc
 CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage.*");
 CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_stmt_cache_size' bytes of storage.*");
 CALL mtr.add_suppression("Writing one row to the row-based binary log failed.*");
+CALL mtr.add_suppression("Slave SQL.*The incident LOST_EVENTS occured on the master. Message: error writing to the binary log");
 TRUNCATE t1;
 SET GLOBAL max_binlog_cache_size= ORIGINAL_VALUE;
 SET GLOBAL binlog_cache_size= ORIGINAL_VALUE;

=== modified file 'mysql-test/suite/rpl/r/rpl_row_colSize.result'
--- a/mysql-test/suite/rpl/r/rpl_row_colSize.result	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_colSize.result	2011-02-23 20:01:27 +0000
@@ -265,6 +265,8 @@ STOP SLAVE;
 RESET SLAVE;
 RESET MASTER;
 START SLAVE;
+call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 0 ...e mismatch.* Error_code: 1535");
+call mtr.add_suppression("Slave SQL.*Column 0 of table .test.t1. cannot be converted from type.* Error_code: 1677");
 *** Cleanup  ***
 DROP TABLE IF EXISTS t1;
 include/rpl_end.inc

=== modified file 'mysql-test/suite/rpl/r/rpl_row_conflicts.result'
--- a/mysql-test/suite/rpl/r/rpl_row_conflicts.result	2011-02-07 15:31:01 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_conflicts.result	2011-02-23 20:01:27 +0000
@@ -23,6 +23,7 @@ a
 include/wait_for_slave_sql_error.inc [errno=1062]
 Last_SQL_Error (expected "duplicate key" error)
 Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log master-bin.000001, end_log_pos END_LOG_POS
+call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.* Error_code: 1062");
 SELECT * FROM t1;
 a
 1
@@ -49,6 +50,7 @@ SELECT * FROM t1;
 a
 [on slave]
 ---- Wait until slave stops with an error ----
+call mtr.add_suppression("Slave SQL.*Can.t find record in .t1., Error_code: 1032");
 include/wait_for_slave_sql_error.inc [errno=1032]
 Last_SQL_Error (expected "duplicate key" error)
 Could not execute Delete_rows event on table test.t1; Can't find record in 't1', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log master-bin.000001, end_log_pos END_LOG_POS

=== modified file 'mysql-test/suite/rpl/r/rpl_row_idempotency.result'
--- a/mysql-test/suite/rpl/r/rpl_row_idempotency.result	2010-12-19 17:15:12 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_idempotency.result	2011-02-23 11:54:58 +0000
@@ -1,8 +1,9 @@
 include/master-slave.inc
 [connection master]
-call mtr.add_suppression("Slave: Can't find record in 't.' Error_code: 1032");
-call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
-call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
+call mtr.add_suppression("Can.t find record in .t[12].* Error_code: 1032");
+call mtr.add_suppression("Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
+call mtr.add_suppression("Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
+call mtr.add_suppression("Duplicate entry .1. for key .PRIMARY.* Error_code: 1062");
 set @old_slave_exec_mode= @@global.slave_exec_mode;
 set @@global.slave_exec_mode= IDEMPOTENT;
 create table ti1 (b int primary key) engine = innodb;

=== modified file 'mysql-test/suite/rpl/r/rpl_row_img_eng_full.result'
--- a/mysql-test/suite/rpl/r/rpl_row_img_eng_full.result	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_img_eng_full.result	2011-02-23 20:01:27 +0000
@@ -3641,6 +3641,7 @@ c1	c2
 300	1
 SET SQL_LOG_BIN=0;
 call mtr.add_suppression("Slave: Can\'t find record in \'t1\' Error_code: 1032");
+call mtr.add_suppression("Slave SQL: Could not execute Update_rows event on table test.t1; Can.t find record in .t1.* Error_code: 1032");
 SET SQL_LOG_BIN=1;
 include/wait_for_slave_sql_error_and_skip.inc [errno=1032]
 DROP TABLE t1;
@@ -3823,6 +3824,7 @@ c1	c2
 300	1
 SET SQL_LOG_BIN=0;
 call mtr.add_suppression("Slave: Can\'t find record in \'t1\' Error_code: 1032");
+call mtr.add_suppression("Slave SQL: Could not execute Update_rows event on table test.t1; Can.t find record in .t1.* Error_code: 1032");
 SET SQL_LOG_BIN=1;
 include/wait_for_slave_sql_error_and_skip.inc [errno=1032]
 DROP TABLE t1;

=== modified file 'mysql-test/suite/rpl/r/rpl_row_img_sanity.result'
--- a/mysql-test/suite/rpl/r/rpl_row_img_sanity.result	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_img_sanity.result	2011-02-23 20:01:27 +0000
@@ -1,6 +1,7 @@
 include/master-slave.inc
 [connection master]
 call mtr.add_suppression("Slave: Can\'t find record in \'t\' Error_code: 1032");
+call mtr.add_suppression("Slave SQL: Could not execute Update_rows event on table test.t; Can.t find record in .t.* Error_code: 1032");
 SHOW VARIABLES LIKE 'binlog_row_image';
 Variable_name	Value
 binlog_row_image	FULL

=== modified file 'mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result'
--- a/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result	2010-12-19 17:15:12 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result	2011-02-23 11:54:58 +0000
@@ -10,6 +10,7 @@ DROP TABLE t1;
 INSERT INTO t1 VALUES (1);
 ==== Verify error on slave ====
 [on slave]
+call mtr.add_suppression("Slave SQL.*Error executing row event: .Table .test.t1. doesn.t exist., Error_code: 1146");
 include/wait_for_slave_sql_error.inc [errno=1146]
 ==== Clean up ====
 include/stop_slave_io.inc

=== modified file 'mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result'
--- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result	2011-02-23 20:01:27 +0000
@@ -117,6 +117,8 @@ a
 include/check_slave_is_running.inc
 INSERT INTO t9 VALUES (4);
 INSERT INTO t4 VALUES (4);
+call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column [012] type mismatch.* Error_code: 1535");
+call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]. cannot be converted from type.* Error_code: 1677");
 include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
 Last_SQL_Error = 'Column 0 of table 'test.t4' cannot be converted from type 'int' to type 'float''
 INSERT INTO t9 VALUES (5);

=== modified file 'mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result'
--- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result	2011-02-23 20:01:27 +0000
@@ -117,6 +117,8 @@ a
 include/check_slave_is_running.inc
 INSERT INTO t9 VALUES (4);
 INSERT INTO t4 VALUES (4);
+call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column [012] type mismatch.* Error_code: 1535");
+call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]. cannot be converted from type.* Error_code: 1677");
 include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
 Last_SQL_Error = 'Column 0 of table 'test.t4' cannot be converted from type 'int' to type 'float''
 INSERT INTO t9 VALUES (5);

=== modified file 'mysql-test/suite/rpl/r/rpl_show_errors.result'
--- a/mysql-test/suite/rpl/r/rpl_show_errors.result	2011-02-07 15:31:01 +0000
+++ b/mysql-test/suite/rpl/r/rpl_show_errors.result	2011-02-23 20:01:27 +0000
@@ -3,6 +3,7 @@ include/master-slave.inc
 CREATE TABLE t1 (a INT, b blob, PRIMARY KEY(b(512)));
 DROP TABLE t1;
 DROP TABLE t1;
+call mtr.add_suppression("Slave SQL: Error .Unknown table .test.t1.. on query.* Error_code: 1051");
 include/wait_for_slave_sql_error.inc [errno=1051]
 include/assert.inc [Last_SQL_Error_Timestamp is not null and matches the expected format]
 include/stop_slave.inc

=== modified file 'mysql-test/suite/rpl/r/rpl_skip_error.result'
--- a/mysql-test/suite/rpl/r/rpl_skip_error.result	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_skip_error.result	2011-02-23 20:01:27 +0000
@@ -56,6 +56,7 @@ t1	CREATE TABLE `t1` (
   PRIMARY KEY (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
 SET SQL_LOG_BIN=1;
+call mtr.add_suppression("Slave SQL.*Could not execute .*te_rows event on table test.t.; Duplicate entry.* Error_code: 1062");
 CREATE TABLE t1(id INT NOT NULL PRIMARY KEY, data INT) Engine=InnoDB;
 SHOW CREATE TABLE t1;
 Table	Create Table

=== added file 'mysql-test/suite/rpl/r/rpl_skip_incident.result'
--- a/mysql-test/suite/rpl/r/rpl_skip_incident.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/r/rpl_skip_incident.result	2011-03-14 17:09:16 +0000
@@ -0,0 +1,25 @@
+include/master-slave.inc
+[connection master]
+**** On Master ****
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT * FROM t1;
+a
+1
+2
+3
+REPLACE INTO t1 VALUES (4);
+SELECT * FROM t1;
+a
+1
+2
+3
+4
+include/check_slave_is_running.inc
+Should have two binary logs here
+show binary logs;
+Log_name	File_size
+master-bin.000001	#
+master-bin.000002	#
+DROP TABLE t1;
+include/rpl_end.inc

=== modified file 'mysql-test/suite/rpl/r/rpl_slave_grp_exec.result'
--- a/mysql-test/suite/rpl/r/rpl_slave_grp_exec.result	2010-12-19 17:07:28 +0000
+++ b/mysql-test/suite/rpl/r/rpl_slave_grp_exec.result	2011-02-23 11:54:58 +0000
@@ -29,6 +29,7 @@ a	b
 SELECT * FROM t3 ORDER BY a;
 a	b
 1	ZZ
+call mtr.add_suppression("Slave SQL.*Table .test.t3. doesn.t exist.* Error_code: 1146");
 include/wait_for_slave_sql_error.inc [errno=1146]
 SHOW TABLES LIKE 't%';
 Tables_in_test (t%)

=== modified file 'mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result'
--- a/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result	2011-03-15 15:16:34 +0000
@@ -1,5 +1,6 @@
 include/master-slave.inc
 [connection master]
+SET @@GLOBAL.DEBUG = '+d,remove_slave_load_file_before_write';
 create table t1(a int not null auto_increment, b int, primary key(a)) engine=innodb;
 start transaction;
 insert into t1(b) values (1);
@@ -13,5 +14,8 @@ include/stop_slave_io.inc
 RESET SLAVE;
 drop table t1;
 call mtr.add_suppression("Slave: Can't get stat of .*");
+call mtr.add_suppression("Slave SQL: Error .Can.t get stat of.* Error_code: 13");
 call mtr.add_suppression("Slave: File.* not found.*");
+call mtr.add_suppression("Slave SQL: Error .File.* not found.* Error_code: 29");
+SET @@GLOBAL.DEBUG = '';
 include/rpl_end.inc

=== modified file 'mysql-test/suite/rpl/r/rpl_slave_load_tmpdir_not_exist.result'
--- a/mysql-test/suite/rpl/r/rpl_slave_load_tmpdir_not_exist.result	2010-12-19 17:07:28 +0000
+++ b/mysql-test/suite/rpl/r/rpl_slave_load_tmpdir_not_exist.result	2011-02-23 09:31:37 +0000
@@ -1,6 +1,7 @@
 include/master-slave.inc
 [connection master]
 START SLAVE;
+call mtr.add_suppression("Slave SQL.*Unable to use slave.s temporary directory.* Error_code: 12");
 include/wait_for_slave_sql_error.inc [errno=12]
 include/stop_slave_io.inc
 RESET SLAVE;

=== modified file 'mysql-test/suite/rpl/r/rpl_slave_start.result'
--- a/mysql-test/suite/rpl/r/rpl_slave_start.result	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_slave_start.result	2011-02-23 20:01:27 +0000
@@ -6,6 +6,7 @@ include/master-slave.inc
 [connection master]
 [on slave]
 CALL mtr.add_suppression("Slave: Table 't1' already exists Error_code: 1050");
+CALL mtr.add_suppression("Slave SQL: Error .Table .t1. already exists. on query.* Error_code: 1050");
 # The statement makes SQL thread to fail.
 CREATE TABLE t1(c1 INT);
 [on master]

=== modified file 'mysql-test/suite/rpl/r/rpl_slow_query_log.result'
--- a/mysql-test/suite/rpl/r/rpl_slow_query_log.result	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_slow_query_log.result	2011-02-24 15:48:27 +0000
@@ -1,6 +1,7 @@
 include/master-slave.inc
 [connection master]
 CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
+call mtr.add_suppression("Slave SQL: slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table; waiting for the group completion");
 include/stop_slave.inc
 SET @old_log_output= @@log_output;
 SET GLOBAL log_output= 'TABLE';

=== modified file 'mysql-test/suite/rpl/r/rpl_stm_EE_err2.result'
--- a/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result	2011-02-07 15:31:01 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_EE_err2.result	2011-02-23 20:01:27 +0000
@@ -7,6 +7,7 @@ set sql_log_bin=1;
 insert into t1 values(1),(2);
 ERROR 23000: Duplicate entry '2' for key 'a'
 drop table t1;
+call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.* error code=1062.*Error on slave:.* Error_code: 0");
 (expect different error codes on master and slave)
 include/wait_for_slave_sql_error.inc [errno=0]
 Last_SQL_Error = 'Query caused different errors on master and slave.     Error on master: message (format)='Duplicate entry '%-.192s' for key %d' error code=1062 ; Error on slave: actual message='no error', error code=0. Default database: 'test'. Query: 'insert into t1 values(1),(2)''

=== modified file 'mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result'
--- a/mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result	2011-02-22 08:01:58 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result	2011-02-23 20:01:27 +0000
@@ -140,6 +140,7 @@ include/start_slave.inc
 CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage.*");
 CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_stmt_cache_size' bytes of storage.*");
 CALL mtr.add_suppression("Writing one row to the row-based binary log failed.*");
+CALL mtr.add_suppression("Slave SQL.*The incident LOST_EVENTS occured on the master. Message: error writing to the binary log");
 TRUNCATE t1;
 SET GLOBAL max_binlog_cache_size= ORIGINAL_VALUE;
 SET GLOBAL binlog_cache_size= ORIGINAL_VALUE;

=== modified file 'mysql-test/suite/rpl/r/rpl_stm_conflicts.result'
--- a/mysql-test/suite/rpl/r/rpl_stm_conflicts.result	2011-02-07 15:31:01 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_conflicts.result	2011-02-23 20:01:27 +0000
@@ -18,6 +18,7 @@ a
 include/wait_for_slave_sql_error.inc [errno=1062]
 Last_SQL_Error (expected "duplicate key" error)
 Error 'Duplicate entry '1' for key 'PRIMARY'' on query. Default database: 'test'. Query: 'INSERT INTO t1 VALUES (1)'
+call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.* Error_code: 1062");
 SELECT * FROM t1;
 a
 1

=== modified file 'mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result'
--- a/mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result	2011-02-23 20:01:27 +0000
@@ -43,6 +43,8 @@ drop table t3;
 create table t1(a int, b int, unique(b));
 insert into t1 values(1,10);
 load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1;
+call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* Error_code: 1062");
+call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*Error_code: 0");
 include/wait_for_slave_sql_error_and_skip.inc [errno=1062]
 include/check_slave_no_error.inc
 set sql_log_bin=0;

=== 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	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result	2011-02-23 20:01:27 +0000
@@ -70,5 +70,6 @@ include/start_slave.inc
 # Clean up
 DROP TABLE t1;
 SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit;
+call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table");
 SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit;
 include/rpl_end.inc

=== modified file 'mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result'
--- a/mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result	2011-02-07 15:31:01 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result	2011-02-23 20:01:27 +0000
@@ -11,6 +11,8 @@ insert into tm set a=null;
 Warnings:
 Note	1592	Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
 commit;
+call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table");
+call mtr.add_suppression("Slave SQL.*The slave SQL is stopped, leaving the current group of events unfinished with a non-transaction table changed.");
 include/wait_for_slave_sql_to_stop.inc
 include/check_slave_no_error.inc
 include/assert.inc [Everything that was read, was executed]

=== modified file 'mysql-test/suite/rpl/r/rpl_stop_slave.result'
--- a/mysql-test/suite/rpl/r/rpl_stop_slave.result	2011-01-18 17:38:10 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stop_slave.result	2011-02-23 11:54:58 +0000
@@ -75,6 +75,7 @@ include/wait_for_slave_sql_to_start.inc
 # Test end
 SET GLOBAL debug= '$debug_save';
 include/restart_slave.inc
+call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table");
 [connection master]
 DROP TABLE t1, t2;
 

=== modified file 'mysql-test/suite/rpl/r/rpl_temporary_errors.result'
--- a/mysql-test/suite/rpl/r/rpl_temporary_errors.result	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/r/rpl_temporary_errors.result	2011-02-23 20:01:27 +0000
@@ -36,6 +36,7 @@ a	b
 3	3
 4	4
 include/check_slave_is_running.inc
+call mtr.add_suppression("Slave SQL.*Could not execute Update_rows event on table test.t1");
 **** On Master ****
 DROP TABLE t1;
 include/rpl_end.inc

=== modified file 'mysql-test/suite/rpl/r/rpl_typeconv.result'
--- a/mysql-test/suite/rpl/r/rpl_typeconv.result	2010-12-19 17:15:12 +0000
+++ b/mysql-test/suite/rpl/r/rpl_typeconv.result	2011-02-23 11:54:58 +0000
@@ -534,6 +534,7 @@ BIT(6)         	BIT(5)         	ALL_LOSS
 BIT(5)         	BIT(12)        	ALL_LOSSY,ALL_NON_LOSSY  	<Correct value>
 BIT(12)        	BIT(5)         	ALL_LOSSY,ALL_NON_LOSSY  	<Correct value>
 DROP TABLE type_conversions;
+call mtr.add_suppression("Slave SQL.*Column 0 of table .test.t1. cannot be converted from type.* Error_code: 1677");
 DROP TABLE t1;
 set global slave_type_conversions = @saved_slave_type_conversions;
 include/rpl_end.inc

=== modified file 'mysql-test/suite/rpl/t/rpl_binlog_corruption.test'
--- a/mysql-test/suite/rpl/t/rpl_binlog_corruption.test	2011-02-07 15:31:01 +0000
+++ b/mysql-test/suite/rpl/t/rpl_binlog_corruption.test	2011-02-23 20:01:27 +0000
@@ -22,7 +22,7 @@ source include/have_debug.inc;
 
 --connection slave
 call mtr.add_suppression('Found invalid event in binary log');
-
+call mtr.add_suppression('Slave SQL.*Relay log read failure: Could not parse relay log event entry.* 1594');
 
 #
 # BUG#40482: server/mysqlbinlog crashes when reading invalid Incident_log_event

=== modified file 'mysql-test/suite/rpl/t/rpl_bug33931.test'
--- a/mysql-test/suite/rpl/t/rpl_bug33931.test	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/t/rpl_bug33931.test	2011-02-23 20:01:27 +0000
@@ -9,6 +9,7 @@ connection slave;
 
 # Add suppression for expected warnings in slaves error log
 call mtr.add_suppression("Failed during slave I/O thread initialization");
+call mtr.add_suppression("Slave SQL.*Failed during slave thread initialization.* 1593");
 
 --source include/stop_slave.inc
 reset slave;

=== modified file 'mysql-test/suite/rpl/t/rpl_checksum.test'
--- a/mysql-test/suite/rpl/t/rpl_checksum.test	2011-03-08 11:29:11 +0000
+++ b/mysql-test/suite/rpl/t/rpl_checksum.test	2011-03-08 19:12:46 +0000
@@ -10,6 +10,7 @@ call mtr.add_suppression('Replication ev
 # due to C failure simulation
 call mtr.add_suppression('Relay log write failure: could not queue event from master');
 call mtr.add_suppression('Event crc check failed! Most likely there is event corruption');
+call mtr.add_suppression('Slave SQL: Error initializing relay log position: I/O error reading event at position .*, Error_code: 1593');
 call mtr.add_suppression('Master is configured to log replication events with checksum, but will not send such events to slaves that cannot process');
 
 # A. read/write access to the global vars:

=== modified file 'mysql-test/suite/rpl/t/rpl_checksum_cache.test'
--- a/mysql-test/suite/rpl/t/rpl_checksum_cache.test	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/t/rpl_checksum_cache.test	2011-02-23 20:01:27 +0000
@@ -4,6 +4,7 @@
 --disable_warnings
 call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. Statement: insert into t2 set data=repeat.*'a', @act_size.*");
 call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. Statement: insert into t1 values.* NAME_CONST.*'n',.*, @data .*");
+call mtr.add_suppression("Slave SQL: slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table; waiting for the group completion");
 --enable_warnings
 
 connection master;

=== modified file 'mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test'
--- a/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test	2011-02-04 15:00:14 +0000
+++ b/mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test	2011-02-23 20:01:27 +0000
@@ -30,6 +30,7 @@ CREATE TABLE t1 (a INT NOT NULL AUTO_INC
 CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=InnoDB;
 --source include/rpl_sync.inc
 --connection server_4
+call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table");
 --echo
 
 #
@@ -85,6 +86,7 @@ INSERT INTO t1(b,c) VALUES('B',2);
 # Wait while C will stop.
 --connection server_3
 # 1062 = ER_DUP_ENTRY
+call mtr.add_suppression("Slave SQL.*Duplicate entry .6. for key .PRIMARY.* Error_code: 1062");
 --let $slave_sql_errno= 1062
 --source include/wait_for_slave_sql_error.inc
 --connection server_1

=== modified file 'mysql-test/suite/rpl/t/rpl_corruption.test'
--- a/mysql-test/suite/rpl/t/rpl_corruption.test	2011-03-08 19:28:55 +0000
+++ b/mysql-test/suite/rpl/t/rpl_corruption.test	2011-03-13 19:56:40 +0000
@@ -16,6 +16,7 @@ call mtr.add_suppression('Slave I/O: Rel
 call mtr.add_suppression('event read from binlog did not pass crc check');
 call mtr.add_suppression('Replication event checksum verification failed');
 call mtr.add_suppression('Event crc check failed! Most likely there is event corruption');
+call mtr.add_suppression('Slave SQL: Error initializing relay log position: I/O error reading event at position .*, Error_code: 1593');
 
 SET @old_master_verify_checksum = @@master_verify_checksum;
 
@@ -55,62 +56,66 @@ while ($i) {  
 }
 --enable_query_log
 
+#
+# Bug #58630 shows `+d' syntax has a side effect Andrei changed it to
+# unsigned `d' version which does not affect the tests logics.
+# todo:
+# restore *all* following `SET GLOBAL debug' back to `+|-d' when Bug
+# #58630, OBug#11765758 sorted out
+#
+
 # Emulate corruption in binlog file when SHOW BINLOG EVENTS is executing
 --echo # 2. Corruption in master binlog and SHOW BINLOG EVENTS
-SET GLOBAL debug="+d,corrupt_read_log_event_char";
+SET GLOBAL debug="d,corrupt_read_log_event_char";
 --echo SHOW BINLOG EVENTS;
 --disable_query_log
 send_eval SHOW BINLOG EVENTS FROM $pos;
 --enable_query_log
 --error ER_ERROR_WHEN_EXECUTING_COMMAND
 reap;
-SET GLOBAL debug="-d,corrupt_read_log_event_char";
+
+# see above comments on `+d' syntax
+SET GLOBAL debug="";
 
 # Emulate corruption on master with crc checking on master
 --echo # 3. Master read a corrupted event from binlog and send the error to slave
-SET GLOBAL debug="+d,corrupt_read_log_event";
+SET GLOBAL debug="d,corrupt_read_log_event";
 --connection slave
 START SLAVE IO_THREAD;
 let $slave_io_errno= 1236;
 --source include/wait_for_slave_io_error.inc
 --connection master
-SET GLOBAL debug="-d,corrupt_read_log_event";
+SET GLOBAL debug="";
 
 # Emulate corruption on master without crc checking on master
 --echo # 4. Master read a corrupted event from binlog and send it to slave
 --connection master
 SET GLOBAL master_verify_checksum=0;
-SET GLOBAL debug="+d,corrupt_read_log_event";
+SET GLOBAL debug="d,corrupt_read_log_event";
 --connection slave
 START SLAVE IO_THREAD;
-let $slave_io_errno= 1595;
+let $slave_io_errno= 1595,1722;
 --source include/wait_for_slave_io_error.inc
 --connection master
-SET GLOBAL debug="-d,corrupt_read_log_event";
+SET GLOBAL debug="";
 SET GLOBAL master_verify_checksum=1;
 
 # Emulate corruption in network
 --echo # 5. Slave. Corruption in network
 --connection slave
-SET GLOBAL debug="+d,corrupt_queue_event";
+SET GLOBAL debug="d,corrupt_queue_event";
 START SLAVE IO_THREAD;
-let $slave_io_errno= 1595;
+let $slave_io_errno= 1595,1722;
 --source include/wait_for_slave_io_error.inc
-SET GLOBAL debug="-d,corrupt_queue_event";
+SET GLOBAL debug="";
 
 # Emulate corruption in relay log
 --echo # 6. Slave. Corruption in relay log
 
-#
-# Bug #58630 shows `+d' syntax has a side effect
-# Andrei changed it to unsigned `d' version which does not affect the tests logics.
-# todo: restore back to `+d' when  Bug #58630,  OBug#11765758 sorted out
-#
 SET GLOBAL debug="d,corrupt_read_log_event_char";
 START SLAVE;
 let $slave_sql_errno= 1593;
 --source include/wait_for_slave_sql_error.inc
-# see above comments on `+d' syntax
 
 SET GLOBAL debug="";
 

=== modified file 'mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test'
--- a/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test	2010-12-19 17:07:28 +0000
+++ b/mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test	2011-02-23 09:31:37 +0000
@@ -122,6 +122,8 @@ UPDATE t7 LEFT JOIN (t8, t4, t1) ON (t7.
 # if any of the above statement are not ignored, it would cause error
 # and stop slave sql thread.
 sync_slave_with_master;
+connection slave;
+call mtr.add_suppression("Slave SQL.*Error .Table .test.t[47]. doesn.t exist. on query.* Error_code: 1146");
 connection master;
 
 # Parameters for include/wait_for_slave_sql_error_and_skip.inc:

=== modified file 'mysql-test/suite/rpl/t/rpl_heartbeat_basic.test'
--- a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test	2011-01-13 21:36:21 +0000
+++ b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test	2011-02-23 20:01:27 +0000
@@ -327,6 +327,8 @@ INSERT INTO t1 VALUES (1, 'on slave', NU
 --connection master
 INSERT INTO t1 VALUES (1, 'on master', NULL);
 --connection slave
+call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.. on query.* Error_code: 1062");
+call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table");
 let $slave_errno= ER_DUP_ENTRY
 --source include/wait_for_slave_sql_error.inc
 let $rcvd_heartbeats_before= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1);

=== modified file 'mysql-test/suite/rpl/t/rpl_idempotency.test'
--- a/mysql-test/suite/rpl/t/rpl_idempotency.test	2010-12-19 17:15:12 +0000
+++ b/mysql-test/suite/rpl/t/rpl_idempotency.test	2011-02-23 11:54:58 +0000
@@ -4,9 +4,10 @@
 source include/master-slave.inc;
 
 # Add suppression for expected warning(s) in slaves error log
-call mtr.add_suppression("Slave: Can't find record in 't.' Error_code: 1032");
-call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
-call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
+call mtr.add_suppression("Slave SQL.*Can.t find record in .t[12].* Error_code: 1032");
+call mtr.add_suppression("Slave SQL.*Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
+call mtr.add_suppression("Slave SQL.*Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
+call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.* Duplicate entry .1. for key .PRIMARY.* Error_code: 1062");
 
 connection master;
 CREATE TABLE t1 (a INT PRIMARY KEY);

=== modified file 'mysql-test/suite/rpl/t/rpl_ignore_table.test'
--- a/mysql-test/suite/rpl/t/rpl_ignore_table.test	2010-12-19 17:15:12 +0000
+++ b/mysql-test/suite/rpl/t/rpl_ignore_table.test	2011-02-23 11:54:58 +0000
@@ -125,6 +125,7 @@ show grants for mysqltest4@localhost;
 # where mysqltest1 does not exist on slave,
 # to succeed on slave the mode is temporarily changed
 set global slave_exec_mode='IDEMPOTENT';
+call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table mysql.* Error_code: 1032");
 
 connection master;
 drop table t1, mysqltest2.t2;

=== modified file 'mysql-test/suite/rpl/t/rpl_incident.test'
--- a/mysql-test/suite/rpl/t/rpl_incident.test	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/t/rpl_incident.test	2011-02-23 20:01:27 +0000
@@ -15,6 +15,7 @@ SELECT * FROM t1;
 
 connection slave;
 # Wait until SQL thread stops with error LOST_EVENT on master
+call mtr.add_suppression("Slave SQL.*The incident LOST_EVENTS occured on the master.* 1590");
 let $slave_sql_errno= 1590;
 let $show_slave_sql_error= 1;
 source include/wait_for_slave_sql_error.inc;

=== modified file 'mysql-test/suite/rpl/t/rpl_init_slave_errors.test'
--- a/mysql-test/suite/rpl/t/rpl_init_slave_errors.test	2010-12-19 17:07:28 +0000
+++ b/mysql-test/suite/rpl/t/rpl_init_slave_errors.test	2011-02-23 09:31:37 +0000
@@ -58,7 +58,7 @@ start slave;
 --let $show_slave_sql_error= 1
 --source include/wait_for_slave_sql_error.inc
 
-call mtr.add_suppression("Failed during slave I/O thread initialization");
+call mtr.add_suppression("Failed during slave.* thread initialization");
 
 SET GLOBAL debug= "";
 

=== modified file 'mysql-test/suite/rpl/t/rpl_known_bugs_detection.test'
--- a/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/t/rpl_known_bugs_detection.test	2011-02-23 20:01:27 +0000
@@ -33,6 +33,7 @@ connection slave;
 #1105 = ER_UNKNOWN_ERROR
 --let $slave_sql_errno= 1105
 --let $show_slave_sql_error= 1
+call mtr.add_suppression("Slave SQL.*suffer.*http:..bugs.mysql.com.bug.php.id=24432");
 --source include/wait_for_slave_sql_error.inc
 # show that it was not replicated
 SELECT * FROM t1;

=== modified file 'mysql-test/suite/rpl/t/rpl_loaddata_fatal.test'
--- a/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/t/rpl_loaddata_fatal.test	2011-02-23 20:01:27 +0000
@@ -15,6 +15,7 @@ connection master;
 LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE t1;
 
 connection slave;
+call mtr.add_suppression("Slave SQL.*Fatal error: Not enough memory, Error_code: 1593");
 let $slave_sql_errno= 1593;
 let $show_slave_sql_error= 1;
 source include/wait_for_slave_sql_error_and_skip.inc;

=== modified file 'mysql-test/suite/rpl/t/rpl_rotate_logs.test'
--- a/mysql-test/suite/rpl/t/rpl_rotate_logs.test	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/t/rpl_rotate_logs.test	2011-02-23 20:01:27 +0000
@@ -99,6 +99,7 @@ set insert_id=1234;
 insert into t2 values(NULL);
 connection slave;
 # 1062 = ER_DUP_ENTRY
+call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .1234. for key .PRIMARY.. on query.* Error_code: 1062");
 --let $slave_sql_errno= 1062
 --source include/wait_for_slave_sql_error_and_skip.inc
 

=== modified file 'mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test'
--- a/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test	2011-02-23 20:01:27 +0000
@@ -63,6 +63,7 @@ DROP TABLE t1;
 --echo **** On Slave **** 
 connection slave;
 SET GLOBAL QUERY_CACHE_SIZE=0;
+call mtr.add_suppression("Slave SQL.*Could not execute Update_rows event on table test.t1.* Error_code: 1032");
 
 --echo **** On Master **** 
 connection master;

=== modified file 'mysql-test/suite/rpl/t/rpl_row_colSize.test'
--- a/mysql-test/suite/rpl/t/rpl_row_colSize.test	2010-12-19 17:07:28 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_colSize.test	2011-02-23 11:54:58 +0000
@@ -160,6 +160,10 @@ let $test_table_slave = CREATE TABLE t1 
 let $test_insert = INSERT INTO t1 VALUES ('This is a test.');
 source include/test_fieldsize.inc;
 
+connection slave;
+call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 0 ...e mismatch.* Error_code: 1535");
+call mtr.add_suppression("Slave SQL.*Column 0 of table .test.t1. cannot be converted from type.* Error_code: 1677");
+
 --echo *** Cleanup  ***
 connection master;
 DROP TABLE IF EXISTS t1;

=== modified file 'mysql-test/suite/rpl/t/rpl_row_idempotency.test'
--- a/mysql-test/suite/rpl/t/rpl_row_idempotency.test	2010-12-19 17:15:12 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_idempotency.test	2011-02-23 11:54:58 +0000
@@ -9,10 +9,10 @@ connection slave;
 source include/have_innodb.inc;
 
 # Add suppression for expected warning(s) in slaves error log
-call mtr.add_suppression("Slave: Can't find record in 't.' Error_code: 1032");
-call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
-call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
-
+call mtr.add_suppression("Can.t find record in .t[12].* Error_code: 1032");
+call mtr.add_suppression("Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
+call mtr.add_suppression("Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
+call mtr.add_suppression("Duplicate entry .1. for key .PRIMARY.* Error_code: 1062");
 
 # bug#31609 Not all RBR slave errors reported as errors
 # bug#31552 Replication breaks when deleting rows from out-of-sync table

=== modified file 'mysql-test/suite/rpl/t/rpl_row_img_sanity.test'
--- a/mysql-test/suite/rpl/t/rpl_row_img_sanity.test	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_img_sanity.test	2011-02-23 20:01:27 +0000
@@ -24,6 +24,7 @@
 
 -- connection slave
 call mtr.add_suppression("Slave: Can\'t find record in \'t\' Error_code: 1032");
+call mtr.add_suppression("Slave SQL: Could not execute Update_rows event on table test.t; Can.t find record in .t.* Error_code: 1032");
 -- connection master
 
 ## assertion: check that default value for binlog-row-image == 'FULL'

=== modified file 'mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test'
--- a/mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test	2011-02-23 20:01:27 +0000
@@ -30,6 +30,7 @@ INSERT INTO t1 VALUES (1);
 connection slave;
 # slave should have stopped because can't find table t1
 # 1146 = ER_NO_SUCH_TABLE
+call mtr.add_suppression("Slave SQL.*Error executing row event: .Table .test.t1. doesn.t exist., Error_code: 1146");
 --let $slave_sql_errno= 1146
 --source include/wait_for_slave_sql_error.inc
 

=== modified file 'mysql-test/suite/rpl/t/rpl_show_errors.test'
--- a/mysql-test/suite/rpl/t/rpl_show_errors.test	2011-02-14 16:32:36 +0000
+++ b/mysql-test/suite/rpl/t/rpl_show_errors.test	2011-02-23 20:01:27 +0000
@@ -28,6 +28,7 @@ DROP TABLE t1; 
 # action: now  wait for the slave to stop because it cannot
 #         remove a table that does not exist
 let $slave_sql_errno=1051; # ER_BAD_TABLE_ERROR
+call mtr.add_suppression("Slave SQL: Error .Unknown table .test.t1.. on query.* Error_code: 1051");
 -- source include/wait_for_slave_sql_error.inc
 
 --let $errts0= query_get_value("SHOW SLAVE STATUS", $field, 1)

=== modified file 'mysql-test/suite/rpl/t/rpl_skip_error.test'
--- a/mysql-test/suite/rpl/t/rpl_skip_error.test	2010-12-19 17:07:28 +0000
+++ b/mysql-test/suite/rpl/t/rpl_skip_error.test	2011-02-23 09:31:37 +0000
@@ -102,6 +102,8 @@ SET SQL_LOG_BIN=1;
 
 connection slave;
 
+call mtr.add_suppression("Slave SQL.*Could not execute .*te_rows event on table test.t.; Duplicate entry.* Error_code: 1062");
+
 CREATE TABLE t1(id INT NOT NULL PRIMARY KEY, data INT) Engine=InnoDB;
 SHOW CREATE TABLE t1;
 

=== added file 'mysql-test/suite/rpl/t/rpl_skip_incident-master.opt'
--- a/mysql-test/suite/rpl/t/rpl_skip_incident-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_skip_incident-master.opt	2011-03-14 17:09:16 +0000
@@ -0,0 +1 @@
+--loose-debug=+d,incident_database_resync_on_replace

=== added file 'mysql-test/suite/rpl/t/rpl_skip_incident-slave.opt'
--- a/mysql-test/suite/rpl/t/rpl_skip_incident-slave.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_skip_incident-slave.opt	2011-03-14 17:09:16 +0000
@@ -0,0 +1 @@
+--slave-skip-error=1590

=== added file 'mysql-test/suite/rpl/t/rpl_skip_incident.test'
--- a/mysql-test/suite/rpl/t/rpl_skip_incident.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_skip_incident.test	2011-03-14 17:09:16 +0000
@@ -0,0 +1,28 @@
+--source include/master-slave.inc
+--source include/have_debug.inc
+
+--echo **** On Master ****
+CREATE TABLE t1 (a INT);
+
+INSERT INTO t1 VALUES (1),(2),(3);
+SELECT * FROM t1;
+
+# This will generate an incident log event and store it in the binary
+# log before the replace statement.
+REPLACE INTO t1 VALUES (4);
+
+--sync_slave_with_master
+
+# Now, we should have inserted the row into the table and the slave
+# should be running. We should also have rotated to a new binary log.
+
+SELECT * FROM t1;
+source include/check_slave_is_running.inc;
+
+connection master;
+
+--echo Should have two binary logs here
+--source include/show_binary_logs.inc
+DROP TABLE t1;
+--sync_slave_with_master
+--source include/rpl_end.inc

=== modified file 'mysql-test/suite/rpl/t/rpl_slave_grp_exec.test'
--- a/mysql-test/suite/rpl/t/rpl_slave_grp_exec.test	2010-12-19 17:07:28 +0000
+++ b/mysql-test/suite/rpl/t/rpl_slave_grp_exec.test	2011-02-23 11:54:58 +0000
@@ -63,6 +63,7 @@ SELECT * FROM t3 ORDER BY a;
 
 --connection slave
 # 1146 = ER_NO_SUCH_TABLE
+call mtr.add_suppression("Slave SQL.*Table .test.t3. doesn.t exist.* Error_code: 1146");
 --let $slave_sql_errno= 1146
 --source include/wait_for_slave_sql_error.inc
 SHOW TABLES LIKE 't%';

=== removed file 'mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile-slave.opt'
--- a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile-slave.opt	2009-03-18 10:31:17 +0000
+++ b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile-slave.opt	1970-01-01 00:00:00 +0000
@@ -1 +0,0 @@
---loose-debug=d,remove_slave_load_file_before_write

=== modified file 'mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test'
--- a/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test	2011-02-17 07:36:05 +0000
+++ b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test	2011-03-15 15:16:34 +0000
@@ -1,12 +1,21 @@
-##########################################################################
+# ==== Purpose ====
+#
 # This test verifies if the slave fails gracefully when the temporary 
-# file used to load data is removed while it is about to be used it. 
+# file used to load data is removed while it is about to be used. 
 # Similar errors are caught if the temporary directory is removed.
 #
+# ==== Implementation ====
+#
 # Steps:
+#    0 - Set debug variable remove_slave_load_file_before_write. This
+#        causes the slave to remove the file.
 #    1 - Creates a table and populates it through "LOAD DATA INFILE".
 #    2 - Catches error.
-##########################################################################
+#
+# ==== References ====
+#
+# BUG#42861: Assigning invalid directories to --slave-load-tmpdir crashes the slave
+# BUG#11872422: rpl_slave_load_remove_tmpfile fails sporadically in pb2
 
 --source include/have_binlog_format_statement.inc
 --source include/have_innodb.inc
@@ -18,6 +27,11 @@
 ##########################################################################
 #                            Loading data
 ##########################################################################
+
+connection slave;
+--let $old_debug= `SELECT @@GLOBAL.DEBUG`
+SET @@GLOBAL.DEBUG = '+d,remove_slave_load_file_before_write';
+
 connection master;
 
 create table t1(a int not null auto_increment, b int, primary key(a)) engine=innodb;
@@ -32,6 +46,7 @@ commit;
 #                            Catch Error
 ##########################################################################
 connection slave;
+
 # windows and linux different error numbers here:
 # Windows:
 #  - Last_Errno     29 (File not found)
@@ -54,7 +69,12 @@ RESET SLAVE;
 drop table t1;
 
 call mtr.add_suppression("Slave: Can't get stat of .*");
+call mtr.add_suppression("Slave SQL: Error .Can.t get stat of.* Error_code: 13");
 call mtr.add_suppression("Slave: File.* not found.*");
+call mtr.add_suppression("Slave SQL: Error .File.* not found.* Error_code: 29");
 --let $rpl_only_running_threads= 1
+
+eval SET @@GLOBAL.DEBUG = '$old_debug';
+
 --source include/rpl_end.inc
 

=== modified file 'mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist.test'
--- a/mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist.test	2010-12-19 17:07:28 +0000
+++ b/mysql-test/suite/rpl/t/rpl_slave_load_tmpdir_not_exist.test	2011-02-23 09:31:37 +0000
@@ -11,6 +11,7 @@
 --connection slave
 START SLAVE;
 # Why 12???
+call mtr.add_suppression("Slave SQL.*Unable to use slave.s temporary directory.* Error_code: 12");
 --let $slave_sql_errno= 12
 source include/wait_for_slave_sql_error.inc;
 

=== modified file 'mysql-test/suite/rpl/t/rpl_slave_start.test'
--- a/mysql-test/suite/rpl/t/rpl_slave_start.test	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/t/rpl_slave_start.test	2011-02-23 20:01:27 +0000
@@ -7,7 +7,9 @@ source include/have_debug_sync.inc;
 
 --echo [on slave]
 connection slave;
+
 CALL mtr.add_suppression("Slave: Table 't1' already exists Error_code: 1050");
+CALL mtr.add_suppression("Slave SQL: Error .Table .t1. already exists. on query.* Error_code: 1050");
 --echo # The statement makes SQL thread to fail.
 CREATE TABLE t1(c1 INT);
 

=== modified file 'mysql-test/suite/rpl/t/rpl_slow_query_log.test'
--- a/mysql-test/suite/rpl/t/rpl_slow_query_log.test	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/t/rpl_slow_query_log.test	2011-02-24 15:48:27 +0000
@@ -29,7 +29,7 @@ source include/master-slave.inc;
 source include/have_binlog_format_statement.inc;
 
 CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
-
+call mtr.add_suppression("Slave SQL: slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table; waiting for the group completion");
 
 # Prepare slave for different long_query_time we need to stop the slave 
 # and restart it as long_query_time variable is dynamic and, after 

=== modified file 'mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test'
--- a/mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test	2011-02-23 20:01:27 +0000
@@ -19,6 +19,7 @@ SET @@session.binlog_direct_non_transact
 # clean up
 --connection slave
 SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit;
+call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table");
 --connection master
 SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit;
 

=== modified file 'mysql-test/suite/rpl/t/rpl_stop_slave.test'
--- a/mysql-test/suite/rpl/t/rpl_stop_slave.test	2011-01-18 17:38:10 +0000
+++ b/mysql-test/suite/rpl/t/rpl_stop_slave.test	2011-02-23 11:54:58 +0000
@@ -47,6 +47,10 @@ source extra/rpl_tests/rpl_stop_slave.te
 SET GLOBAL debug= '$debug_save';
 source include/restart_slave_sql.inc;
 
+connection slave;
+call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table");
+connection master;
+
 --source include/rpl_connection_master.inc
 DROP TABLE t1, t2;
 

=== modified file 'mysql-test/suite/rpl/t/rpl_temporary_errors.test'
--- a/mysql-test/suite/rpl/t/rpl_temporary_errors.test	2010-12-19 17:22:30 +0000
+++ b/mysql-test/suite/rpl/t/rpl_temporary_errors.test	2011-02-23 20:01:27 +0000
@@ -28,6 +28,9 @@ SHOW STATUS LIKE 'Slave_retried_transact
 SELECT * FROM t1;
 source include/check_slave_is_running.inc;
 
+connection slave;
+call mtr.add_suppression("Slave SQL.*Could not execute Update_rows event on table test.t1");
+
 --echo **** On Master ****
 connection master;
 DROP TABLE t1;

=== modified file 'mysql-test/suite/rpl/t/rpl_typeconv.test'
--- a/mysql-test/suite/rpl/t/rpl_typeconv.test	2010-12-19 17:15:12 +0000
+++ b/mysql-test/suite/rpl/t/rpl_typeconv.test	2011-02-23 11:54:58 +0000
@@ -61,6 +61,8 @@ SELECT RPAD(Source, 15, ' ') AS Source_T
 enable_query_log;
 DROP TABLE type_conversions;
 
+call mtr.add_suppression("Slave SQL.*Column 0 of table .test.t1. cannot be converted from type.* Error_code: 1677");
+
 connection master;
 DROP TABLE t1;
 sync_slave_with_master;

=== added file 'mysql-test/suite/sys_vars/r/max_long_data_size_basic.result'
--- a/mysql-test/suite/sys_vars/r/max_long_data_size_basic.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/r/max_long_data_size_basic.result	2011-03-15 12:57:36 +0000
@@ -0,0 +1,14 @@
+select @@global.max_long_data_size=20;
+@@global.max_long_data_size=20
+0
+select @@session.max_long_data_size;
+ERROR HY000: Variable 'max_long_data_size' is a GLOBAL variable
+SELECT @@global.max_long_data_size = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='max_long_data_size';
+@@global.max_long_data_size = VARIABLE_VALUE
+1
+set global max_long_data_size=1;
+ERROR HY000: Variable 'max_long_data_size' is a read only variable
+set session max_long_data_size=1;
+ERROR HY000: Variable 'max_long_data_size' is a read only variable

=== added file 'mysql-test/suite/sys_vars/t/max_long_data_size_basic.test'
--- a/mysql-test/suite/sys_vars/t/max_long_data_size_basic.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/sys_vars/t/max_long_data_size_basic.test	2011-03-15 12:57:36 +0000
@@ -0,0 +1,17 @@
+select @@global.max_long_data_size=20;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.max_long_data_size;
+
+# Show that value of the variable matches the value in the GLOBAL I_S table
+SELECT @@global.max_long_data_size = VARIABLE_VALUE
+FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
+WHERE VARIABLE_NAME='max_long_data_size';
+
+#
+# show that it's read-only
+#
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set global max_long_data_size=1;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+set session max_long_data_size=1;
+

=== modified file 'mysql-test/t/archive_plugin.test'
--- a/mysql-test/t/archive_plugin.test	2010-06-15 08:52:18 +0000
+++ b/mysql-test/t/archive_plugin.test	2011-03-14 13:19:13 +0000
@@ -20,6 +20,14 @@ CREATE TABLE t1(a int) ENGINE=ARCHIVE;
 
 DROP TABLE t1;
 
+# This dummy statement is required for --ps-protocol mode.
+# The thing is that last prepared statement is "cached" in mysqltest.cc
+# (unless "reconnect" is enabled, and that's not the case here).
+# This statement forces mysqltest.cc to close prepared "DROP TABLE t1".
+# Otherwise, the plugin can not be uninstalled because there is an active
+# prepared statement using it.
+SELECT 1;
+
 UNINSTALL PLUGIN archive;
 
 --error ER_SP_DOES_NOT_EXIST 

=== modified file 'mysql-test/t/blackhole_plugin.test'
--- a/mysql-test/t/blackhole_plugin.test	2010-06-15 08:52:18 +0000
+++ b/mysql-test/t/blackhole_plugin.test	2011-03-14 13:19:13 +0000
@@ -20,6 +20,14 @@ CREATE TABLE t1(a int) ENGINE=BLACKHOLE;
 
 DROP TABLE t1;
 
+# This dummy statement is required for --ps-protocol mode.
+# The thing is that last prepared statement is "cached" in mysqltest.cc
+# (unless "reconnect" is enabled, and that's not the case here).
+# This statement forces mysqltest.cc to close prepared "DROP TABLE t1".
+# Otherwise, the plugin can not be uninstalled because there is an active
+# prepared statement using it.
+SELECT 1;
+
 UNINSTALL PLUGIN blackhole;
 --error ER_SP_DOES_NOT_EXIST
 UNINSTALL PLUGIN blackhole;

=== modified file 'mysql-test/t/file_contents.test'
--- a/mysql-test/t/file_contents.test	2011-02-16 12:44:28 +0000
+++ b/mysql-test/t/file_contents.test	2011-03-11 15:00:53 +0000
@@ -10,9 +10,10 @@
 
 --perl
 print "\nChecking 'INFO_SRC' and 'INFO_BIN'\n";
-$dir_docs = $ENV{'MYSQL_BINDIR'};
-if($dir_docs =~ m|/usr/|) {
+$dir_bin = $ENV{'MYSQL_BINDIR'};
+if ($dir_bin =~ m|/usr/|) {
   # RPM package
+  $dir_docs = $dir_bin;
   $dir_docs =~ s|/lib|/share/doc|;
   if(-d "$dir_docs/packages/MySQL-server") {
     # SuSE
@@ -21,8 +22,19 @@ if($dir_docs =~ m|/usr/|) {
     # RedHat: version number in directory name
     $dir_docs = glob "$dir_docs/MySQL-server*";
   }
+} elsif ($dir_bin =~ m|/usr$|) {
+  # RPM build during development
+  $dir_docs = "$dir_bin/share/doc";
+  if(-d "$dir_docs/packages/MySQL-server") {
+    # SuSE
+    $dir_docs = "$dir_docs/packages/MySQL-server";
+  } else {
+    # RedHat: version number in directory name
+    $dir_docs = glob "$dir_docs/MySQL-server*";
+  }
 } else {
   # tar.gz package, Windows, or developer work (in BZR)
+  $dir_docs = $dir_bin;
   $dir_docs =~ s|/lib||;
   if(-d "$dir_docs/docs") {
     $dir_docs = "$dir_docs/docs"; # package
@@ -32,7 +44,7 @@ if($dir_docs =~ m|/usr/|) {
 }
 $found_version = "No line 'MySQL source #.#.#'";
 $found_revision = "No line 'revision-id: .....'";
-open(I_SRC,"<","$dir_docs/INFO_SRC") or print "Cannot open 'INFO_SRC' in '$dir_docs'\n";
+open(I_SRC,"<","$dir_docs/INFO_SRC") or print "Cannot open 'INFO_SRC' in '$dir_docs' (starting from bindir '$dir_bin')\n";
 while(defined ($line = <I_SRC>)) {
   if ($line =~ m|^MySQL source \d\.\d\.\d+|) {$found_version = "Found MySQL version number";}
   if ($line =~ m|^revision-id: .*@.*-2\d{13}-\w+$|) {$found_revision = "Found BZR revision id";}
@@ -41,7 +53,7 @@ close I_SRC;
 print "INFO_SRC: $found_version / $found_revision\n";
 $found_compiler = "No line about compiler information";
 $found_features = "No line 'Feature flags'";
-open(I_BIN,"<","$dir_docs/INFO_BIN") or print "Cannot open 'INFO_BIN' in '$dir_docs'\n";
+open(I_BIN,"<","$dir_docs/INFO_BIN") or print "Cannot open 'INFO_BIN' in '$dir_docs' (starting from bindir '$dir_bin')\n";
 while(defined ($line = <I_BIN>)) {
   # "generator" on Windows, "flags" on Unix:
   if (($line =~ m| Compiler / generator used: |) ||

=== modified file 'mysql-test/t/flush_read_lock.test'
--- a/mysql-test/t/flush_read_lock.test	2010-11-12 13:57:08 +0000
+++ b/mysql-test/t/flush_read_lock.test	2011-02-23 11:54:58 +0000
@@ -557,6 +557,8 @@ let $cleanup_stmt= ; 
 --source include/check_ftwrl_compatible.inc
 deallocate prepare stmt1;
 
+call mtr.add_suppression("Slave SQL.*Can.t execute the query because you have a conflicting read lock., Error_code: 1223");
+
 --echo #
 --echo # 9.2.b) EXECUTE for statement which is incompatible with FTWRL
 --echo #        should be also incompatible.

=== modified file 'mysql-test/t/func_analyse.test'
--- a/mysql-test/t/func_analyse.test	2010-07-13 17:29:44 +0000
+++ b/mysql-test/t/func_analyse.test	2011-03-14 18:11:41 +0000
@@ -135,6 +135,18 @@ DROP TABLE t1;
 --echo End of 5.0 tests
 
 --echo #
+--echo # Bug#11765202: Dbug_violation_helper::~Dbug_violation_helper(): Assertion `!_entered' failed.
+--echo #
+
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (a VARCHAR(2) CHARSET UTF8 NOT NULL);
+INSERT INTO t1 VALUES ('e'),('e'),('e-');
+SELECT * FROM t1 PROCEDURE ANALYSE();
+DROP TABLE t1;
+
+--echo End of 5.1 tests
+
+--echo #
 --echo # Bug #47338 assertion in handler::ha_external_lock
 --echo #
 

=== modified file 'mysql-test/t/information_schema.test'
--- a/mysql-test/t/information_schema.test	2010-10-25 12:13:13 +0000
+++ b/mysql-test/t/information_schema.test	2011-03-11 18:53:12 +0000
@@ -18,6 +18,11 @@ DROP VIEW IF EXISTS v1;
 --enable_warnings
 
 
+--echo #
+--echo # Bug#11763174 INFORMATION_SCHEMA.PARAMETERS.NUMERIC_PRECISION SHOULD BE BIGINT 
+--echo #
+select table_name, data_type, column_type from information_schema.columns  where column_name = 'numeric_precision' and table_schema = 'information_schema';
+
 show variables where variable_name like "skip_show_database";
 grant select, update, execute on test.* to mysqltest_2@localhost;
 grant select, update on test.* to mysqltest_1@localhost;

=== modified file 'mysql-test/t/mysqlbinlog_raw_mode.test'
--- a/mysql-test/t/mysqlbinlog_raw_mode.test	2010-05-21 21:48:20 +0000
+++ b/mysql-test/t/mysqlbinlog_raw_mode.test	2011-03-07 15:17:39 +0000
@@ -7,8 +7,13 @@
 # If exit code is good or bad then entry in raw_mode_exit table will be created
 # Anything above exit code 1 is bad.  We wait for this
 CREATE TABLE raw_mode_exit (exit_code INT);
---system `$MYSQL_BINLOG --raw --read-from-remote-server --stop-never --user=root --host=127.0.0.1 --port=$MASTER_MYPORT --result-file=$MYSQLTEST_VARDIR/tmp/ master-bin.000001 ; [ \$? -le 1 ]` && $MYSQL -e "use test; INSERT INTO raw_mode_exit VALUES (1);" &
-
+# Now jump some loops to have mysqlbinlog executed in the background
+--write_file $MYSQL_TMP_DIR/mbl.sh
+#!/bin/sh
+(`$MYSQL_BINLOG --raw --read-from-remote-server --stop-never --user=root --host=127.0.0.1 --port=$MASTER_MYPORT --result-file=$MYSQLTEST_VARDIR/tmp/ master-bin.000001 ; [ $? -le 1 ]` && $MYSQL -e "use test; INSERT INTO raw_mode_exit VALUES (1);") < /dev/null > /dev/null 2>&1 &
+EOF
+--chmod 0755 $MYSQL_TMP_DIR/mbl.sh
+--exec $MYSQL_TMP_DIR/mbl.sh
 let $wait_condition= SELECT id from information_schema.processlist where processlist.command like '%Binlog%' and state like '%Master has sent%';
 --source include/wait_condition.inc
 --diff_files $MYSQLTEST_VARDIR/tmp/master-bin.000001 $MYSQLD_DATADIR/master-bin.000001
@@ -24,5 +29,6 @@ DROP TABLE raw_mode_exit;
 --remove_file $MYSQLTEST_VARDIR/tmp/master-bin.000001
 --remove_file $MYSQLTEST_VARDIR/tmp/master-bin.000002
 --remove_file $MYSQLTEST_VARDIR/tmp/master-bin.000003
+--remove_file $MYSQL_TMP_DIR/mbl.sh
 
 --echo End of tests

=== modified file 'mysql-test/t/mysqltest.test'
--- a/mysql-test/t/mysqltest.test	2011-01-12 10:22:11 +0000
+++ b/mysql-test/t/mysqltest.test	2011-03-07 15:17:39 +0000
@@ -1072,22 +1072,11 @@ echo $d;
 
 
 # ----------------------------------------------------------------------------
-# Test system
+# Test system (which is now deprecated)
 # ----------------------------------------------------------------------------
-#system ls > /dev/null;
-system echo "hej" > /dev/null;
-#--system ls > /dev/null
---system echo "hej" > /dev/null;
 
 --error 1
---exec echo "system;" | $MYSQL_TEST 2>&1
---error 1
---exec echo "system $NONEXISTSINFVAREABLI;" | $MYSQL_TEST 2>&1
-
---disable_abort_on_error
-system NonExistsinfComamdn 2> /dev/null;
---enable_abort_on_error
-
+--exec echo "system something;" | $MYSQL_TEST 2>&1
 
 # ----------------------------------------------------------------------------
 # Test delimiter

=== modified file 'mysql-test/t/partition_mgm_err2.test'
--- a/mysql-test/t/partition_mgm_err2.test	2007-04-25 18:21:55 +0000
+++ b/mysql-test/t/partition_mgm_err2.test	2011-03-07 15:17:39 +0000
@@ -11,8 +11,9 @@
 #
 # BUG: 14354 Partitions: data directory clause fails
 #
---system rm -rf $MYSQLTEST_VARDIR/tmp/bug14354
---system mkdir $MYSQLTEST_VARDIR/tmp/bug14354
+--error 0,1
+--remove_files_wildcard $MYSQLTEST_VARDIR/tmp/bug14354
+--mkdir $MYSQLTEST_VARDIR/tmp/bug14354
 disable_query_log;
 eval CREATE TABLE t1 (id int) PARTITION BY RANGE(id) (
 PARTITION p1 VALUES LESS THAN (20) ENGINE=myisam
@@ -20,7 +21,8 @@ DATA DIRECTORY="$MYSQLTEST_VARDIR/tmp/bu
 INDEX DIRECTORY="$MYSQLTEST_VARDIR/tmp/bug14354");
 enable_query_log;
 INSERT INTO t1 VALUES (15);
---system test -f $MYSQLTEST_VARDIR/tmp/bug14354/t1#P#p1.MYD
---system test -f $MYSQLTEST_VARDIR/tmp/bug14354/t1#P#p1.MYI
+--file_exists $MYSQLTEST_VARDIR/tmp/bug14354/t1#P#p1.MYD
+--file_exists $MYSQLTEST_VARDIR/tmp/bug14354/t1#P#p1.MYI
 DROP TABLE t1;
---system rm -rf $MYSQLTEST_VARDIR/tmp/bug14354
+--remove_files_wildcard $MYSQLTEST_VARDIR/tmp/bug14354
+--rmdir $MYSQLTEST_VARDIR/tmp/bug14354

=== modified file 'mysql-test/t/repair.test'
--- a/mysql-test/t/repair.test	2010-02-03 05:32:38 +0000
+++ b/mysql-test/t/repair.test	2011-03-07 15:17:39 +0000
@@ -30,7 +30,7 @@ repair table t1 use_frm;
 create table t1 engine=myisam SELECT 1,"table 1";
 flush tables;
 let $MYSQLD_DATADIR= `select @@datadir`;
-system echo 1 > $MYSQLD_DATADIR/test/t1.MYI ;
+exec echo 1 > $MYSQLD_DATADIR/test/t1.MYI ;
 repair table t1;
 repair table t1 use_frm;
 drop table t1;

=== modified file 'mysql-test/t/show_check.test'
--- a/mysql-test/t/show_check.test	2011-01-18 13:09:35 +0000
+++ b/mysql-test/t/show_check.test	2011-03-07 15:17:39 +0000
@@ -442,7 +442,7 @@ flush tables;
 
 # Create a junk frm file on disk
 let $MYSQLD_DATADIR= `select @@datadir`;
-system echo "this is a junk file for test" >> $MYSQLD_DATADIR/test/t1.frm ;
+exec echo "this is a junk file for test" >> $MYSQLD_DATADIR/test/t1.frm ;
 --replace_column 6 # 7 # 8 # 9 #
 SHOW TABLE STATUS like 't1';
 --error ER_NOT_FORM_FILE

=== added file 'mysql-test/t/ssl_cipher-master.opt'
--- a/mysql-test/t/ssl_cipher-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/ssl_cipher-master.opt	2011-03-11 10:46:34 +0000
@@ -0,0 +1 @@
+--ssl-cipher=AES128-SHA

=== added file 'mysql-test/t/ssl_cipher.test'
--- a/mysql-test/t/ssl_cipher.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/t/ssl_cipher.test	2011-03-11 10:46:34 +0000
@@ -0,0 +1,23 @@
+# Turn on ssl between the client and server
+# and run a number of tests
+
+--echo #
+--echo # BUG#11760210 - SSL_CIPHER_LIST NOT SET OR RETURNED FOR "SHOW STATUS LIKE 'SSL_CIPHER_LIST'"
+--echo #
+
+-- source include/have_ssl.inc
+
+# Save the initial number of concurrent sessions
+--source include/count_sessions.inc
+
+connect (ssl_con,localhost,root,,,,,SSL);
+
+# Check Cipher Name and Cipher List
+SHOW STATUS LIKE 'Ssl_cipher';
+SHOW STATUS LIKE 'Ssl_cipher_list';
+
+connection default;
+disconnect ssl_con;
+
+# Wait till all disconnects are completed
+--source include/wait_until_count_sessions.inc

=== modified file 'mysql-test/t/variables.test'
--- a/mysql-test/t/variables.test	2011-02-10 08:52:44 +0000
+++ b/mysql-test/t/variables.test	2011-03-15 13:03:22 +0000
@@ -1268,6 +1268,11 @@ SET @@global.max_join_size=0;
 SET @@global.key_buffer_size=0;
 SET @@global.key_cache_block_size=0;
 
+#
+# Bug#56976: added new start-up parameter
+#
+select @@max_long_data_size;
+
 # cleanup
 SET @@global.max_binlog_cache_size=DEFAULT;
 SET @@global.binlog_cache_size=DEFAULT;

=== modified file 'regex/CMakeLists.txt'
--- a/regex/CMakeLists.txt	2010-10-05 06:33:15 +0000
+++ b/regex/CMakeLists.txt	2011-03-03 10:09:53 +0000
@@ -18,9 +18,11 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/
 SET(REGEX_SOURCES regcomp.c regerror.c regexec.c regfree.c reginit.c)
 ADD_CONVENIENCE_LIBRARY(regex ${REGEX_SOURCES})
 
-ADD_EXECUTABLE(re main.c split.c debug.c)
-TARGET_LINK_LIBRARIES(re regex strings mysys)
+IF(WITH_UNIT_TESTS)
+  ADD_EXECUTABLE(re main.c split.c debug.c)
+  TARGET_LINK_LIBRARIES(re regex strings mysys)
 
-ADD_TEST(regex1 re     -i${CMAKE_CURRENT_SOURCE_DIR}/tests)
-ADD_TEST(regex2 re -el -i${CMAKE_CURRENT_SOURCE_DIR}/tests)
-ADD_TEST(regex3 re -er -i${CMAKE_CURRENT_SOURCE_DIR}/tests)
+  ADD_TEST(regex1 re     -I)
+  ADD_TEST(regex2 re -el -I)
+  ADD_TEST(regex3 re -er -I)
+ENDIF()

=== modified file 'regex/main.c'
--- a/regex/main.c	2010-10-19 22:58:36 +0000
+++ b/regex/main.c	2011-03-03 10:09:53 +0000
@@ -5,6 +5,7 @@
 
 #include "my_regex.h"
 #include "main.ih"
+#include "tests_include.h"
 
 char *progname;
 int debug = 0;
@@ -65,6 +66,7 @@ char *argv[];
 	size_t len;
 	int c;
 	int errflg = 0;
+	int opt_inline = 0;
 	register int i;
         char *input_file_name= NULL;
 	extern int optind;
@@ -72,7 +74,7 @@ char *argv[];
 
 	progname = argv[0];
 
-	while ((c = getopt(argc, argv, "c:e:i:S:E:x")) != EOF)
+	while ((c = getopt(argc, argv, "c:e:i:S:E:xI")) != EOF)
 		switch (c) {
 		case 'c':	/* compile options */
 			copts = options('c', optarg);
@@ -92,6 +94,9 @@ char *argv[];
 		case 'x':	/* Debugging. */
 			debug++;
 			break;
+		case 'I':	/* Inline. */
+			opt_inline= 1;
+			break;
 		case '?':
 		default:
 			errflg++;
@@ -100,10 +105,15 @@ char *argv[];
 	if (errflg) {
 		fprintf(stderr, "usage: %s ", progname);
 		fprintf(stderr,
-                        "[-c copt][-e eopt][-i filename][-S][-E][-x] [re]\n");
+                        "[-c copt][-e eopt][-i filename][-S][-E][-x][-I] [re]\n");
 		exit(2);
 	}
 
+        if (opt_inline) {
+          regress(NULL);
+          exit(status);
+        }
+
 	if (optind >= argc && !input_file_name) {
 		regress(stdin);
 		exit(status);
@@ -165,9 +175,24 @@ char *argv[];
 	exit(status);
 }
 
+char*
+get_next_line(s, size, stream)
+char *s;
+int size;
+FILE *stream;
+{
+  if (stream)
+    return fgets(s, size, stream);
+  if (test_array[line])
+    return strncpy(s, test_array[line], size);
+  return NULL;
+}
+
 /*
  - regress - main loop of regression test
  == void regress(FILE *in);
+    Reads file, line-by-line.
+    If in == NULL, we read data from test_array instead.
  */
 void
 regress(in)
@@ -185,13 +210,14 @@ FILE *in;
 	const char *bpname = "MY_REG_BADPAT";
 	my_regex_t re;
 
-	while (fgets(inbuf, sizeof(inbuf), in) != NULL) {
+	while (get_next_line(inbuf, sizeof(inbuf), in) != NULL) {
 		line++;
-		if (inbuf[0] == '#' || inbuf[0] == '\n')
+		if (inbuf[0] == '#' || inbuf[0] == '\n' || inbuf[0] == '\0')
 			continue;			/* NOTE CONTINUE */
-		inbuf[strlen(inbuf)-1] = '\0';	/* get rid of stupid \n */
+		if (inbuf[strlen(inbuf)-1] == '\n')
+		  inbuf[strlen(inbuf)-1] = '\0';  /* get rid of stupid \n */
 		if (debug)
-			fprintf(stdout, "%d:\n", line);
+                  fprintf(stdout, "%d: <%s>\n", line, inbuf);
 		nf = split(inbuf, f, MAXF, (char*) "\t\t");
 		if (nf < 3) {
 			fprintf(stderr, "bad input, line %d\n", line);

=== renamed file 'regex/tests' => 'regex/tests_include.h'
--- a/regex/tests	2010-07-26 10:39:38 +0000
+++ b/regex/tests_include.h	2011-03-03 10:09:53 +0000
@@ -1,477 +1,482 @@
-# regular expression test set
-# Lines are at least three fields, separated by one or more tabs.  "" stands
-# for an empty field.  First field is an RE.  Second field is flags.  If
-# C flag given, regcomp() is expected to fail, and the third field is the
-# error name (minus the leading REG_).
-#
-# Otherwise it is expected to succeed, and the third field is the string to
-# try matching it against.  If there is no fourth field, the match is
-# expected to fail.  If there is a fourth field, it is the substring that
-# the RE is expected to match.  If there is a fifth field, it is a comma-
-# separated list of what the subexpressions should match, with - indicating
-# no match for that one.  In both the fourth and fifth fields, a (sub)field
-# starting with @ indicates that the (sub)expression is expected to match
-# a null string followed by the stuff after the @; this provides a way to
-# test where null strings match.  The character `N' in REs and strings
-# is newline, `S' is space, `T' is tab, `Z' is NUL.
-#
-# The full list of flags:
-#	-	placeholder, does nothing
-#	b	RE is a BRE, not an ERE
-#	&	try it as both an ERE and a BRE
-#	C	regcomp() error expected, third field is error name
-#	i	REG_ICASE
-#	m	("mundane") REG_NOSPEC
-#	s	REG_NOSUB (not really testable)
-#	n	REG_NEWLINE
-#	^	REG_NOTBOL
-#	$	REG_NOTEOL
-#	#	REG_STARTEND (see below)
-#	p	REG_PEND
-#
-# For REG_STARTEND, the start/end offsets are those of the substring
-# enclosed in ().
-
-# basics
-a		&	a	a
-abc		&	abc	abc
-abc|de		-	abc	abc
-a|b|c		-	abc	a
-
-# parentheses and perversions thereof
-a(b)c		-	abc	abc
-a\(b\)c		b	abc	abc
-a(		C	EPAREN
-a(		b	a(	a(
-a\(		-	a(	a(
-a\(		bC	EPAREN
-a\(b		bC	EPAREN
-a(b		C	EPAREN
-a(b		b	a(b	a(b
-# gag me with a right parenthesis -- 1003.2 goofed here (my fault, partly)
-a)		-	a)	a)
-)		-	)	)
-# end gagging (in a just world, those *should* give EPAREN)
-a)		b	a)	a)
-a\)		bC	EPAREN
-\)		bC	EPAREN
-a()b		-	ab	ab
-a\(\)b		b	ab	ab
-
-# anchoring and REG_NEWLINE
-^abc$		&	abc	abc
-a^b		-	a^b
-a^b		b	a^b	a^b
-a$b		-	a$b
-a$b		b	a$b	a$b
-^		&	abc	@abc
-$		&	abc	@
-^$		&	""	@
-$^		-	""	@
-\($\)\(^\)	b	""	@
-# stop retching, those are legitimate (although disgusting)
-^^		-	""	@
-$$		-	""	@
-b$		&	abNc
-b$		&n	abNc	b
-^b$		&	aNbNc
-^b$		&n	aNbNc	b
-^$		&n	aNNb	@Nb
-^$		n	abc
-^$		n	abcN	@
-$^		n	aNNb	@Nb
-\($\)\(^\)	bn	aNNb	@Nb
-^^		n^	aNNb	@Nb
-$$		n	aNNb	@NN
-^a		^	a
-a$		$	a
-^a		^n	aNb
-^b		^n	aNb	b
-a$		$n	bNa
-b$		$n	bNa	b
-a*(^b$)c*	-	b	b
-a*\(^b$\)c*	b	b	b
-
-# certain syntax errors and non-errors
-|		C	EMPTY
-|		b	|	|
-*		C	BADRPT
-*		b	*	*
-+		C	BADRPT
-?		C	BADRPT
-""		&C	EMPTY
-()		-	abc	@abc
-\(\)		b	abc	@abc
-a||b		C	EMPTY
-|ab		C	EMPTY
-ab|		C	EMPTY
-(|a)b		C	EMPTY
-(a|)b		C	EMPTY
-(*a)		C	BADRPT
-(+a)		C	BADRPT
-(?a)		C	BADRPT
-({1}a)		C	BADRPT
-\(\{1\}a\)	bC	BADRPT
-(a|*b)		C	BADRPT
-(a|+b)		C	BADRPT
-(a|?b)		C	BADRPT
-(a|{1}b)	C	BADRPT
-^*		C	BADRPT
-^*		b	*	*
-^+		C	BADRPT
-^?		C	BADRPT
-^{1}		C	BADRPT
-^\{1\}		bC	BADRPT
-
-# metacharacters, backslashes
-a.c		&	abc	abc
-a[bc]d		&	abd	abd
-a\*c		&	a*c	a*c
-a\\b		&	a\b	a\b
-a\\\*b		&	a\*b	a\*b
-a\bc		&	abc	abc
-a\		&C	EESCAPE
-a\\bc		&	a\bc	a\bc
-\{		bC	BADRPT
-a\[b		&	a[b	a[b
-a[b		&C	EBRACK
-# trailing $ is a peculiar special case for the BRE code
-a$		&	a	a
-a$		&	a$
-a\$		&	a
-a\$		&	a$	a$
-a\\$		&	a
-a\\$		&	a$
-a\\$		&	a\$
-a\\$		&	a\	a\
-
-# back references, ugh
-a\(b\)\2c	bC	ESUBREG
-a\(b\1\)c	bC	ESUBREG
-a\(b*\)c\1d	b	abbcbbd	abbcbbd	bb
-a\(b*\)c\1d	b	abbcbd
-a\(b*\)c\1d	b	abbcbbbd
-^\(.\)\1	b	abc
-a\([bc]\)\1d	b	abcdabbd	abbd	b
-a\(\([bc]\)\2\)*d	b	abbccd	abbccd
-a\(\([bc]\)\2\)*d	b	abbcbd
-# actually, this next one probably ought to fail, but the spec is unclear
-a\(\(b\)*\2\)*d		b	abbbd	abbbd
-# here is a case that no NFA implementation does right
-\(ab*\)[ab]*\1	b	ababaaa	ababaaa	a
-# check out normal matching in the presence of back refs
-\(a\)\1bcd	b	aabcd	aabcd
-\(a\)\1bc*d	b	aabcd	aabcd
-\(a\)\1bc*d	b	aabd	aabd
-\(a\)\1bc*d	b	aabcccd	aabcccd
-\(a\)\1bc*[ce]d	b	aabcccd	aabcccd
-^\(a\)\1b\(c\)*cd$	b	aabcccd	aabcccd
-
-# ordinary repetitions
-ab*c		&	abc	abc
-ab+c		-	abc	abc
-ab?c		-	abc	abc
-a\(*\)b		b	a*b	a*b
-a\(**\)b	b	ab	ab
-a\(***\)b	bC	BADRPT
-*a		b	*a	*a
-**a		b	a	a
-***a		bC	BADRPT
-
-# the dreaded bounded repetitions
-{		&	{	{
-{abc		&	{abc	{abc
-{1		C	BADRPT
-{1}		C	BADRPT
-a{b		&	a{b	a{b
-a{1}b		-	ab	ab
-a\{1\}b		b	ab	ab
-a{1,}b		-	ab	ab
-a\{1,\}b	b	ab	ab
-a{1,2}b		-	aab	aab
-a\{1,2\}b	b	aab	aab
-a{1		C	EBRACE
-a\{1		bC	EBRACE
-a{1a		C	EBRACE
-a\{1a		bC	EBRACE
-a{1a}		C	BADBR
-a\{1a\}		bC	BADBR
-a{,2}		-	a{,2}	a{,2}
-a\{,2\}		bC	BADBR
-a{,}		-	a{,}	a{,}
-a\{,\}		bC	BADBR
-a{1,x}		C	BADBR
-a\{1,x\}	bC	BADBR
-a{1,x		C	EBRACE
-a\{1,x		bC	EBRACE
-a{300}		C	BADBR
-a\{300\}	bC	BADBR
-a{1,0}		C	BADBR
-a\{1,0\}	bC	BADBR
-ab{0,0}c	-	abcac	ac
-ab\{0,0\}c	b	abcac	ac
-ab{0,1}c	-	abcac	abc
-ab\{0,1\}c	b	abcac	abc
-ab{0,3}c	-	abbcac	abbc
-ab\{0,3\}c	b	abbcac	abbc
-ab{1,1}c	-	acabc	abc
-ab\{1,1\}c	b	acabc	abc
-ab{1,3}c	-	acabc	abc
-ab\{1,3\}c	b	acabc	abc
-ab{2,2}c	-	abcabbc	abbc
-ab\{2,2\}c	b	abcabbc	abbc
-ab{2,4}c	-	abcabbc	abbc
-ab\{2,4\}c	b	abcabbc	abbc
-((a{1,10}){1,10}){1,10}	-	a	a	a,a
-
-# multiple repetitions
-a**		&C	BADRPT
-a++		C	BADRPT
-a??		C	BADRPT
-a*+		C	BADRPT
-a*?		C	BADRPT
-a+*		C	BADRPT
-a+?		C	BADRPT
-a?*		C	BADRPT
-a?+		C	BADRPT
-a{1}{1}		C	BADRPT
-a*{1}		C	BADRPT
-a+{1}		C	BADRPT
-a?{1}		C	BADRPT
-a{1}*		C	BADRPT
-a{1}+		C	BADRPT
-a{1}?		C	BADRPT
-a*{b}		-	a{b}	a{b}
-a\{1\}\{1\}	bC	BADRPT
-a*\{1\}		bC	BADRPT
-a\{1\}*		bC	BADRPT
-
-# brackets, and numerous perversions thereof
-a[b]c		&	abc	abc
-a[ab]c		&	abc	abc
-a[^ab]c		&	adc	adc
-a[]b]c		&	a]c	a]c
-a[[b]c		&	a[c	a[c
-a[-b]c		&	a-c	a-c
-a[^]b]c		&	adc	adc
-a[^-b]c		&	adc	adc
-a[b-]c		&	a-c	a-c
-a[b		&C	EBRACK
-a[]		&C	EBRACK
-a[1-3]c		&	a2c	a2c
-a[3-1]c		&C	ERANGE
-a[1-3-5]c	&C	ERANGE
-a[[.-.]--]c	&	a-c	a-c
-a[1-		&C	ERANGE
-a[[.		&C	EBRACK
-a[[.x		&C	EBRACK
-a[[.x.		&C	EBRACK
-a[[.x.]		&C	EBRACK
-a[[.x.]]	&	ax	ax
-a[[.x,.]]	&C	ECOLLATE
-a[[.one.]]b	&	a1b	a1b
-a[[.notdef.]]b	&C	ECOLLATE
-a[[.].]]b	&	a]b	a]b
-a[[:notdef:]]c	&C	ECTYPE
-a[[:		&C	EBRACK
-a[[:alpha	&C	EBRACK
-a[[:alpha:]	&C	EBRACK
-a[[:alpha,:]	&C	ECTYPE
-a[[:]:]]b	&C	ECTYPE
-a[[:-:]]b	&C	ECTYPE
-a[[:alph:]]	&C	ECTYPE
-a[[:alphabet:]]	&C	ECTYPE
-[[:alnum:]]+	-	-%@aot tag '\t' as blank, so we will match only two spaces.
-# See: Bug #55427 REGEXP does not recognize '\t' as [:blank:]
-#[[:blank:]]+	-	aSSTb	SST
-[[:blank:]]+	-	aSSTb	SS
-[[:cntrl:]]+	-	aNTb	NT
-[[:digit:]]+	-	a019b	019
-[[:graph:]]+	-	Sa%bS	a%b
-[[:lower:]]+	-	AabC	ab
-[[:print:]]+	-	NaSbN	aSb
-[[:punct:]]+	-	S%-&T	%-&
-[[:space:]]+	-	aSNTb	SNT
-[[:upper:]]+	-	aBCd	BC
-[[:xdigit:]]+	-	p0f3Cq	0f3C
-a[[=b=]]c	&	abc	abc
-a[[=		&C	EBRACK
-a[[=b		&C	EBRACK
-a[[=b=		&C	EBRACK
-a[[=b=]		&C	EBRACK
-a[[=b,=]]	&C	ECOLLATE
-a[[=one=]]b	&	a1b	a1b
-
-# complexities
-a(((b)))c	-	abc	abc
-a(b|(c))d	-	abd	abd
-a(b*|c)d	-	abbd	abbd
-# just gotta have one DFA-buster, of course
-a[ab]{20}	-	aaaaabaaaabaaaabaaaab	aaaaabaaaabaaaabaaaab
-# and an inline expansion in case somebody gets tricky
-a[ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab]	-	aaaaabaaaabaaaabaaaab	aaaaabaaaabaaaabaaaab
-# and in case somebody just slips in an NFA...
-a[ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab](wee|week)(knights|night)	-	aaaaabaaaabaaaabaaaabweeknights	aaaaabaaaabaaaabaaaabweeknights
-# fish for anomalies as the number of states passes 32
-12345678901234567890123456789	-	a12345678901234567890123456789b	12345678901234567890123456789
-123456789012345678901234567890	-	a123456789012345678901234567890b	123456789012345678901234567890
-1234567890123456789012345678901	-	a1234567890123456789012345678901b	1234567890123456789012345678901
-12345678901234567890123456789012	-	a12345678901234567890123456789012b	12345678901234567890123456789012
-123456789012345678901234567890123	-	a123456789012345678901234567890123b	123456789012345678901234567890123
-# and one really big one, beyond any plausible word width
-1234567890123456789012345678901234567890123456789012345678901234567890	-	a1234567890123456789012345678901234567890123456789012345678901234567890b	1234567890123456789012345678901234567890123456789012345678901234567890
-# fish for problems as brackets go past 8
-[ab][cd][ef][gh][ij][kl][mn]	-	xacegikmoq	acegikm
-[ab][cd][ef][gh][ij][kl][mn][op]	-	xacegikmoq	acegikmo
-[ab][cd][ef][gh][ij][kl][mn][op][qr]	-	xacegikmoqy	acegikmoq
-[ab][cd][ef][gh][ij][kl][mn][op][q]	-	xacegikmoqy	acegikmoq
-
-# subtleties of matching
-abc		&	xabcy	abc
-a\(b\)?c\1d	b	acd
-aBc		i	Abc	Abc
-a[Bc]*d		i	abBCcd	abBCcd
-0[[:upper:]]1	&i	0a1	0a1
-0[[:lower:]]1	&i	0A1	0A1
-a[^b]c		&i	abc
-a[^b]c		&i	aBc
-a[^b]c		&i	adc	adc
-[a]b[c]		-	abc	abc
-[a]b[a]		-	aba	aba
-[abc]b[abc]	-	abc	abc
-[abc]b[abd]	-	abd	abd
-a(b?c)+d	-	accd	accd
-(wee|week)(knights|night)	-	weeknights	weeknights
-(we|wee|week|frob)(knights|night|day)	-	weeknights	weeknights
-a[bc]d		-	xyzaaabcaababdacd	abd
-a[ab]c		-	aaabc	abc
-abc		s	abc	abc
-a*		&	b	@b
-
-# Let's have some fun -- try to match a C comment.
-# first the obvious, which looks okay at first glance...
-/\*.*\*/	-	/*x*/	/*x*/
-# but...
-/\*.*\*/	-	/*x*/y/*z*/	/*x*/y/*z*/
-# okay, we must not match */ inside; try to do that...
-/\*([^*]|\*[^/])*\*/	-	/*x*/	/*x*/
-/\*([^*]|\*[^/])*\*/	-	/*x*/y/*z*/	/*x*/
-# but...
-/\*([^*]|\*[^/])*\*/	-	/*x**/y/*z*/	/*x**/y/*z*/
-# and a still fancier version, which does it right (I think)...
-/\*([^*]|\*+[^*/])*\*+/	-	/*x*/	/*x*/
-/\*([^*]|\*+[^*/])*\*+/	-	/*x*/y/*z*/	/*x*/
-/\*([^*]|\*+[^*/])*\*+/	-	/*x**/y/*z*/	/*x**/
-/\*([^*]|\*+[^*/])*\*+/	-	/*x****/y/*z*/	/*x****/
-/\*([^*]|\*+[^*/])*\*+/	-	/*x**x*/y/*z*/	/*x**x*/
-/\*([^*]|\*+[^*/])*\*+/	-	/*x***x/y/*z*/	/*x***x/y/*z*/
-
-# subexpressions
-a(b)(c)d	-	abcd	abcd	b,c
-a(((b)))c	-	abc	abc	b,b,b
-a(b|(c))d	-	abd	abd	b,-
-a(b*|c|e)d	-	abbd	abbd	bb
-a(b*|c|e)d	-	acd	acd	c
-a(b*|c|e)d	-	ad	ad	@d
-a(b?)c		-	abc	abc	b
-a(b?)c		-	ac	ac	@c
-a(b+)c		-	abc	abc	b
-a(b+)c		-	abbbc	abbbc	bbb
-a(b*)c		-	ac	ac	@c
-(a|ab)(bc([de]+)f|cde)	-	abcdef	abcdef	a,bcdef,de
-# the regression tester only asks for 9 subexpressions
-a(b)(c)(d)(e)(f)(g)(h)(i)(j)k	-	abcdefghijk	abcdefghijk	b,c,d,e,f,g,h,i,j
-a(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)l	-	abcdefghijkl	abcdefghijkl	b,c,d,e,f,g,h,i,j,k
-a([bc]?)c	-	abc	abc	b
-a([bc]?)c	-	ac	ac	@c
-a([bc]+)c	-	abc	abc	b
-a([bc]+)c	-	abcc	abcc	bc
-a([bc]+)bc	-	abcbc	abcbc	bc
-a(bb+|b)b	-	abb	abb	b
-a(bbb+|bb+|b)b	-	abb	abb	b
-a(bbb+|bb+|b)b	-	abbb	abbb	bb
-a(bbb+|bb+|b)bb	-	abbb	abbb	b
-(.*).*		-	abcdef	abcdef	abcdef
-(a*)*		-	bc	@b	@b
-
-# do we get the right subexpression when it is used more than once?
-a(b|c)*d	-	ad	ad	-
-a(b|c)*d	-	abcd	abcd	c
-a(b|c)+d	-	abd	abd	b
-a(b|c)+d	-	abcd	abcd	c
-a(b|c?)+d	-	ad	ad	@d
-a(b|c?)+d	-	abcd	abcd	@d
-a(b|c){0,0}d	-	ad	ad	-
-a(b|c){0,1}d	-	ad	ad	-
-a(b|c){0,1}d	-	abd	abd	b
-a(b|c){0,2}d	-	ad	ad	-
-a(b|c){0,2}d	-	abcd	abcd	c
-a(b|c){0,}d	-	ad	ad	-
-a(b|c){0,}d	-	abcd	abcd	c
-a(b|c){1,1}d	-	abd	abd	b
-a(b|c){1,1}d	-	acd	acd	c
-a(b|c){1,2}d	-	abd	abd	b
-a(b|c){1,2}d	-	abcd	abcd	c
-a(b|c){1,}d	-	abd	abd	b
-a(b|c){1,}d	-	abcd	abcd	c
-a(b|c){2,2}d	-	acbd	acbd	b
-a(b|c){2,2}d	-	abcd	abcd	c
-a(b|c){2,4}d	-	abcd	abcd	c
-a(b|c){2,4}d	-	abcbd	abcbd	b
-a(b|c){2,4}d	-	abcbcd	abcbcd	c
-a(b|c){2,}d	-	abcd	abcd	c
-a(b|c){2,}d	-	abcbd	abcbd	b
-a(b+|((c)*))+d	-	abd	abd	@d,@d,-
-a(b+|((c)*))+d	-	abcd	abcd	@d,@d,-
-
-# check out the STARTEND option
-[abc]		&#	a(b)c	b
-[abc]		&#	a(d)c
-[abc]		&#	a(bc)d	b
-[abc]		&#	a(dc)d	c
-.		&#	a()c
-b.*c		&#	b(bc)c	bc
-b.*		&#	b(bc)c	bc
-.*c		&#	b(bc)c	bc
-
-# plain strings, with the NOSPEC flag
-abc		m	abc	abc
-abc		m	xabcy	abc
-abc		m	xyz
-a*b		m	aba*b	a*b
-a*b		m	ab
-""		mC	EMPTY
-
-# cases involving NULs
-aZb		&	a	a
-aZb		&p	a
-aZb		&p#	(aZb)	aZb
-aZ*b		&p#	(ab)	ab
-a.b		&#	(aZb)	aZb
-a.*		&#	(aZb)c	aZb
-
-# word boundaries (ick)
-[[:<:]]a	&	a	a
-[[:<:]]a	&	ba
-[[:<:]]a	&	-a	a
-a[[:>:]]	&	a	a
-a[[:>:]]	&	ab
-a[[:>:]]	&	a-	a
-[[:<:]]a.c[[:>:]]	&	axcd-dayc-dazce-abc	abc
-[[:<:]]a.c[[:>:]]	&	axcd-dayc-dazce-abc-q	abc
-[[:<:]]a.c[[:>:]]	&	axc-dayc-dazce-abc	axc
-[[:<:]]b.c[[:>:]]	&	a_bxc-byc_d-bzc-q	bzc
-[[:<:]].x..[[:>:]]	&	y_xa_-_xb_y-_xc_-axdc	_xc_
-[[:<:]]a_b[[:>:]]	&	x_a_b
-
-# past problems, and suspected problems
-(A[1])|(A[2])|(A[3])|(A[4])|(A[5])|(A[6])|(A[7])|(A[8])|(A[9])|(A[A])	-	A1	A1
-abcdefghijklmnop	i	abcdefghijklmnop	abcdefghijklmnop
-abcdefghijklmnopqrstuv	i	abcdefghijklmnopqrstuv	abcdefghijklmnopqrstuv
-(ALAK)|(ALT[AB])|(CC[123]1)|(CM[123]1)|(GAMC)|(LC[23][EO ])|(SEM[1234])|(SL[ES][12])|(SLWW)|(SLF )|(SLDT)|(VWH[12])|(WH[34][EW])|(WP1[ESN])	-	CC11	CC11
-CC[13]1|a{21}[23][EO][123][Es][12]a{15}aa[34][EW]aaaaaaa[X]a	-	CC11	CC11
-Char \([a-z0-9_]*\)\[.*	b	Char xyz[k	Char xyz[k	xyz
-a?b	-	ab	ab
--\{0,1\}[0-9]*$	b	-5	-5
+const char *test_array[] =
+{
+  "# regular expression test set",
+  "# Lines are at least three fields, separated by one or more tabs.  \"\" stands",
+  "# for an empty field.  First field is an RE.  Second field is flags.  If",
+  "# C flag given, regcomp() is expected to fail, and the third field is the",
+  "# error name (minus the leading REG_).",
+  "#",
+  "# Otherwise it is expected to succeed, and the third field is the string to",
+  "# try matching it against.  If there is no fourth field, the match is",
+  "# expected to fail.  If there is a fourth field, it is the substring that",
+  "# the RE is expected to match.  If there is a fifth field, it is a comma-",
+  "# separated list of what the subexpressions should match, with - indicating",
+  "# no match for that one.  In both the fourth and fifth fields, a (sub)field",
+  "# starting with @ indicates that the (sub)expression is expected to match",
+  "# a null string followed by the stuff after the @; this provides a way to",
+  "# test where null strings match.  The character `N' in REs and strings",
+  "# is newline, `S' is space, `T' is tab, `Z' is NUL.",
+  "#",
+  "# The full list of flags:",
+  "#	-	placeholder, does nothing",
+  "#	b	RE is a BRE, not an ERE",
+  "#	&	try it as both an ERE and a BRE",
+  "#	C	regcomp() error expected, third field is error name",
+  "#	i	REG_ICASE",
+  "#	m	(\"mundane\") REG_NOSPEC",
+  "#	s	REG_NOSUB (not really testable)",
+  "#	n	REG_NEWLINE",
+  "#	^	REG_NOTBOL",
+  "#	$	REG_NOTEOL",
+  "#	#	REG_STARTEND (see below)",
+  "#	p	REG_PEND",
+  "#",
+  "# For REG_STARTEND, the start/end offsets are those of the substring",
+  "# enclosed in ().",
+  "",
+  "# basics",
+  "a		&	a	a",
+  "abc		&	abc	abc",
+  "abc|de		-	abc	abc",
+  "a|b|c		-	abc	a",
+  "",
+  "# parentheses and perversions thereof",
+  "a(b)c		-	abc	abc",
+  "a\\(b\\)c		b	abc	abc",
+  "a(		C	EPAREN",
+  "a(		b	a(	a(",
+  "a\\(		-	a(	a(",
+  "a\\(		bC	EPAREN",
+  "a\\(b		bC	EPAREN",
+  "a(b		C	EPAREN",
+  "a(b		b	a(b	a(b",
+  "# gag me with a right parenthesis -- 1003.2 goofed here (my fault, partly)",
+  "a)		-	a)	a)",
+  ")		-	)	)",
+  "# end gagging (in a just world, those *should* give EPAREN)",
+  "a)		b	a)	a)",
+  "a\\)		bC	EPAREN",
+  "\\)		bC	EPAREN",
+  "a()b		-	ab	ab",
+  "a\\(\\)b		b	ab	ab",
+  "",
+  "# anchoring and REG_NEWLINE",
+  "^abc$		&	abc	abc",
+  "a^b		-	a^b",
+  "a^b		b	a^b	a^b",
+  "a$b		-	a$b",
+  "a$b		b	a$b	a$b",
+  "^		&	abc	@abc",
+  "$		&	abc	@",
+  "^$		&	\"\"	@",
+  "$^		-	\"\"	@",
+  "\\($\\)\\(^\\)	b	\"\"	@",
+  "# stop retching, those are legitimate (although disgusting)",
+  "^^		-	\"\"	@",
+  "$$		-	\"\"	@",
+  "b$		&	abNc",
+  "b$		&n	abNc	b",
+  "^b$		&	aNbNc",
+  "^b$		&n	aNbNc	b",
+  "^$		&n	aNNb	@Nb",
+  "^$		n	abc",
+  "^$		n	abcN	@",
+  "$^		n	aNNb	@Nb",
+  "\\($\\)\\(^\\)	bn	aNNb	@Nb",
+  "^^		n^	aNNb	@Nb",
+  "$$		n	aNNb	@NN",
+  "^a		^	a",
+  "a$		$	a",
+  "^a		^n	aNb",
+  "^b		^n	aNb	b",
+  "a$		$n	bNa",
+  "b$		$n	bNa	b",
+  "a*(^b$)c*	-	b	b",
+  "a*\\(^b$\\)c*	b	b	b",
+  "",
+  "# certain syntax errors and non-errors",
+  "|		C	EMPTY",
+  "|		b	|	|",
+  "*		C	BADRPT",
+  "*		b	*	*",
+  "+		C	BADRPT",
+  "?		C	BADRPT",
+  "\"\"		&C	EMPTY",
+  "()		-	abc	@abc",
+  "\\(\\)		b	abc	@abc",
+  "a||b		C	EMPTY",
+  "|ab		C	EMPTY",
+  "ab|		C	EMPTY",
+  "(|a)b		C	EMPTY",
+  "(a|)b		C	EMPTY",
+  "(*a)		C	BADRPT",
+  "(+a)		C	BADRPT",
+  "(?a)		C	BADRPT",
+  "({1}a)		C	BADRPT",
+  "\\(\\{1\\}a\\)	bC	BADRPT",
+  "(a|*b)		C	BADRPT",
+  "(a|+b)		C	BADRPT",
+  "(a|?b)		C	BADRPT",
+  "(a|{1}b)	C	BADRPT",
+  "^*		C	BADRPT",
+  "^*		b	*	*",
+  "^+		C	BADRPT",
+  "^?		C	BADRPT",
+  "^{1}		C	BADRPT",
+  "^\\{1\\}		bC	BADRPT",
+  "",
+  "# metacharacters, backslashes",
+  "a.c		&	abc	abc",
+  "a[bc]d		&	abd	abd",
+  "a\\*c		&	a*c	a*c",
+  "a\\\\b		&	a\\b	a\\b",
+  "a\\\\\\*b		&	a\\*b	a\\*b",
+  "a\\bc		&	abc	abc",
+  "a\\		&C	EESCAPE",
+  "a\\\\bc		&	a\\bc	a\\bc",
+  "\\{		bC	BADRPT",
+  "a\\[b		&	a[b	a[b",
+  "a[b		&C	EBRACK",
+  "# trailing $ is a peculiar special case for the BRE code",
+  "a$		&	a	a",
+  "a$		&	a$",
+  "a\\$		&	a",
+  "a\\$		&	a$	a$",
+  "a\\\\$		&	a",
+  "a\\\\$		&	a$",
+  "a\\\\$		&	a\\$",
+  "a\\\\$		&	a\\	a\\",
+  "",
+  "# back references, ugh",
+  "a\\(b\\)\\2c	bC	ESUBREG",
+  "a\\(b\\1\\)c	bC	ESUBREG",
+  "a\\(b*\\)c\\1d	b	abbcbbd	abbcbbd	bb",
+  "a\\(b*\\)c\\1d	b	abbcbd",
+  "a\\(b*\\)c\\1d	b	abbcbbbd",
+  "^\\(.\\)\\1	b	abc",
+  "a\\([bc]\\)\\1d	b	abcdabbd	abbd	b",
+  "a\\(\\([bc]\\)\\2\\)*d	b	abbccd	abbccd",
+  "a\\(\\([bc]\\)\\2\\)*d	b	abbcbd",
+  "# actually, this next one probably ought to fail, but the spec is unclear",
+  "a\\(\\(b\\)*\\2\\)*d		b	abbbd	abbbd",
+  "# here is a case that no NFA implementation does right",
+  "\\(ab*\\)[ab]*\\1	b	ababaaa	ababaaa	a",
+  "# check out normal matching in the presence of back refs",
+  "\\(a\\)\\1bcd	b	aabcd	aabcd",
+  "\\(a\\)\\1bc*d	b	aabcd	aabcd",
+  "\\(a\\)\\1bc*d	b	aabd	aabd",
+  "\\(a\\)\\1bc*d	b	aabcccd	aabcccd",
+  "\\(a\\)\\1bc*[ce]d	b	aabcccd	aabcccd",
+  "^\\(a\\)\\1b\\(c\\)*cd$	b	aabcccd	aabcccd",
+  "",
+  "# ordinary repetitions",
+  "ab*c		&	abc	abc",
+  "ab+c		-	abc	abc",
+  "ab?c		-	abc	abc",
+  "a\\(*\\)b		b	a*b	a*b",
+  "a\\(**\\)b	b	ab	ab",
+  "a\\(***\\)b	bC	BADRPT",
+  "*a		b	*a	*a",
+  "**a		b	a	a",
+  "***a		bC	BADRPT",
+  "",
+  "# the dreaded bounded repetitions",
+  "{		&	{	{",
+  "{abc		&	{abc	{abc",
+  "{1		C	BADRPT",
+  "{1}		C	BADRPT",
+  "a{b		&	a{b	a{b",
+  "a{1}b		-	ab	ab",
+  "a\\{1\\}b		b	ab	ab",
+  "a{1,}b		-	ab	ab",
+  "a\\{1,\\}b	b	ab	ab",
+  "a{1,2}b		-	aab	aab",
+  "a\\{1,2\\}b	b	aab	aab",
+  "a{1		C	EBRACE",
+  "a\\{1		bC	EBRACE",
+  "a{1a		C	EBRACE",
+  "a\\{1a		bC	EBRACE",
+  "a{1a}		C	BADBR",
+  "a\\{1a\\}		bC	BADBR",
+  "a{,2}		-	a{,2}	a{,2}",
+  "a\\{,2\\}		bC	BADBR",
+  "a{,}		-	a{,}	a{,}",
+  "a\\{,\\}		bC	BADBR",
+  "a{1,x}		C	BADBR",
+  "a\\{1,x\\}	bC	BADBR",
+  "a{1,x		C	EBRACE",
+  "a\\{1,x		bC	EBRACE",
+  "a{300}		C	BADBR",
+  "a\\{300\\}	bC	BADBR",
+  "a{1,0}		C	BADBR",
+  "a\\{1,0\\}	bC	BADBR",
+  "ab{0,0}c	-	abcac	ac",
+  "ab\\{0,0\\}c	b	abcac	ac",
+  "ab{0,1}c	-	abcac	abc",
+  "ab\\{0,1\\}c	b	abcac	abc",
+  "ab{0,3}c	-	abbcac	abbc",
+  "ab\\{0,3\\}c	b	abbcac	abbc",
+  "ab{1,1}c	-	acabc	abc",
+  "ab\\{1,1\\}c	b	acabc	abc",
+  "ab{1,3}c	-	acabc	abc",
+  "ab\\{1,3\\}c	b	acabc	abc",
+  "ab{2,2}c	-	abcabbc	abbc",
+  "ab\\{2,2\\}c	b	abcabbc	abbc",
+  "ab{2,4}c	-	abcabbc	abbc",
+  "ab\\{2,4\\}c	b	abcabbc	abbc",
+  "((a{1,10}){1,10}){1,10}	-	a	a	a,a",
+  "",
+  "# multiple repetitions",
+  "a**		&C	BADRPT",
+  "a++		C	BADRPT",
+  "a??		C	BADRPT",
+  "a*+		C	BADRPT",
+  "a*?		C	BADRPT",
+  "a+*		C	BADRPT",
+  "a+?		C	BADRPT",
+  "a?*		C	BADRPT",
+  "a?+		C	BADRPT",
+  "a{1}{1}		C	BADRPT",
+  "a*{1}		C	BADRPT",
+  "a+{1}		C	BADRPT",
+  "a?{1}		C	BADRPT",
+  "a{1}*		C	BADRPT",
+  "a{1}+		C	BADRPT",
+  "a{1}?		C	BADRPT",
+  "a*{b}		-	a{b}	a{b}",
+  "a\\{1\\}\\{1\\}	bC	BADRPT",
+  "a*\\{1\\}		bC	BADRPT",
+  "a\\{1\\}*		bC	BADRPT",
+  "",
+  "# brackets, and numerous perversions thereof",
+  "a[b]c		&	abc	abc",
+  "a[ab]c		&	abc	abc",
+  "a[^ab]c		&	adc	adc",
+  "a[]b]c		&	a]c	a]c",
+  "a[[b]c		&	a[c	a[c",
+  "a[-b]c		&	a-c	a-c",
+  "a[^]b]c		&	adc	adc",
+  "a[^-b]c		&	adc	adc",
+  "a[b-]c		&	a-c	a-c",
+  "a[b		&C	EBRACK",
+  "a[]		&C	EBRACK",
+  "a[1-3]c		&	a2c	a2c",
+  "a[3-1]c		&C	ERANGE",
+  "a[1-3-5]c	&C	ERANGE",
+  "a[[.-.]--]c	&	a-c	a-c",
+  "a[1-		&C	ERANGE",
+  "a[[.		&C	EBRACK",
+  "a[[.x		&C	EBRACK",
+  "a[[.x.		&C	EBRACK",
+  "a[[.x.]		&C	EBRACK",
+  "a[[.x.]]	&	ax	ax",
+  "a[[.x,.]]	&C	ECOLLATE",
+  "a[[.one.]]b	&	a1b	a1b",
+  "a[[.notdef.]]b	&C	ECOLLATE",
+  "a[[.].]]b	&	a]b	a]b",
+  "a[[:notdef:]]c	&C	ECTYPE",
+  "a[[:		&C	EBRACK",
+  "a[[:alpha	&C	EBRACK",
+  "a[[:alpha:]	&C	EBRACK",
+  "a[[:alpha,:]	&C	ECTYPE",
+  "a[[:]:]]b	&C	ECTYPE",
+  "a[[:-:]]b	&C	ECTYPE",
+  "a[[:alph:]]	&C	ECTYPE",
+  "a[[:alphabet:]]	&C	ECTYPE",
+  "[[:alnum:]]+	-	-%@a5X-	a5X",
+  "[[:alpha:]]+	-	-%@aX0-	aX",
+  "# ctype_latin1 does not tag '\\t' as blank, so we will match only two spaces.",
+  "# See: Bug #55427 REGEXP does not recognize '\\t' as [:blank:]",
+  "#[[:blank:]]+	-	aSSTb	SST",
+  "[[:blank:]]+	-	aSSTb	SS",
+  "[[:cntrl:]]+	-	aNTb	NT",
+  "[[:digit:]]+	-	a019b	019",
+  "[[:graph:]]+	-	Sa%bS	a%b",
+  "[[:lower:]]+	-	AabC	ab",
+  "[[:print:]]+	-	NaSbN	aSb",
+  "[[:punct:]]+	-	S%-&T	%-&",
+  "[[:space:]]+	-	aSNTb	SNT",
+  "[[:upper:]]+	-	aBCd	BC",
+  "[[:xdigit:]]+	-	p0f3Cq	0f3C",
+  "a[[=b=]]c	&	abc	abc",
+  "a[[=		&C	EBRACK",
+  "a[[=b		&C	EBRACK",
+  "a[[=b=		&C	EBRACK",
+  "a[[=b=]		&C	EBRACK",
+  "a[[=b,=]]	&C	ECOLLATE",
+  "a[[=one=]]b	&	a1b	a1b",
+  "",
+  "# complexities",
+  "a(((b)))c	-	abc	abc",
+  "a(b|(c))d	-	abd	abd",
+  "a(b*|c)d	-	abbd	abbd",
+  "# just gotta have one DFA-buster, of course",
+  "a[ab]{20}	-	aaaaabaaaabaaaabaaaab	aaaaabaaaabaaaabaaaab",
+  "# and an inline expansion in case somebody gets tricky",
+  "a[ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab]	-	aaaaabaaaabaaaabaaaab	aaaaabaaaabaaaabaaaab",
+  "# and in case somebody just slips in an NFA...",
+  "a[ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab][ab](wee|week)(knights|night)	-	aaaaabaaaabaaaabaaaabweeknights	aaaaabaaaabaaaabaaaabweeknights",
+  "# fish for anomalies as the number of states passes 32",
+  "12345678901234567890123456789	-	a12345678901234567890123456789b	12345678901234567890123456789",
+  "123456789012345678901234567890	-	a123456789012345678901234567890b	123456789012345678901234567890",
+  "1234567890123456789012345678901	-	a1234567890123456789012345678901b	1234567890123456789012345678901",
+  "12345678901234567890123456789012	-	a12345678901234567890123456789012b	12345678901234567890123456789012",
+  "123456789012345678901234567890123	-	a123456789012345678901234567890123b	123456789012345678901234567890123",
+  "# and one really big one, beyond any plausible word width",
+  "1234567890123456789012345678901234567890123456789012345678901234567890	-	a1234567890123456789012345678901234567890123456789012345678901234567890b	1234567890123456789012345678901234567890123456789012345678901234567890",
+  "# fish for problems as brackets go past 8",
+  "[ab][cd][ef][gh][ij][kl][mn]	-	xacegikmoq	acegikm",
+  "[ab][cd][ef][gh][ij][kl][mn][op]	-	xacegikmoq	acegikmo",
+  "[ab][cd][ef][gh][ij][kl][mn][op][qr]	-	xacegikmoqy	acegikmoq",
+  "[ab][cd][ef][gh][ij][kl][mn][op][q]	-	xacegikmoqy	acegikmoq",
+  "",
+  "# subtleties of matching",
+  "abc		&	xabcy	abc",
+  "a\\(b\\)?c\\1d	b	acd",
+  "aBc		i	Abc	Abc",
+  "a[Bc]*d		i	abBCcd	abBCcd",
+  "0[[:upper:]]1	&i	0a1	0a1",
+  "0[[:lower:]]1	&i	0A1	0A1",
+  "a[^b]c		&i	abc",
+  "a[^b]c		&i	aBc",
+  "a[^b]c		&i	adc	adc",
+  "[a]b[c]		-	abc	abc",
+  "[a]b[a]		-	aba	aba",
+  "[abc]b[abc]	-	abc	abc",
+  "[abc]b[abd]	-	abd	abd",
+  "a(b?c)+d	-	accd	accd",
+  "(wee|week)(knights|night)	-	weeknights	weeknights",
+  "(we|wee|week|frob)(knights|night|day)	-	weeknights	weeknights",
+  "a[bc]d		-	xyzaaabcaababdacd	abd",
+  "a[ab]c		-	aaabc	abc",
+  "abc		s	abc	abc",
+  "a*		&	b	@b",
+  "",
+  "# Let's have some fun -- try to match a C comment.",
+  "# first the obvious, which looks okay at first glance...",
+  "/\\*.*\\*/	-	/*x*/	/*x*/",
+  "# but...",
+  "/\\*.*\\*/	-	/*x*/y/*z*/	/*x*/y/*z*/",
+  "# okay, we must not match */ inside; try to do that...",
+  "/\\*([^*]|\\*[^/])*\\*/	-	/*x*/	/*x*/",
+  "/\\*([^*]|\\*[^/])*\\*/	-	/*x*/y/*z*/	/*x*/",
+  "# but...",
+  "/\\*([^*]|\\*[^/])*\\*/	-	/*x**/y/*z*/	/*x**/y/*z*/",
+  "# and a still fancier version, which does it right (I think)...",
+  "/\\*([^*]|\\*+[^*/])*\\*+/	-	/*x*/	/*x*/",
+  "/\\*([^*]|\\*+[^*/])*\\*+/	-	/*x*/y/*z*/	/*x*/",
+  "/\\*([^*]|\\*+[^*/])*\\*+/	-	/*x**/y/*z*/	/*x**/",
+  "/\\*([^*]|\\*+[^*/])*\\*+/	-	/*x****/y/*z*/	/*x****/",
+  "/\\*([^*]|\\*+[^*/])*\\*+/	-	/*x**x*/y/*z*/	/*x**x*/",
+  "/\\*([^*]|\\*+[^*/])*\\*+/	-	/*x***x/y/*z*/	/*x***x/y/*z*/",
+  "",
+  "# subexpressions",
+  "a(b)(c)d	-	abcd	abcd	b,c",
+  "a(((b)))c	-	abc	abc	b,b,b",
+  "a(b|(c))d	-	abd	abd	b,-",
+  "a(b*|c|e)d	-	abbd	abbd	bb",
+  "a(b*|c|e)d	-	acd	acd	c",
+  "a(b*|c|e)d	-	ad	ad	@d",
+  "a(b?)c		-	abc	abc	b",
+  "a(b?)c		-	ac	ac	@c",
+  "a(b+)c		-	abc	abc	b",
+  "a(b+)c		-	abbbc	abbbc	bbb",
+  "a(b*)c		-	ac	ac	@c",
+  "(a|ab)(bc([de]+)f|cde)	-	abcdef	abcdef	a,bcdef,de",
+  "# the regression tester only asks for 9 subexpressions",
+  "a(b)(c)(d)(e)(f)(g)(h)(i)(j)k	-	abcdefghijk	abcdefghijk	b,c,d,e,f,g,h,i,j",
+  "a(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)l	-	abcdefghijkl	abcdefghijkl	b,c,d,e,f,g,h,i,j,k",
+  "a([bc]?)c	-	abc	abc	b",
+  "a([bc]?)c	-	ac	ac	@c",
+  "a([bc]+)c	-	abc	abc	b",
+  "a([bc]+)c	-	abcc	abcc	bc",
+  "a([bc]+)bc	-	abcbc	abcbc	bc",
+  "a(bb+|b)b	-	abb	abb	b",
+  "a(bbb+|bb+|b)b	-	abb	abb	b",
+  "a(bbb+|bb+|b)b	-	abbb	abbb	bb",
+  "a(bbb+|bb+|b)bb	-	abbb	abbb	b",
+  "(.*).*		-	abcdef	abcdef	abcdef",
+  "(a*)*		-	bc	@b	@b",
+  "",
+  "# do we get the right subexpression when it is used more than once?",
+  "a(b|c)*d	-	ad	ad	-",
+  "a(b|c)*d	-	abcd	abcd	c",
+  "a(b|c)+d	-	abd	abd	b",
+  "a(b|c)+d	-	abcd	abcd	c",
+  "a(b|c?)+d	-	ad	ad	@d",
+  "a(b|c?)+d	-	abcd	abcd	@d",
+  "a(b|c){0,0}d	-	ad	ad	-",
+  "a(b|c){0,1}d	-	ad	ad	-",
+  "a(b|c){0,1}d	-	abd	abd	b",
+  "a(b|c){0,2}d	-	ad	ad	-",
+  "a(b|c){0,2}d	-	abcd	abcd	c",
+  "a(b|c){0,}d	-	ad	ad	-",
+  "a(b|c){0,}d	-	abcd	abcd	c",
+  "a(b|c){1,1}d	-	abd	abd	b",
+  "a(b|c){1,1}d	-	acd	acd	c",
+  "a(b|c){1,2}d	-	abd	abd	b",
+  "a(b|c){1,2}d	-	abcd	abcd	c",
+  "a(b|c){1,}d	-	abd	abd	b",
+  "a(b|c){1,}d	-	abcd	abcd	c",
+  "a(b|c){2,2}d	-	acbd	acbd	b",
+  "a(b|c){2,2}d	-	abcd	abcd	c",
+  "a(b|c){2,4}d	-	abcd	abcd	c",
+  "a(b|c){2,4}d	-	abcbd	abcbd	b",
+  "a(b|c){2,4}d	-	abcbcd	abcbcd	c",
+  "a(b|c){2,}d	-	abcd	abcd	c",
+  "a(b|c){2,}d	-	abcbd	abcbd	b",
+  "a(b+|((c)*))+d	-	abd	abd	@d,@d,-",
+  "a(b+|((c)*))+d	-	abcd	abcd	@d,@d,-",
+  "",
+  "# check out the STARTEND option",
+  "[abc]		&#	a(b)c	b",
+  "[abc]		&#	a(d)c",
+  "[abc]		&#	a(bc)d	b",
+  "[abc]		&#	a(dc)d	c",
+  ".		&#	a()c",
+  "b.*c		&#	b(bc)c	bc",
+  "b.*		&#	b(bc)c	bc",
+  ".*c		&#	b(bc)c	bc",
+  "",
+  "# plain strings, with the NOSPEC flag",
+  "abc		m	abc	abc",
+  "abc		m	xabcy	abc",
+  "abc		m	xyz",
+  "a*b		m	aba*b	a*b",
+  "a*b		m	ab",
+  "\"\"		mC	EMPTY",
+  "",
+  "# cases involving NULs",
+  "aZb		&	a	a",
+  "aZb		&p	a",
+  "aZb		&p#	(aZb)	aZb",
+  "aZ*b		&p#	(ab)	ab",
+  "a.b		&#	(aZb)	aZb",
+  "a.*		&#	(aZb)c	aZb",
+  "",
+  "# word boundaries (ick)",
+  "[[:<:]]a	&	a	a",
+  "[[:<:]]a	&	ba",
+  "[[:<:]]a	&	-a	a",
+  "a[[:>:]]	&	a	a",
+  "a[[:>:]]	&	ab",
+  "a[[:>:]]	&	a-	a",
+  "[[:<:]]a.c[[:>:]]	&	axcd-dayc-dazce-abc	abc",
+  "[[:<:]]a.c[[:>:]]	&	axcd-dayc-dazce-abc-q	abc",
+  "[[:<:]]a.c[[:>:]]	&	axc-dayc-dazce-abc	axc",
+  "[[:<:]]b.c[[:>:]]	&	a_bxc-byc_d-bzc-q	bzc",
+  "[[:<:]].x..[[:>:]]	&	y_xa_-_xb_y-_xc_-axdc	_xc_",
+  "[[:<:]]a_b[[:>:]]	&	x_a_b",
+  "",
+  "# past problems, and suspected problems",
+  "(A[1])|(A[2])|(A[3])|(A[4])|(A[5])|(A[6])|(A[7])|(A[8])|(A[9])|(A[A])	-	A1	A1",
+  "abcdefghijklmnop	i	abcdefghijklmnop	abcdefghijklmnop",
+  "abcdefghijklmnopqrstuv	i	abcdefghijklmnopqrstuv	abcdefghijklmnopqrstuv",
+  "(ALAK)|(ALT[AB])|(CC[123]1)|(CM[123]1)|(GAMC)|(LC[23][EO ])|(SEM[1234])|(SL[ES][12])|(SLWW)|(SLF )|(SLDT)|(VWH[12])|(WH[34][EW])|(WP1[ESN])	-	CC11	CC11",
+  "CC[13]1|a{21}[23][EO][123][Es][12]a{15}aa[34][EW]aaaaaaa[X]a	-	CC11	CC11",
+  "Char \\([a-z0-9_]*\\)\\[.*	b	Char xyz[k	Char xyz[k	xyz",
+  "a?b	-	ab	ab",
+  "-\\{0,1\\}[0-9]*$	b	-5	-5",
+  "",
+  NULL
+};

=== modified file 'scripts/mysql_system_tables.sql'
--- a/scripts/mysql_system_tables.sql	2011-03-09 21:28:05 +0000
+++ b/scripts/mysql_system_tables.sql	2011-03-16 08:58:26 +0000
@@ -28,7 +28,7 @@ set @had_db_table= @@warning_count != 0;
 CREATE TABLE IF NOT EXISTS host (  Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Host privileges;  Merged with database privileges';
 
 
-CREATE TABLE IF NOT EXISTS user (   Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Reload_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Shutdown_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Process_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Event_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tablespace_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL, ssl_cipher BLOB NOT NULL, x509_issuer BLOB NOT NULL, x509_subject BLOB NOT NULL, max_questions int(11) unsigned DEFAULT 0  NOT NULL, max_updates int(11) unsigned DEFAULT 0  NOT NULL, max_connections int(11) unsigned DEFAULT 0  NOT NULL, max_user_connections int(11) unsigned DEFAULT 0  NOT NULL, plugin char(60) DEFAULT '' NOT NULL, authentication_string TEXT NOT NULL, PRIMARY KEY Host (Host,User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
+CREATE TABLE IF NOT EXISTS user (   Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Reload_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Shutdown_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Process_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Event_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tablespace_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL, ssl_cipher BLOB NOT NULL, x509_issuer BLOB NOT NULL, x509_subject BLOB NOT NULL, max_questions int(11) unsigned DEFAULT 0  NOT NULL, max_updates int(11) unsigned DEFAULT 0  NOT NULL, max_connections int(11) unsigned DEFAULT 0  NOT NULL, max_user_connections int(11) unsigned DEFAULT 0  NOT NULL, plugin char(64) DEFAULT '' NOT NULL, authentication_string TEXT NOT NULL, PRIMARY KEY Host (Host,User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
 
 -- Remember for later if user table already existed
 set @had_user_table= @@warning_count != 0;

=== modified file 'scripts/mysql_system_tables_fix.sql'
--- a/scripts/mysql_system_tables_fix.sql	2011-02-09 08:12:43 +0000
+++ b/scripts/mysql_system_tables_fix.sql	2011-03-14 18:43:19 +0000
@@ -642,8 +642,8 @@ DROP PREPARE stmt;
 
 drop procedure mysql.die;
 
-ALTER TABLE user ADD plugin char(60) DEFAULT '' NOT NULL,  ADD authentication_string TEXT NOT NULL;
-ALTER TABLE user MODIFY plugin char(60) DEFAULT '' NOT NULL;
+ALTER TABLE user ADD plugin char(64) DEFAULT '' NOT NULL,  ADD authentication_string TEXT NOT NULL;
+ALTER TABLE user MODIFY plugin char(64) DEFAULT '' NOT NULL;
 
 -- Need to pre-fill mysql.proxies_priv with access for root even when upgrading from
 -- older versions

=== modified file 'sql/binlog.cc'
--- a/sql/binlog.cc	2011-03-10 10:08:09 +0000
+++ b/sql/binlog.cc	2011-03-14 17:55:26 +0000
@@ -3603,7 +3603,8 @@ bool MYSQL_BIN_LOG::write(Log_event *eve
     if ((thd && !(thd->variables.option_bits & OPTION_BIN_LOG)) ||
 	(thd->lex->sql_command != SQLCOM_ROLLBACK_TO_SAVEPOINT &&
          thd->lex->sql_command != SQLCOM_SAVEPOINT &&
-         !binlog_filter->db_ok(local_db)))
+         (!event_info->is_no_filter_event() && 
+          !binlog_filter->db_ok(local_db))))
       DBUG_RETURN(0);
 #endif /* HAVE_REPLICATION */
 

=== modified file 'sql/item.cc'
--- a/sql/item.cc	2011-03-09 20:54:55 +0000
+++ b/sql/item.cc	2011-03-15 13:03:22 +0000
@@ -2976,6 +2976,16 @@ bool Item_param::set_longdata(const char
     (here), and first have to concatenate all pieces together,
     write query to the binary log and only then perform conversion.
   */
+  if (str_value.length() + length > max_long_data_size)
+  {
+    my_message(ER_UNKNOWN_ERROR,
+               "Parameter of prepared statement which is set through "
+               "mysql_send_long_data() is longer than "
+               "'max_long_data_size' bytes",
+               MYF(0));
+    DBUG_RETURN(true);
+  }
+
   if (str_value.append(str, length, &my_charset_bin))
     DBUG_RETURN(TRUE);
   state= LONG_DATA_VALUE;

=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc	2011-03-09 20:54:55 +0000
+++ b/sql/log_event.cc	2011-03-14 17:09:16 +0000
@@ -10409,6 +10409,13 @@ int
 Incident_log_event::do_apply_event(Relay_log_info const *rli)
 {
   DBUG_ENTER("Incident_log_event::do_apply_event");
+
+  if (ignored_error_code(ER_SLAVE_INCIDENT))
+  {
+    DBUG_PRINT("info", ("Ignoring Incident"));
+    DBUG_RETURN(0);
+  }
+   
   rli->report(ERROR_LEVEL, ER_SLAVE_INCIDENT,
               ER(ER_SLAVE_INCIDENT),
               description(),

=== modified file 'sql/log_event.h'
--- a/sql/log_event.h	2011-03-09 20:54:55 +0000
+++ b/sql/log_event.h	2011-03-14 17:55:26 +0000
@@ -510,6 +510,16 @@ struct sql_ex_info
 #define LOG_EVENT_IGNORABLE_F 0x80
 
 /**
+   @def LOG_EVENT_NO_FILTER_F
+
+   Events with this flag are not filtered (e.g. on the current
+   database) and are always written to the binary log regardless of
+   filters.
+*/
+#define LOG_EVENT_NO_FILTER_F 0x100
+
+
+/**
   @def OPTIONS_WRITTEN_TO_BIN_LOG
 
   OPTIONS_WRITTEN_TO_BIN_LOG are the bits of thd->options which must
@@ -1130,6 +1140,7 @@ public:
   bool is_artificial_event() const { return flags & LOG_EVENT_ARTIFICIAL_F; }
   bool is_relay_log_event() const { return flags & LOG_EVENT_RELAY_LOG_F; }
   bool is_ignorable_event() const { return flags & LOG_EVENT_IGNORABLE_F; }
+  bool is_no_filter_event() const { return flags & LOG_EVENT_NO_FILTER_F; }
   inline bool use_trans_cache() const
   { 
     return (cache_type == Log_event::EVENT_TRANSACTIONAL_CACHE);
@@ -3999,7 +4010,7 @@ class Incident_log_event : public Log_ev
 public:
 #ifdef MYSQL_SERVER
   Incident_log_event(THD *thd_arg, Incident incident)
-    : Log_event(thd_arg, 0, FALSE), m_incident(incident)
+    : Log_event(thd_arg, LOG_EVENT_NO_FILTER_F, FALSE), m_incident(incident)
   {
     DBUG_ENTER("Incident_log_event::Incident_log_event");
     DBUG_PRINT("enter", ("m_incident: %d", m_incident));
@@ -4010,7 +4021,7 @@ public:
   }
 
   Incident_log_event(THD *thd_arg, Incident incident, LEX_STRING const msg)
-    : Log_event(thd_arg, 0, FALSE), m_incident(incident)
+    : Log_event(thd_arg, LOG_EVENT_NO_FILTER_F, FALSE), m_incident(incident)
   {
     DBUG_ENTER("Incident_log_event::Incident_log_event");
     DBUG_PRINT("enter", ("m_incident: %d", m_incident));

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2011-03-10 15:04:18 +0000
+++ b/sql/mysqld.cc	2011-03-16 08:58:26 +0000
@@ -324,6 +324,7 @@ static PSI_rwlock_key key_rwlock_openssl
 
 /* the default log output is log tables */
 static bool lower_case_table_names_used= 0;
+static bool max_long_data_size_used= false;
 static bool volatile select_thread_in_use, signal_thread_in_use;
 /* See Bug#56666 and Bug#56760 */;
 volatile bool ready_to_exit;
@@ -482,6 +483,11 @@ ulong specialflag=0;
 ulong binlog_cache_use= 0, binlog_cache_disk_use= 0;
 ulong binlog_stmt_cache_use= 0, binlog_stmt_cache_disk_use= 0;
 ulong max_connections, max_connect_errors;
+/*
+  Maximum length of parameter value which can be set through
+  mysql_send_long_data() call.
+*/
+ulong max_long_data_size;
 /**
   Limit of the total number of prepared statements in the server.
   Is necessary to protect the server against out-of-memory attacks.
@@ -4929,10 +4935,15 @@ int mysqld_main(int argc, char **argv)
 #if defined(__WIN__) && !defined(EMBEDDED_LIBRARY)
 int mysql_service(void *p)
 {
+  if (my_thread_init())
+    return 1;
+  
   if (use_opt_args)
     win_main(opt_argc, opt_argv);
   else
     win_main(Service.my_argc, Service.my_argv);
+
+  my_thread_end();
   return 0;
 }
 
@@ -7422,6 +7433,10 @@ mysqld_get_one_option(int optid,
     if (argument == NULL) /* no argument */
       log_error_file_ptr= const_cast<char*>("");
     break;
+  case OPT_MAX_LONG_DATA_SIZE:
+    max_long_data_size_used= true;
+    WARN_DEPRECATED(NULL, "--max_long_data_size", "'--max_allowed_packet'");
+    break;
   }
   return 0;
 }
@@ -7648,6 +7663,13 @@ static int get_options(int *argc_ptr, ch
 
   opt_readonly= read_only;
 
+  /*
+    If max_long_data_size is not specified explicitly use
+    value of max_allowed_packet.
+  */
+  if (!max_long_data_size_used)
+    max_long_data_size= global_system_variables.max_allowed_packet;
+
   return 0;
 }
 

=== modified file 'sql/mysqld.h'
--- a/sql/mysqld.h	2011-03-10 15:04:18 +0000
+++ b/sql/mysqld.h	2011-03-16 08:58:26 +0000
@@ -130,6 +130,7 @@ extern char *default_storage_engine;
 extern bool opt_endinfo, using_udf_functions;
 extern my_bool locked_in_memory;
 extern bool opt_using_transactions;
+extern ulong max_long_data_size;
 extern ulong current_pid;
 extern ulong expire_logs_days;
 extern my_bool relay_log_recovery;
@@ -413,7 +414,8 @@ enum options_mysqld
   OPT_UPDATE_LOG,
   OPT_WANT_CORE,
   OPT_ENGINE_CONDITION_PUSHDOWN,
-  OPT_LOG_ERROR
+  OPT_LOG_ERROR,
+  OPT_MAX_LONG_DATA_SIZE
 };
 
 

=== modified file 'sql/rpl_slave.cc'
--- a/sql/rpl_slave.cc	2011-02-14 16:07:38 +0000
+++ b/sql/rpl_slave.cc	2011-03-14 13:55:44 +0000
@@ -4372,7 +4372,7 @@ static int queue_event(Master_info* mi,c
       int debug_cor_pos = rand() % (event_len - BINLOG_CHECKSUM_LEN);
       debug_event_buf_c[debug_cor_pos] =~ debug_event_buf_c[debug_cor_pos];
       DBUG_PRINT("info", ("Corrupt the event at queue_event: byte on position %d", debug_cor_pos));
-      DBUG_SET("-d,corrupt_queue_event");
+      DBUG_SET("");
     }
   );
                                               

=== modified file 'sql/sql_analyse.cc'
--- a/sql/sql_analyse.cc	2011-01-14 09:29:11 +0000
+++ b/sql/sql_analyse.cc	2011-03-14 18:11:41 +0000
@@ -242,7 +242,7 @@ bool test_if_number(NUM_INFO *info, cons
       if (str == end)
       {
 	info->is_float = 1;             // we can't use variable decimals here
-	return 1;
+	DBUG_RETURN(1);
       }
       DBUG_RETURN(0);
     }

=== modified file 'sql/sql_db.cc'
--- a/sql/sql_db.cc	2011-03-09 20:54:55 +0000
+++ b/sql/sql_db.cc	2011-03-15 10:54:06 +0000
@@ -834,12 +834,9 @@ bool mysql_rm_db(THD *thd,char *db,bool 
   }
 
   thd->push_internal_handler(&err_handler);
-  if (thd->killed ||
-      (tables && mysql_rm_table_no_locks(thd, tables, true, false, true, true)))
-  {
-    tables= NULL;
-  }
-  else
+  if (!thd->killed &&
+      !(tables &&
+        mysql_rm_table_no_locks(thd, tables, true, false, true, true)))
   {
     /*
       We temporarily disable the binary log while dropping the objects
@@ -924,7 +921,7 @@ update_binlog:
     thd->server_status|= SERVER_STATUS_DB_DROPPED;
     my_ok(thd, deleted_tables);
   }
-  else if (mysql_bin_log.is_open())
+  else if (mysql_bin_log.is_open() && !silent)
   {
     char *query, *query_pos, *query_end, *query_data_start;
     TABLE_LIST *tbl;
@@ -939,6 +936,16 @@ update_binlog:
     for (tbl= tables; tbl; tbl= tbl->next_local)
     {
       uint tbl_name_len;
+      bool exists;
+
+      // Only write drop table to the binlog for tables that no longer exist.
+      if (check_if_table_exists(thd, tbl, &exists))
+      {
+        error= true;
+        goto exit;
+      }
+      if (exists)
+        continue;
 
       /* 3 for the quotes and the comma*/
       tbl_name_len= strlen(tbl->table_name) + 3;

=== modified file 'sql/sql_prepare.cc'
--- a/sql/sql_prepare.cc	2011-03-09 20:54:55 +0000
+++ b/sql/sql_prepare.cc	2011-03-15 13:03:22 +0000
@@ -2785,6 +2785,7 @@ void mysql_sql_stmt_close(THD *thd)
   }
 }
 
+
 /**
   Handle long data in pieces from client.
 
@@ -2841,16 +2842,25 @@ void mysql_stmt_get_longdata(THD *thd, c
 
   param= stmt->param_array[param_number];
 
+  Diagnostics_area new_stmt_da, *save_stmt_da= thd->stmt_da;
+  Warning_info new_warnning_info(thd->query_id), *save_warinig_info= thd->warning_info;
+
+  thd->stmt_da= &new_stmt_da;
+  thd->warning_info= &new_warnning_info;
+
 #ifndef EMBEDDED_LIBRARY
-  if (param->set_longdata(packet, (ulong) (packet_end - packet)))
+  param->set_longdata(packet, (ulong) (packet_end - packet));
 #else
-  if (param->set_longdata(thd->extra_data, thd->extra_length))
+  param->set_longdata(thd->extra_data, thd->extra_length);
 #endif
+  if (thd->stmt_da->is_error())
   {
     stmt->state= Query_arena::ERROR;
-    stmt->last_errno= ER_OUTOFMEMORY;
-    sprintf(stmt->last_error, ER(ER_OUTOFMEMORY), 0);
+    stmt->last_errno= thd->stmt_da->sql_errno();
+    strncpy(stmt->last_error, thd->stmt_da->message(), MYSQL_ERRMSG_SIZE);
   }
+  thd->stmt_da= save_stmt_da;
+  thd->warning_info= save_warinig_info;
 
   general_log_print(thd, thd->get_command(), NullS);
 
@@ -3390,6 +3400,13 @@ Prepared_statement::execute_loop(String 
   bool error;
   int reprepare_attempt= 0;
 
+  /* Check if we got an error when sending long data */
+  if (state == Query_arena::ERROR)
+  {
+    my_message(last_errno, last_error, MYF(0));
+    return TRUE;
+  }
+
   if (set_parameters(expanded_query, packet, packet_end))
     return TRUE;
 
@@ -3657,12 +3674,6 @@ bool Prepared_statement::execute(String 
 
   status_var_increment(thd->status_var.com_stmt_execute);
 
-  /* Check if we got an error when sending long data */
-  if (state == Query_arena::ERROR)
-  {
-    my_message(last_errno, last_error, MYF(0));
-    return TRUE;
-  }
   if (flags & (uint) IS_IN_USE)
   {
     my_error(ER_PS_NO_RECURSION, MYF(0));

=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc	2011-03-09 20:54:55 +0000
+++ b/sql/sql_show.cc	2011-03-11 18:53:12 +0000
@@ -6977,7 +6977,8 @@ ST_FIELD_INFO proc_fields_info[]=
   {"DATA_TYPE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE},
   {"CHARACTER_MAXIMUM_LENGTH", 21 , MYSQL_TYPE_LONG, 0, 1, 0, SKIP_OPEN_TABLE},
   {"CHARACTER_OCTET_LENGTH", 21 , MYSQL_TYPE_LONG, 0, 1, 0, SKIP_OPEN_TABLE},
-  {"NUMERIC_PRECISION", 21 , MYSQL_TYPE_LONG, 0, 1, 0, SKIP_OPEN_TABLE},
+  {"NUMERIC_PRECISION", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG,
+   0, (MY_I_S_MAYBE_NULL | MY_I_S_UNSIGNED), 0, SKIP_OPEN_TABLE},
   {"NUMERIC_SCALE", 21 , MYSQL_TYPE_LONG, 0, 1, 0, SKIP_OPEN_TABLE},
   {"CHARACTER_SET_NAME", 64, MYSQL_TYPE_STRING, 0, 1, 0, SKIP_OPEN_TABLE},
   {"COLLATION_NAME", 64, MYSQL_TYPE_STRING, 0, 1, 0, SKIP_OPEN_TABLE},
@@ -7387,7 +7388,8 @@ ST_FIELD_INFO parameters_fields_info[]=
   {"DATA_TYPE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0, OPEN_FULL_TABLE},
   {"CHARACTER_MAXIMUM_LENGTH", 21 , MYSQL_TYPE_LONG, 0, 1, 0, OPEN_FULL_TABLE},
   {"CHARACTER_OCTET_LENGTH", 21 , MYSQL_TYPE_LONG, 0, 1, 0, OPEN_FULL_TABLE},
-  {"NUMERIC_PRECISION", 21 , MYSQL_TYPE_LONG, 0, 1, 0, OPEN_FULL_TABLE},
+  {"NUMERIC_PRECISION", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG,
+   0, (MY_I_S_MAYBE_NULL | MY_I_S_UNSIGNED), 0, OPEN_FULL_TABLE},
   {"NUMERIC_SCALE", 21 , MYSQL_TYPE_LONG, 0, 1, 0, OPEN_FULL_TABLE},
   {"CHARACTER_SET_NAME", 64, MYSQL_TYPE_STRING, 0, 1, 0, OPEN_FULL_TABLE},
   {"COLLATION_NAME", 64, MYSQL_TYPE_STRING, 0, 1, 0, OPEN_FULL_TABLE},

=== modified file 'sql/sys_vars.cc'
--- a/sql/sys_vars.cc	2011-02-23 21:13:48 +0000
+++ b/sql/sys_vars.cc	2011-03-16 08:58:26 +0000
@@ -1288,6 +1288,16 @@ static Sys_var_ulong Sys_max_length_for_
        SESSION_VAR(max_length_for_sort_data), CMD_LINE(REQUIRED_ARG),
        VALID_RANGE(4, 8192*1024L), DEFAULT(1024), BLOCK_SIZE(1));
 
+static Sys_var_ulong Sys_max_long_data_size(
+       "max_long_data_size",
+       "The maximum BLOB length to send to server from "
+       "mysql_send_long_data API. Deprecated option; "
+       "use max_allowed_packet instead.",
+       READ_ONLY GLOBAL_VAR(max_long_data_size),
+       CMD_LINE(REQUIRED_ARG, OPT_MAX_LONG_DATA_SIZE),
+       VALID_RANGE(1024, UINT_MAX32), DEFAULT(1024*1024),
+       BLOCK_SIZE(1));
+
 static PolyLock_mutex PLock_prepared_stmt_count(&LOCK_prepared_stmt_count);
 static Sys_var_ulong Sys_max_prepared_stmt_count(
        "max_prepared_stmt_count",

=== modified file 'strings/uca-dump.c'
--- a/strings/uca-dump.c	2011-01-19 13:35:54 +0000
+++ b/strings/uca-dump.c	2011-03-11 14:16:44 +0000
@@ -19,12 +19,15 @@
 
 typedef unsigned char uchar;
 typedef unsigned short uint16;
+typedef unsigned int uint;
 
 #define MY_UCA_MAXWEIGHT_TO_PARSE 64
 #define MY_UCA_MAXWEIGHT_TO_DUMP  8
 #define MY_UCA_MAXLEVEL           4
 #define MY_UCA_VERSION_SIZE       32
+#define MY_UCA_MAX_CONTRACTION    6
 
+#define MY_UCA_NCONTRACTIONS   1024
 #define MY_UCA_MAXCHAR  (0x10FFFF+1)
 #define MY_UCA_NCHARS	256
 #define MY_UCA_CMASK	255
@@ -38,10 +41,20 @@ typedef struct uca_item_st
 } MY_UCA_ITEM;
 
 
+typedef struct uca_contraction_st
+{
+  uint ch[MY_UCA_MAX_CONTRACTION];
+  MY_UCA_ITEM item;
+} MY_UCA_CONTRACTION;
+
 typedef struct uca_info_st
 {
   char version[MY_UCA_VERSION_SIZE];
   MY_UCA_ITEM item[MY_UCA_MAXCHAR];
+  size_t ncontractions;
+  MY_UCA_CONTRACTION contraction[MY_UCA_NCONTRACTIONS];
+  int optimize_contractions;
+  int debug;
 } MY_UCA;
 
 
@@ -59,7 +72,7 @@ static int load_uca_file(MY_UCA *uca,
   {
     char *comment;
     char *weight;
-    char *s;
+    char *s, *ch[MY_UCA_MAX_CONTRACTION];
     size_t codenum, i, code;
     MY_UCA_ITEM *item= NULL;
     
@@ -83,7 +96,6 @@ static int load_uca_file(MY_UCA *uca,
       out_of_range_chars++;
       continue;
     }
-    item= &uca->item[code];
     
     
     if ((comment= strchr(str,'#')))
@@ -110,20 +122,48 @@ static int load_uca_file(MY_UCA *uca,
       continue;
     }
     
-    codenum= 0;
-    s= strtok(str, " \t");
-    while (s)
+    for (codenum= 0, s= strtok(str, " \t"); s;
+         codenum++, s= strtok(NULL, " \t"))
     {
-      s= strtok(NULL, " \t");
-      codenum++;
+      if (codenum == MY_UCA_MAX_CONTRACTION)
+      {
+        fprintf(stderr, "Contraction length is too long (%d) line #%d",
+                codenum, lineno);
+        exit(1);
+      }
+      ch[codenum]= s;
+      ch[codenum + 1]= 0;
     }
     
     if (codenum > 1)
     {
+      MY_UCA_CONTRACTION *c= &uca->contraction[uca->ncontractions++];
+      size_t i;
       /* Multi-character weight (contraction) - not supported yet. */
-      continue;
+            
+      if (uca->ncontractions >= MY_UCA_NCONTRACTIONS)
+      {
+        fprintf(stderr,
+                "Too many contractions (%d) at line #%d\n"
+                "Rebuild with a bigger MY_UCA_MAXCONTRACTIONS value\n",
+                uca->ncontractions, lineno);
+        exit(1);
+      }
+      /* Copy codepoints of the contraction parts */
+      for (i= 0; i < MY_UCA_MAX_CONTRACTION; i++)
+      {
+        c->ch[i]= (i < codenum) ? (uint) strtol(ch[i], NULL, 16) : 0;
+      }
+
+      if (uca->debug)
+        fprintf(stderr, "Contraction: %04X-%04X-%04X\n",
+                          c->ch[0], c->ch[1], c->ch[2]);
+      item= &c->item;
     }
-    
+    else
+    {
+      item= &uca->item[code];
+    }    
     
     /*
       Split weight string into separate weights
@@ -173,7 +213,8 @@ static int load_uca_file(MY_UCA *uca,
         }
         else
         {
-          fprintf(stderr, "Too many weights: %d\n", i);
+          fprintf(stderr, "Too many weights (%d) at line %d\n", i, lineno);
+          exit(1);
         }
         s= endptr;
         level++;
@@ -277,8 +318,8 @@ get_page_statistics(MY_UCA *uca, size_t 
 }
 
 
-static const char *pname[]= {"", "l2", "l3", "l4"};
-
+static const char *pname[]= {"", "_s", "_t", "_q"};
+static const char *lname[]= {"primary", "secondary", "tertiary", "quaternary"};
 
 static char *
 prefix_name(MY_UCA *uca)
@@ -309,6 +350,50 @@ page_name(MY_UCA *uca, size_t page, size
 }
 
 
+/*
+  "weight" must be [MY_UCA_MAXWEIGHT_TO_DUMP+1] elements long
+*/
+static size_t
+normalize_weight(MY_UCA_ITEM *item, size_t level,
+                 uint16 *weight, size_t weight_elements)
+{
+  size_t num, i;
+  
+  bzero(weight, weight_elements * sizeof(*weight));
+
+  /*
+    Copy non-zero weights only. For example:
+    
+    [.17A6.0020.0004.00DF][.0000.015F.0004.00DF][.17A6.0020.001F.00DF]
+    
+    makes [17A6][0000][17A6] on the primary level
+    
+    pack it to [17A6][17A7]
+  */
+  
+  for (num= 0, i= 0; i < item->num && i < MY_UCA_MAXWEIGHT_TO_DUMP; i++)
+  {
+    if (item->weight[level][i])
+    {
+      weight[num]= item->weight[level][i];
+#ifdef INVERT_TERTIARY_WEIGHTS
+      if (level == 2)
+      {
+        /* 
+          Invert tertiary weights to sort upper case letters
+          before their lower case counterparts.
+        */
+        if (weight[num] >= 0x20)
+          fprintf(stderr, "Tertiary weight is too big: %02X\n", weight[num]);
+        weight[num]= (uint) (0x20) - weight[num];
+      }
+#endif
+      num++;
+    }
+  }
+  return num;
+}
+
 
 static void
 print_one_page(MY_UCA *uca, size_t level,
@@ -336,37 +421,19 @@ print_one_page(MY_UCA *uca, size_t level
   /* Print the page */
   for (offs=0; offs < MY_UCA_NCHARS; offs++)
   {
-    uint16 weight[9];
+    uint16 weight[MY_UCA_MAXWEIGHT_TO_DUMP + 1];
     size_t num, i, code= page * MY_UCA_NCHARS + offs;
     MY_UCA_ITEM *item= &uca->item[code];
-    
-    bzero(weight, sizeof(weight));
-    
-    /* Copy non-zero weights */
-    for (num= 0, i= 0; i < item->num && i < MY_UCA_MAXWEIGHT_TO_DUMP; i++)
-    {
-      if (item->weight[level][i])
-      {
-        weight[num]= item->weight[level][i];
-        num++;
-      }
-    }
-    
+
+    normalize_weight(item, level, weight, sizeof(weight)/sizeof(weight[0]));
+
     /* Print weights */
     for (i= 0; i < maxnum; i++)
     {
-      /* 
-        Invert weights for secondary level to
-        sort upper case letters before their
-        lower case counter part.
-      */
       int tmp= weight[i];
-      if (level == 2 && tmp)
-        tmp= (int) (0x20 - weight[i]);
 
       printf("0x%04X", tmp);
-      
-      
+
       if (tmp > 0xFFFF || tmp < 0)
       {
         fprintf(stderr,
@@ -374,8 +441,7 @@ print_one_page(MY_UCA *uca, size_t level
                 code, level, tmp);
         exit(1);
       }
-      
-      
+
       if ((offs + 1 != MY_UCA_NCHARS) || (i + 1 != maxnum))
         printf(",");
       else
@@ -398,15 +464,199 @@ print_one_page(MY_UCA *uca, size_t level
 }
 
 
+/*
+  Compare two weight strings.
+  Return 1 if weight string differ
+  Return 0 if weigh string are equal
+*/
+static int
+weight_cmp(uint16 *w1, uint16 *w2, size_t len)
+{
+  size_t i;
+  for (i= 0; i < len; i++)
+  {
+    if (w1[i] != w2[i])
+      return 1;
+  }
+  return 0;
+}
+
+
+static void
+print_contraction(MY_UCA *uca, MY_UCA_CONTRACTION *c, size_t level)
+{
+  size_t ch;
+  uint16 weight[MY_UCA_MAXWEIGHT_TO_DUMP + 1];
+  int optimize= 0;
+
+  if (c)
+  {
+    normalize_weight(&c->item, level,
+                     weight, sizeof(weight)/sizeof(weight[0]));
+
+    if (uca->optimize_contractions)
+    {
+      /*
+        Some contraction can be optimized away on certain levels.
+        For example, in Unicode-6.0:
+
+        0E40 0E01 ; [.2395.0020.0002.0E01][.23CF.0020.001F.0E40] # <THAI CHARACTER SARA E, THAI CHARACTER KO KAI>
+
+        Its part weights are:
+
+        0E40  ; [.23CF.0020.0002.0E40] # THAI CHARACTER SARA E
+        0E01  ; [.2395.0020.0002.0E01] # THAI CHARACTER KO KAI
+
+        On the secondary level weights for the contraction
+        and for the two characters in a sequence are: 0020-0020.
+
+        So "0E40 0E01" can be optimized away of the secondary level.
+
+        This optimization is OFF by default, as it's better to optimize
+        this at collation initialization time rather than at dump time,
+        to preserve all available DUCET data.
+
+        Also, this does not seem to ever happen on the primary level,
+        so this optimization will not bring any serious performance
+        improvement.
+      */
+      size_t i;
+      uint16 sweight[MY_UCA_MAXWEIGHT_TO_DUMP*MY_UCA_MAX_CONTRACTION + 1], *sw;
+
+      /* Concatenate weight arrays for the contraction parts */
+      for (sw= sweight, i= 0; c->ch[i]; i++)
+      {
+        MY_UCA_ITEM *item= &uca->item[c->ch[i]];
+        sw+= normalize_weight(item, level, sw, MY_UCA_MAXWEIGHT_TO_DUMP);
+      }
+    
+      if (sw - sweight < MY_UCA_MAXWEIGHT_TO_DUMP &&
+          !weight_cmp(sweight, weight, MY_UCA_MAXWEIGHT_TO_DUMP))
+      {
+        if (uca->debug)
+          fprintf(stderr, "Equal[%d]: %04X [%04X-%04X-%04X] == {%04X,%04X,%04X} [%04X-%04X-%04X]\n",
+                  level,
+                  c->ch[0], sweight[0], sweight[1], sweight[2],
+                  c->ch[0], c->ch[1], c->ch[2],
+                  weight[0], weight[1], weight[2]);
+        optimize= 1;
+      }
+    }
+  }
+
+  printf("%s{", optimize ? "/* " : "");
+  for (ch= 0; ch < MY_UCA_MAX_CONTRACTION; ch++)
+  {
+    uint codepoint= c ? c->ch[ch] : 0; /* Real character or terminator line */
+    printf("%s", ch > 0 ? "," : "");
+    if (codepoint)
+      printf("0x%04X", codepoint);
+    else
+      printf("0");
+  }
+  printf("},");
+  printf("{");
+  for (ch= 0; ch < MY_UCA_MAXWEIGHT_TO_DUMP; ch++)
+  {
+    uint w= c ? weight[ch] : 0; /* Real chr or terminator */
+    printf("%s", ch > 0 ? "," : "");
+    if (w)
+      printf("0x%04X", w);
+    else
+      printf("0");
+  }
+  printf("}");
+  printf(",0");
+  printf("},%s\n", optimize ? " */" : "");
+}
+
+
+static void
+print_contractions(MY_UCA *uca, size_t level)
+{
+  size_t i;
+
+  printf("\n\n");
+  printf("/* Contractions, %s level */\n", lname[level]);
+  printf("MY_CONTRACTION %s_default_contraction%s[]= {\n",
+    prefix_name(uca), pname[level]);
+  for (i= 0; i < uca->ncontractions; i++)
+  {
+    MY_UCA_CONTRACTION *c= &uca->contraction[i];
+    print_contraction(uca, c, level);
+  }
+  print_contraction(uca, NULL, level);
+  printf("};\n");
+}
+
+
+static int contractions= 0;
+static int nlevels= 1;
+
+static void
+usage(FILE *file, int rc)
+{
+  fprintf(file, "Usage:\n");
+  fprintf(file, "uca-dump [options...] < /path/to/allkeys.txt\n");
+  fprintf(file, "\n");
+  fprintf(file, "Options:\n");
+  fprintf(file, "--levels=NUM                 How many levels to dump, 1-4, default 1.\n");
+  fprintf(file, "--contractions=NUM           Whether to dump comtractions, 0-1, default 0.\n");
+  fprintf(file, "--optimize-contractions=NUM  Whether to optimize contractions, 0-1, default 0.\n");
+  fprintf(file, "--debug=NUM                  Print debug information, 0-1, default 0.\n");
+  fprintf(file, "\n\n");
+  exit(rc);
+}
+
+
+static int
+get_int_option(const char *str, const char *name, int *num)
+{
+  size_t namelen= strlen(name);
+  if (!strncmp(str, name, namelen))
+  {
+    *num= atoi(str + namelen);
+    if (*num == 0 && str[namelen] !='0')
+    {
+      fprintf(stderr, "\nBad numeric option value: %s\n\n", str);
+      usage(stderr, 1);
+    }
+    return 1;
+  }
+  return 0;
+}
+
+
+static void
+process_options(int ac, char **av, MY_UCA *uca)
+{
+  size_t i;
+  for (i= 1; i < ac ; i++)
+  {
+    /*printf("[%d]=%s\n", i, av[i]);*/
+    if (!get_int_option(av[i], "--levels=", &nlevels) &&
+        !get_int_option(av[i], "--contractions=", &contractions) &&
+        !get_int_option(av[i], "--debug=", &uca->debug) &&
+        !get_int_option(av[i], "--optimize-contractions=", &uca->optimize_contractions))
+    {
+      fprintf(stderr, "\nUnknown option: %s\n\n", av[i]);
+      usage(stderr, 1);
+    }
+  }
+}
+
+
 int
-main(int ac __attribute__((unused)), char **av __attribute__((unused)))
+main(int ac, char **av)
 {
   static MY_UCA uca;
   size_t level, maxchar= MY_UCA_MAXCHAR;
   static int pageloaded[MY_UCA_NPAGES];
-  size_t nlevels= 1;
-  
+
   bzero(&uca, sizeof(uca));
+  
+  process_options(ac, av, &uca);
+  
   bzero(pageloaded, sizeof(pageloaded));
   
   load_uca_file(&uca, maxchar, pageloaded);
@@ -491,6 +741,10 @@ main(int ac __attribute__((unused)), cha
         printf("%s%s%s", page_name(&uca, page, level), comma, nline);
     }
     printf("};\n");
+
+    /* Print contractions */
+    if (contractions)
+      print_contractions(&uca, level);
   }
 
   

=== modified file 'tests/mysql_client_test.c'
--- a/tests/mysql_client_test.c	2011-02-18 14:22:03 +0000
+++ b/tests/mysql_client_test.c	2011-03-15 13:03:22 +0000
@@ -19470,6 +19470,56 @@ static void test_bug49972()
 }
 
 
+/*
+  Bug #56976:   Severe Denial Of Service in prepared statements
+*/
+static void test_bug56976()
+{
+  MYSQL_STMT   *stmt;
+  MYSQL_BIND    bind[1];
+  int           rc;
+  const char*   query = "SELECT LENGTH(?)";
+  char *long_buffer;
+  unsigned long i, packet_len = 256 * 1024L;
+  unsigned long dos_len    = 2 * 1024 * 1024L;
+
+  DBUG_ENTER("test_bug56976");
+  myheader("test_bug56976");
+
+  stmt= mysql_stmt_init(mysql);
+  check_stmt(stmt);
+
+  rc= mysql_stmt_prepare(stmt, query, strlen(query));
+  check_execute(stmt, rc);
+
+  memset(bind, 0, sizeof(bind));
+  bind[0].buffer_type = MYSQL_TYPE_TINY_BLOB;
+
+  rc= mysql_stmt_bind_param(stmt, bind);
+  check_execute(stmt, rc);
+
+  long_buffer= (char*) my_malloc(packet_len, MYF(0));
+  DIE_UNLESS(long_buffer);
+
+  memset(long_buffer, 'a', packet_len);
+
+  for (i= 0; i < dos_len / packet_len; i++)
+  {
+    rc= mysql_stmt_send_long_data(stmt, 0, long_buffer, packet_len);
+    check_execute(stmt, rc);
+  }
+
+  my_free(long_buffer);
+  rc= mysql_stmt_execute(stmt);
+
+  DIE_UNLESS(rc && mysql_stmt_errno(stmt) == ER_UNKNOWN_ERROR);
+
+  mysql_stmt_close(stmt);
+
+  DBUG_VOID_RETURN;
+}
+
+
 /**
   Bug#57058 SERVER_QUERY_WAS_SLOW not wired up.
 */
@@ -19844,6 +19894,7 @@ static struct my_tests_st my_tests[]= {
   { "test_bug47485", test_bug47485 },
   { "test_bug58036", test_bug58036 },
   { "test_bug57058", test_bug57058 },
+  { "test_bug56976", test_bug56976 },
   { 0, 0 }
 };
 

=== modified file 'unittest/mysys/my_vsnprintf-t.c'
--- a/unittest/mysys/my_vsnprintf-t.c	2010-09-15 11:33:22 +0000
+++ b/unittest/mysys/my_vsnprintf-t.c	2011-03-02 09:16:34 +0000
@@ -110,8 +110,11 @@ int main(void)
   test1("Positional arguments octal: <7777>",
         "Positional arguments octal: <%1$o>", 07777);
 
+  /* Can't use int arguments, as they may be different size from pointers */
+
   test1("Padding and %p <0x12> <0x034> <0x0000ab> <    0xcd>",
-        "Padding and %%p <%04p> <%05p> <%08p> <%8p>", 0x12, 0x34, 0xab, 0xcd);
+        "Padding and %%p <%04p> <%05p> <%08p> <%8p>",
+        (void*) 0x12, (void*) 0x34, (void*) 0xab, (void*) 0xcd);
 
   test1("F with a width (ignored) and precision: <12.34568>",
         "F with a width (ignored) and precision: <%10.5f>", 12.3456789);

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (marc.alff:3256 to 3257) Marc Alff16 Mar