List:Commits« Previous MessageNext Message »
From:Marc Alff Date:September 26 2011 11:32pm
Subject:bzr push into mysql-trunk branch (marc.alff:3421 to 3422)
View as plain text  
 3422 Marc Alff	2011-09-27 [merge]
      Merge mysql-trunk --> mysql-trunk-pfs-tuning

    added:
      mysql-test/suite/stress/t/wrapper.test
    modified:
      client/mysqltest.cc
      mysql-test/collections/default.experimental
      mysql-test/mysql-stress-test.pl
      mysql-test/mysql-test-run.pl
      mysql-test/r/func_str.result
      mysql-test/r/group_by.result
      mysql-test/r/mysqltest.result
      mysql-test/r/plugin_auth.result
      mysql-test/suite/federated/federated_plugin-master.opt
      mysql-test/suite/federated/federated_plugin.result
      mysql-test/suite/federated/federated_plugin.test
      mysql-test/suite/rpl/r/rpl_parallel_start_stop.result
      mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result
      mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test
      mysql-test/t/func_str.test
      mysql-test/t/group_by.test
      mysql-test/t/mysql_plugin.test
      mysql-test/t/mysqld--defaults-file.test
      mysql-test/t/mysqltest.test
      mysql-test/t/plugin_auth.test
      sql/item_buff.cc
      sql/rpl_rli_pdb.cc
      sql/rpl_slave.cc
      sql/table.cc
      storage/innobase/log/log0log.c
      storage/innobase/row/row0purge.c
 3421 Marc Alff	2011-09-27 [merge]
      Merge mysql-trunk --> mysql-trunk-pfs-tuning

    removed:
      support-files/config.huge.ini.sh
      support-files/config.medium.ini.sh
      support-files/config.small.ini.sh
      support-files/ndb-config-2-node.ini.sh
    modified:
      client/mysql_plugin.c
      client/mysqltest.cc
      cmake/plugin.cmake
      extra/perror.c
      include/mysql/plugin.h
      include/mysql/plugin_audit.h.pp
      include/mysql/plugin_auth.h.pp
      include/mysql/plugin_ftparser.h.pp
      libmysql/authentication_win/common.cc
      libmysql/authentication_win/common.h
      libmysql/authentication_win/handshake_client.cc
      libmysql/authentication_win/log_client.cc
      mysql-test/include/order_by.inc
      mysql-test/mysql-test-run.pl
      mysql-test/r/ctype_errors.result
      mysql-test/r/ctype_utf16.result
      mysql-test/r/ctype_utf32_uca.result
      mysql-test/r/func_str.result
      mysql-test/r/order_by_all.result
      mysql-test/r/order_by_icp_mrr.result
      mysql-test/r/order_by_none.result
      mysql-test/r/plugin_auth.result
      mysql-test/r/sp-error.result
      mysql-test/r/sp.result
      mysql-test/r/type_float.result
      mysql-test/r/union.result
      mysql-test/suite/innodb/r/innodb-index.result
      mysql-test/suite/innodb/t/innodb-index.test
      mysql-test/t/ctype_errors.test
      mysql-test/t/ctype_utf32_uca.test
      mysql-test/t/func_str.test
      mysql-test/t/mysql_plugin.test
      mysql-test/t/plugin_auth.test
      mysql-test/t/sp-error.test
      mysql-test/t/sp.test
      mysql-test/t/type_float.test
      mysql-test/t/union.test
      plugin/audit_null/audit_null.c
      plugin/auth/auth_socket.c
      plugin/auth/dialog.c
      plugin/auth/qa_auth_interface.c
      plugin/auth/qa_auth_server.c
      plugin/auth/test_plugin.c
      plugin/daemon_example/daemon_example.cc
      plugin/fulltext/plugin_example.c
      plugin/semisync/semisync_master_plugin.cc
      plugin/semisync/semisync_slave_plugin.cc
      sql/binlog.cc
      sql/ha_ndbcluster.cc
      sql/ha_partition.cc
      sql/item_create.cc
      sql/item_strfunc.cc
      sql/item_strfunc.h
      sql/share/errmsg-utf8.txt
      sql/sql_acl.cc
      sql/sql_error.cc
      sql/sql_lex.cc
      sql/sql_plugin.cc
      sql/sql_union.cc
      sql/sql_yacc.yy
      storage/archive/ha_archive.cc
      storage/blackhole/ha_blackhole.cc
      storage/csv/ha_tina.cc
      storage/example/ha_example.cc
      storage/federated/ha_federated.cc
      storage/heap/ha_heap.cc
      storage/innobase/btr/btr0pcur.c
      storage/innobase/handler/ha_innodb.cc
      storage/innobase/handler/i_s.cc
      storage/innobase/include/btr0pcur.h
      storage/innobase/include/btr0pcur.ic
      storage/innobase/include/mtr0mtr.h
      storage/innobase/include/srv0mon.h
      storage/innobase/include/ut0mem.h
      storage/innobase/include/ut0mem.ic
      storage/innobase/mtr/mtr0mtr.c
      storage/innobase/os/os0file.c
      storage/innobase/read/read0read.c
      storage/innobase/row/row0purge.c
      storage/innobase/trx/trx0purge.c
      storage/innobase/ut/ut0mem.c
      storage/myisam/ha_myisam.cc
      storage/myisammrg/ha_myisammrg.cc
      storage/perfschema/ha_perfschema.cc
      storage/perfschema/pfs.cc
      storage/perfschema/pfs_instr.cc
      storage/perfschema/pfs_instr.h
      strings/dtoa.c
      support-files/CMakeLists.txt
      support-files/mysql.spec.sh
      tests/mysql_client_test.c
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc	2011-09-22 08:26:08 +0000
+++ b/client/mysqltest.cc	2011-09-26 08:48:20 +0000
@@ -121,6 +121,41 @@ static char **default_argv;
 static const char *load_default_groups[]= { "mysqltest", "client", 0 };
 static char line_buffer[MAX_DELIMITER_LENGTH], *line_buffer_pos= line_buffer;
 
+/* Info on properties that can be set with --enable_X and --disable_X */
+
+struct property {
+  my_bool *var;			/* Actual variable */
+  my_bool set;			/* Has been set for ONE command */
+  my_bool old;			/* If set, thus is the old value */
+  my_bool reverse;		/* Varible is true if disabled */
+  const char *env_name;		/* Env. variable name */
+};
+
+static struct property prop_list[] = {
+  { &abort_on_error, 0, 1, 0, "$ENABLED_ABORT_ON_ERROR" },
+  { &disable_connect_log, 0, 1, 1, "$ENABLED_CONNECT_LOG" },
+  { &disable_info, 0, 1, 1, "$ENABLED_INFO" },
+  { &display_metadata, 0, 0, 0, "$ENABLED_METADATA" },
+  { &ps_protocol_enabled, 0, 0, 0, "$ENABLED_PS_PROTOCOL" },
+  { &disable_query_log, 0, 0, 1, "$ENABLED_QUERY_LOG" },
+  { &disable_result_log, 0, 0, 1, "$ENABLED_RESULT_LOG" },
+  { &disable_warnings, 0, 0, 1, "$ENABLED_WARNINGS" }
+};
+
+static my_bool once_property= FALSE;
+
+enum enum_prop {
+  P_ABORT= 0,
+  P_CONNECT,
+  P_INFO,
+  P_META,
+  P_PS,
+  P_QUERY,
+  P_RESULT,
+  P_WARN,
+  P_MAX
+};
+
 static uint start_lineno= 0; /* Start line of current command */
 static uint my_end_arg= 0;
 
@@ -472,6 +507,7 @@ TYPELIB command_typelib= {array_elements
 DYNAMIC_STRING ds_res;
 /* Points to ds_warning in run_query, so it can be freed */
 DYNAMIC_STRING *ds_warn= 0;
+struct st_command *curr_command= 0;
 
 char builtin_echo[FN_REFLEN];
 
@@ -721,6 +757,7 @@ void handle_error(struct st_command*,
                   unsigned int err_errno, const char *err_error,
                   const char *err_sqlstate, DYNAMIC_STRING *ds);
 void handle_no_error(struct st_command*);
+void revert_properties();
 
 #ifdef EMBEDDED_LIBRARY
 
@@ -1183,6 +1220,7 @@ void handle_command_error(struct st_comm
     {
       DBUG_PRINT("info", ("command \"%.*s\" failed with expected error: %d",
                           command->first_word_len, command->query, error));
+      revert_properties();
       DBUG_VOID_RETURN;
     }
     if (command->expected_errors.count > 0)
@@ -1197,6 +1235,7 @@ void handle_command_error(struct st_comm
         command->first_word_len, command->query,
         command->expected_errors.err[0].code.errnum);
   }
+  revert_properties();
   DBUG_VOID_RETURN;
 }
 
@@ -2276,6 +2315,50 @@ void var_set_errno(int sql_errno)
   var_set_string("$mysql_errname", get_errname_from_code(sql_errno));
 }
 
+/* Functions to handle --disable and --enable properties */
+
+void set_once_property(enum_prop prop, my_bool val)
+{
+  property &pr= prop_list[prop];
+  pr.set= 1;
+  pr.old= *pr.var;
+  *pr.var= val;
+  var_set_int(pr.env_name, (val != pr.reverse));
+  once_property= TRUE;
+}
+
+void set_property(st_command *command, enum_prop prop, my_bool val)
+{
+  char* p= command->first_argument;
+  if (p && !strcmp (p, "ONCE")) 
+  {
+    command->last_argument= p + 4;
+    set_once_property(prop, val);
+    return;
+  }
+  property &pr= prop_list[prop];
+  *pr.var= val;
+  pr.set= 0;
+  var_set_int(pr.env_name, (val != pr.reverse));
+}
+
+void revert_properties()
+{
+  if (! once_property)
+    return;
+  for (int i= 0; i < (int) P_MAX; i++) 
+  {
+    property &pr= prop_list[i];
+    if (pr.set) 
+    {
+      *pr.var= pr.old;
+      pr.set= 0;
+      var_set_int(pr.env_name, (pr.old != pr.reverse));
+    }
+  }
+  once_property=FALSE;
+}
+
 
 /*
   Set variable from the result of a query
@@ -2327,9 +2410,16 @@ void var_query_set(VAR *var, const char
   init_dynamic_string(&ds_query, 0, (end - query) + 32, 256);
   do_eval(&ds_query, query, end, FALSE);
 
-  if (mysql_real_query(mysql, ds_query.str, ds_query.length))
-    die("Error running query '%s': %d %s", ds_query.str,
-	mysql_errno(mysql), mysql_error(mysql));
+  if (mysql_real_query(mysql, ds_query.str, ds_query.length)) 
+  {
+    handle_error (curr_command, mysql_errno(mysql), mysql_error(mysql),
+                  mysql_sqlstate(mysql), &ds_res);
+    /* If error was acceptable, return empty string */
+    dynstr_free(&ds_query);
+    eval_expr(var, "", 0);
+    DBUG_VOID_RETURN;
+  }
+  
   if (!(res= mysql_store_result(mysql)))
     die("Query '%s' didn't return a result set", ds_query.str);
   dynstr_free(&ds_query);
@@ -2483,8 +2573,15 @@ void var_set_query_get_value(struct st_c
 
   /* Run the query */
   if (mysql_real_query(mysql, ds_query.str, ds_query.length))
-    die("Error running query '%s': %d %s", ds_query.str,
-	mysql_errno(mysql), mysql_error(mysql));
+  {
+    handle_error (curr_command, mysql_errno(mysql), mysql_error(mysql),
+                  mysql_sqlstate(mysql), &ds_res);
+    /* If error was acceptable, return empty string */
+    dynstr_free(&ds_query);
+    eval_expr(var, "", 0);
+    DBUG_VOID_RETURN;
+  }
+
   if (!(res= mysql_store_result(mysql)))
     die("Query '%s' didn't return a result set", ds_query.str);
 
@@ -4402,6 +4499,7 @@ void do_let(struct st_command *command)
   var_set(var_name, var_name_end, let_rhs_expr.str,
           (let_rhs_expr.str + let_rhs_expr.length));
   dynstr_free(&let_rhs_expr);
+  revert_properties();
   DBUG_VOID_RETURN;
 }
 
@@ -7342,6 +7440,7 @@ void handle_error(struct st_command *com
         dynstr_append(ds,"Got one of the listed errors\n");
     }
     /* OK */
+    revert_properties();
     DBUG_VOID_RETURN;
   }
 
@@ -7369,6 +7468,7 @@ void handle_error(struct st_command *com
 	  command->expected_errors.err[0].code.sqlstate);
   }
 
+  revert_properties();
   DBUG_VOID_RETURN;
 }
 
@@ -7403,6 +7503,7 @@ void handle_no_error(struct st_command *
         command->query, command->expected_errors.err[0].code.sqlstate);
   }
 
+  revert_properties();
   DBUG_VOID_RETURN;
 }
 
@@ -7433,6 +7534,9 @@ void run_query_stmt(MYSQL *mysql, struct
   DBUG_ENTER("run_query_stmt");
   DBUG_PRINT("query", ("'%-.60s'", query));
 
+  /* Remember disable_result_log since handle_no_error() may reset it */
+  my_bool dis_res= disable_result_log;
+  
   /*
     Init a new stmt if it's not already one created for this connection
   */
@@ -7528,7 +7632,7 @@ void run_query_stmt(MYSQL *mysql, struct
 
   /* If we got here the statement was both executed and read successfully */
   handle_no_error(command);
-  if (!disable_result_log)
+  if (!dis_res)
   {
     /*
       Not all statements creates a result set. If there is one we can
@@ -8548,6 +8652,8 @@ int main(int argc, char **argv)
     {
       command->last_argument= command->first_argument;
       processed = 1;
+      /* Need to remember this for handle_error() */
+      curr_command= command;
       switch (command->type) {
       case Q_CONNECT:
         do_connect(command);
@@ -8557,60 +8663,46 @@ int main(int argc, char **argv)
       case Q_DIRTY_CLOSE:
 	do_close_connection(command); break;
       case Q_ENABLE_QUERY_LOG:
-        disable_query_log= 0;
-        var_set_int("$ENABLED_QUERY_LOG", 1);
+        set_property(command, P_QUERY, 0);
         break;
       case Q_DISABLE_QUERY_LOG:
-        disable_query_log= 1;
-        var_set_int("$ENABLED_QUERY_LOG", 0);
+        set_property(command, P_QUERY, 1);
         break;
       case Q_ENABLE_ABORT_ON_ERROR:
-        abort_on_error= 1;
-        var_set_int("$ENABLED_ABORT_ON_ERROR", 1);
+        set_property(command, P_ABORT, 1);
         break;
       case Q_DISABLE_ABORT_ON_ERROR:
-        abort_on_error= 0;
-        var_set_int("$ENABLED_ABORT_ON_ERROR", 0);
+        set_property(command, P_ABORT, 0);
         break;
       case Q_ENABLE_RESULT_LOG:
-        disable_result_log= 0;
-        var_set_int("$ENABLED_RESULT_LOG", 1);
+        set_property(command, P_RESULT, 0);
         break;
       case Q_DISABLE_RESULT_LOG:
-        disable_result_log=1;
-        var_set_int("$ENABLED_RESULT_LOG", 0);
+        set_property(command, P_RESULT, 1);
         break;
       case Q_ENABLE_CONNECT_LOG:
-        disable_connect_log=0;
-        var_set_int("$ENABLED_CONNECT_LOG", 1);
+        set_property(command, P_CONNECT, 0);
         break;
       case Q_DISABLE_CONNECT_LOG:
-        disable_connect_log=1;
-        var_set_int("$ENABLED_CONNECT_LOG", 0);
+        set_property(command, P_CONNECT, 1);
         break;
       case Q_ENABLE_WARNINGS:
-        disable_warnings= 0;
-        var_set_int("$ENABLED_WARNINGS", 1);
+        set_property(command, P_WARN, 0);
         break;
       case Q_DISABLE_WARNINGS:
-        disable_warnings= 1;
-        var_set_int("$ENABLED_WARNINGS", 0);
+        set_property(command, P_WARN, 1);
         break;
       case Q_ENABLE_INFO:
-        disable_info= 0;
-        var_set_int("$ENABLED_INFO", 1);
+        set_property(command, P_INFO, 0);
         break;
       case Q_DISABLE_INFO:
-        disable_info= 1;
-        var_set_int("$ENABLED_INFO", 0);
+        set_property(command, P_INFO, 1);
         break;
       case Q_ENABLE_METADATA:
-        display_metadata= 1;
-        var_set_int("$ENABLED_METADATA", 1);
+        set_property(command, P_META, 1);
         break;
       case Q_DISABLE_METADATA:
-        display_metadata= 0;
-        var_set_int("$ENABLED_METADATA", 0);
+        set_property(command, P_META, 0);
         break;
       case Q_SOURCE: do_source(command); break;
       case Q_SLEEP: do_sleep(command, 0); break;
@@ -8839,12 +8931,12 @@ int main(int argc, char **argv)
 	do_set_charset(command);
 	break;
       case Q_DISABLE_PS_PROTOCOL:
-        ps_protocol_enabled= 0;
+        set_property(command, P_PS, 0);
         /* Close any open statements */
         close_statements();
         break;
       case Q_ENABLE_PS_PROTOCOL:
-        ps_protocol_enabled= ps_protocol;
+        set_property(command, P_PS, ps_protocol);
         break;
       case Q_DISABLE_RECONNECT:
         set_reconnect(&cur_con->mysql, 0);

=== modified file 'mysql-test/collections/default.experimental'
--- a/mysql-test/collections/default.experimental	2011-09-14 11:23:46 +0000
+++ b/mysql-test/collections/default.experimental	2011-09-23 19:06:36 +0000
@@ -27,7 +27,6 @@ rpl.rpl_change_master_dbug
 rpl.rpl_delayed_slave                    # BUG#11764654 rpl_delayed_slave fails sporadically in pb
 rpl.rpl_heartbeat_basic                  # BUG#12403008 2011-04-27 sven fails sporadically
 rpl.rpl_innodb_bug28430                  # Bug#11754425
-rpl.rpl_row_ignorable_event              # Sven: BUG#12765441
 rpl.rpl_row_sp011  @solaris              # Bug#11753919 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun
 rpl.rpl_seconds_behind_master            # BUG#11765124 2010-11-24 luis fails sporadically on pb2
 rpl.rpl_show_slave_running               # BUG#12346048 2011-04-11 sven fails sporadically on pb2

=== modified file 'mysql-test/mysql-stress-test.pl'
--- a/mysql-test/mysql-stress-test.pl	2011-01-18 10:21:37 +0000
+++ b/mysql-test/mysql-stress-test.pl	2011-09-15 10:34:32 +0000
@@ -238,9 +238,9 @@ GetOptions("server-host=s", "server-logs
            "test-duration=i", "test-suffix=s", "check-tests-file", 
            "verbose", "log-error-details", "cleanup", "mysqltest=s", 
            # OBN: (changing 'abort-on-error' to numberic for WL-4626/4685) 
-           "abort-on-error=i" => \$opt_abort_on_error, "help") || usage();
+           "abort-on-error=i" => \$opt_abort_on_error, "help") || usage(1);
 
-usage() if ($opt_help);
+usage(0) if ($opt_help);
 
 #$opt_abort_on_error=1;
 
@@ -1131,6 +1131,7 @@ sub sig_TERM_handler
 
 sub usage
 {
+  my $retcode= shift;
   print <<EOF;
 
 The MySQL Stress suite Ver $stress_suite_version
@@ -1234,7 +1235,7 @@ perl mysql-stress-test.pl \
 --cleanup \
 
 EOF
-exit(0);
+exit($retcode);
 }
 
 

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2011-09-23 10:55:10 +0000
+++ b/mysql-test/mysql-test-run.pl	2011-09-26 09:19:12 +0000
@@ -181,6 +181,8 @@ our @opt_combinations;
 our @opt_extra_mysqld_opt;
 our @opt_mysqld_envs;
 
+my $opt_stress;
+
 my $opt_compress;
 my $opt_ssl;
 my $opt_skip_ssl;
@@ -224,10 +226,13 @@ our %gprof_dirs;
 our $glob_debugger= 0;
 our $opt_gdb;
 our $opt_client_gdb;
+my $opt_boot_gdb;
 our $opt_dbx;
 our $opt_client_dbx;
+my $opt_boot_dbx;
 our $opt_ddd;
 our $opt_client_ddd;
+my $opt_boot_ddd;
 our $opt_manual_gdb;
 our $opt_manual_dbx;
 our $opt_manual_ddd;
@@ -425,8 +430,8 @@ sub main {
   }
   $ENV{MTR_PARALLEL} = $opt_parallel;
 
-  if ($opt_parallel > 1 && $opt_start_exit) {
-    mtr_warning("Parallel and --start-and-exit cannot be combined\n" .
+  if ($opt_parallel > 1 && ($opt_start_exit || $opt_stress)) {
+    mtr_warning("Parallel cannot be used with --start-and-exit or --stress\n" .
                "Setting parallel to 1");
     $opt_parallel= 1;
   }
@@ -656,8 +661,9 @@ sub run_test_server ($$$) {
 			 my $core_file= $File::Find::name;
 			 my $core_name= basename($core_file);
 
-			 if ($core_name =~ /^core/ or  # Starting with core
-			     (IS_WINDOWS and $core_name =~ /\.dmp$/)){
+			 # Name beginning with core, not ending in .gz
+			 if (($core_name =~ /^core/ and $core_name !~ /\.gz$/)
+			     or (IS_WINDOWS and $core_name =~ /\.dmp$/)){
                                                        # Ending with .dmp
 			   mtr_report(" - found '$core_name'",
 				      "($num_saved_cores/$opt_max_save_core)");
@@ -1102,14 +1108,17 @@ sub command_line_setup {
              'gdb'                      => \$opt_gdb,
              'client-gdb'               => \$opt_client_gdb,
              'manual-gdb'               => \$opt_manual_gdb,
+	     'boot-gdb'                 => \$opt_boot_gdb,
              'manual-debug'             => \$opt_manual_debug,
              'ddd'                      => \$opt_ddd,
              'client-ddd'               => \$opt_client_ddd,
              'manual-ddd'               => \$opt_manual_ddd,
+	     'boot-ddd'                 => \$opt_boot_ddd,
              'dbx'                      => \$opt_dbx,
 	     'client-dbx'               => \$opt_client_dbx,
 	     'manual-dbx'               => \$opt_manual_dbx,
 	     'debugger=s'               => \$opt_debugger,
+	     'boot-dbx'                 => \$opt_boot_dbx,
 	     'client-debugger=s'        => \$opt_client_debugger,
              'strace-client:s'          => \$opt_strace_client,
              'max-save-core=i'          => \$opt_max_save_core,
@@ -1178,6 +1187,7 @@ sub command_line_setup {
 	     'report-times'             => \$opt_report_times,
 	     'result-file'              => \$opt_resfile,
 	     'unit-tests!'              => \$opt_ctest,
+	     'stress=s'                 => \$opt_stress,
 
              'help|h'                   => \$opt_usage,
 	     # list-options is internal, not listed in help
@@ -1638,6 +1648,22 @@ sub command_line_setup {
   }
 
   # --------------------------------------------------------------------------
+  # Gather stress-test options and modify behavior
+  # --------------------------------------------------------------------------
+
+  if ($opt_stress)
+  {
+    $opt_stress=~ s/,/ /g;
+    $opt_user_args= 1;
+    mtr_error("--stress cannot be combined with named ordinary suites or tests")
+      if $opt_suites || @opt_cases;
+    $opt_suites="stress";
+    @opt_cases= ("wrapper");
+    $ENV{MST_OPTIONS}= $opt_stress;
+    $opt_ctest= 0;
+  }
+
+  # --------------------------------------------------------------------------
   # Check timeout arguments
   # --------------------------------------------------------------------------
 
@@ -2380,6 +2406,12 @@ sub environment_setup {
   $ENV{'MYSQL_PLUGIN'}=             $exe_mysql_plugin;
   $ENV{'MYSQL_EMBEDDED'}=           $exe_mysql_embedded;
 
+  my $exe_mysqld= find_mysqld($basedir);
+  $ENV{'MYSQLD'}= $exe_mysqld;
+  my $extra_opts= join (" ", @opt_extra_mysqld_opt);
+  $ENV{'MYSQLD_CMD'}= "$exe_mysqld --defaults-group-suffix=.1 ".
+    "--defaults-file=$path_config_file $extra_opts";
+
   # ----------------------------------------------------
   # bug25714 executable may _not_ exist in
   # some versions, test using it should be skipped
@@ -3255,6 +3287,19 @@ sub mysql_install_db {
   # ----------------------------------------------------------------------
   my $bootstrap_sql_file= "$opt_vardir/tmp/bootstrap.sql";
 
+  if ($opt_boot_gdb) {
+    gdb_arguments(\$args, \$exe_mysqld_bootstrap, $mysqld->name(),
+		  $bootstrap_sql_file);
+  }
+  if ($opt_boot_dbx) {
+    dbx_arguments(\$args, \$exe_mysqld_bootstrap, $mysqld->name(),
+		  $bootstrap_sql_file);
+  }
+  if ($opt_boot_ddd) {
+    ddd_arguments(\$args, \$exe_mysqld_bootstrap, $mysqld->name(),
+		  $bootstrap_sql_file);
+  }
+
   my $path_sql= my_find_file($install_basedir,
 			     ["mysql", "sql/share", "share/mysql",
 			      "share", "scripts"],
@@ -4173,6 +4218,11 @@ sub extract_server_log ($$) {
       else
       {
 	push(@lines, $line);
+	if (scalar(@lines) > 1000000) {
+	  $Ferr = undef;
+	  mtr_warning("Too much log from test, bailing out from extracting");
+	  return ();
+	}
       }
     }
     else
@@ -5610,19 +5660,21 @@ sub gdb_arguments {
   my $args= shift;
   my $exe=  shift;
   my $type= shift;
+  my $input= shift;
 
-  # Write $args to gdb init file
-  my $str= join " ", map { s/"/\\"/g; "\"$_\""; } @$$args;
   my $gdb_init_file= "$opt_vardir/tmp/gdbinit.$type";
 
   # Remove the old gdbinit file
   unlink($gdb_init_file);
 
+  # Put $args into a single string
+  my $str= join(" ", @$$args);
+  my $runline= $input ? "run $str < $input" : "run $str";
+
   # write init file for mysqld or client
   mtr_tofile($gdb_init_file,
-	     "set args $str\n" .
 	     "break main\n" .
-	     "run");
+	     $runline);
 
   if ( $opt_manual_gdb )
   {
@@ -5661,20 +5713,22 @@ sub ddd_arguments {
   my $args= shift;
   my $exe=  shift;
   my $type= shift;
+  my $input= shift;
 
-  # Write $args to ddd init file
-  my $str= join " ", map { s/"/\\"/g; "\"$_\""; } @$$args;
   my $gdb_init_file= "$opt_vardir/tmp/gdbinit.$type";
 
   # Remove the old gdbinit file
   unlink($gdb_init_file);
 
+  # Put $args into a single string
+  my $str= join(" ", @$$args);
+  my $runline= $input ? "run $str < $input" : "run $str";
+
   # write init file for mysqld or client
   mtr_tofile($gdb_init_file,
 	     "file $$exe\n" .
-	     "set args $str\n" .
 	     "break main\n" .
-	     "run");
+	     $runline);
 
   if ( $opt_manual_ddd )
   {
@@ -5710,14 +5764,16 @@ sub dbx_arguments {
   my $args= shift;
   my $exe=  shift;
   my $type= shift;
+  my $input= shift;
 
   # Put $args into a single string
   my $str= join " ", @$$args;
+  my $runline= $input ? "run $str < $input" : "run $str";
 
   if ( $opt_manual_dbx ) {
     print "\nTo start dbx for $type, type in another window:\n";
     print "cd $glob_mysql_test_dir; dbx -c \"stop in main; " .
-          "run $str\" $$exe\n";
+          "$runline\" $$exe\n";
 
     # Indicate the exe should not be started
     $$exe= undef;
@@ -5736,7 +5792,7 @@ sub dbx_arguments {
 
   mtr_add_arg($$args, "dbx");
   mtr_add_arg($$args, "-c");
-  mtr_add_arg($$args, "stop in main; run $str");
+  mtr_add_arg($$args, "stop in main; $runline");
   mtr_add_arg($$args, "$$exe");
 
   $$exe= "xterm";
@@ -6186,6 +6242,8 @@ Misc options
   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
+  stress=ARGS           Run stress test, providing options to
+                        mysql-stress-test.pl. Options are separated by comma.
 
 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/func_str.result'
--- a/mysql-test/r/func_str.result	2011-09-22 10:42:10 +0000
+++ b/mysql-test/r/func_str.result	2011-09-26 12:27:06 +0000
@@ -2853,8 +2853,8 @@ SELECT ((rpad(1.0,2048,1)) = ('4(') ^ (0
 Warnings:
 Warning	1292	Truncated incorrect INTEGER value: '4('
 SELECT
-pow((rpad(1.0,2048,1)),(b'1111111111111111111111111111111111111111111'));
-ERROR 22003: DOUBLE value is out of range in 'pow(rpad(1.0,2048,1),0x07ffffffffff)'
+pow((rpad(10.0,2048,1)),(b'1111111111111111111111111111111111111111111'));
+ERROR 22003: DOUBLE value is out of range in 'pow(rpad(10.0,2048,1),0x07ffffffffff)'
 SELECT ((rpad(1.0,2048,1)) + (0) ^ ('../'));
 ((rpad(1.0,2048,1)) + (0) ^ ('../'))
 1.011111111111111

=== modified file 'mysql-test/r/group_by.result'
--- a/mysql-test/r/group_by.result	2011-09-13 07:22:49 +0000
+++ b/mysql-test/r/group_by.result	2011-09-26 13:48:06 +0000
@@ -2108,3 +2108,17 @@ pk
 DROP VIEW v1;
 DROP TABLE t1,t2;
 # End of Bug#12798270
+#
+# Bug#12837714: ADDITIONAL NULL IN 5.6 ON GROUPED SELECT
+#
+CREATE TABLE t1 (vc varchar(1), INDEX vc_idx (vc)) ;
+INSERT INTO t1 VALUES (NULL), ('o'), (NULL), ('p'), ('c');
+FLUSH TABLE t1;
+SELECT vc FROM t1 GROUP BY vc;
+vc
+NULL
+c
+o
+p
+DROP TABLE t1;
+# End of Bug#12837714

=== modified file 'mysql-test/r/mysqltest.result'
--- a/mysql-test/r/mysqltest.result	2011-08-22 13:24:38 +0000
+++ b/mysql-test/r/mysqltest.result	2011-09-15 12:19:58 +0000
@@ -151,6 +151,10 @@ select 1146 as "after_!errno_masked_erro
 after_!errno_masked_error
 1146
 mysqltest: At line 1: query 'select 3 from t1' failed with wrong errno 1146: 'Table 'test.t1' doesn't exist', instead of 1000...
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
+ is empty
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'nonsense' at line 1
+ is empty
 garbage ;
 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
 ER_PARSE_ERROR
@@ -160,6 +164,28 @@ after_--enable_abort_on_error
 select 3 from t1 ;
 ERROR 42S02: Table 'test.t1' doesn't exist
 mysqltest: At line 1: query 'select 3 from t1' failed with wrong errno 1146: 'Table 'test.t1' doesn't exist', instead of 1064...
+garbage;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
+select 2;
+select 3;
+3
+3
+select 5;
+ERROR 42S02: Table 'test.t1' doesn't exist
+select 7;
+7
+7
+mysqltest: At line 1: End of line junk detected: "OCNE"
+connect  con1,localhost,root,,;
+select 5 from t1;
+lower
+case
+name
+abc
+xyz
+ is empty
+ is empty
+"Yes it's empty"
 hello
 hello
 ;;;;;;;;
@@ -332,7 +358,7 @@ insert into t1 values ('$dollar');
 $dollar
 `select 42`
 drop table t1;
-mysqltest: At line 1: Error running query 'failing query': 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'failing query' at line 1
+mysqltest: At line 1: query 'let $var2= `failing query`' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'failing query' at line 1
 mysqltest: At line 1: Missing required argument 'filename' to command 'source'
 mysqltest: At line 1: Could not open './non_existingFile' for reading, errno: 2
 mysqltest: In included file "MYSQLTEST_VARDIR/tmp/recursive.sql": 
@@ -863,7 +889,7 @@ mysqltest: At line 1: Could not find col
 mysqltest: At line 1: Query 'SET @A = 1' didn't return a result set
 mysqltest: At line 1: Could not find column '1 AS B' in the result of 'SELECT 1 AS A'
 value= No such row
-mysqltest: At line 1: Error running query 'SHOW COLNS FROM t1': 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COLNS FROM t1' at line 1
+mysqltest: At line 1: query 'let $value= query_get_value(SHOW COLNS FROM t1, Field, 1)' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'COLNS FROM t1' at line 1
 
 Field Type Null Key Default Extra
 a int(11) YES -><- NULL 

=== modified file 'mysql-test/r/plugin_auth.result'
--- a/mysql-test/r/plugin_auth.result	2011-09-23 12:22:58 +0000
+++ b/mysql-test/r/plugin_auth.result	2011-09-26 10:34:49 +0000
@@ -486,17 +486,13 @@ DROP USER bug12610784@localhost;
 #
 # Bug # 11766641: 59792: BIN/MYSQL -UUNKNOWN -PUNKNOWN 
 #  .-> USING PASSWORD: NO 
-# Bug #12818542: PAM: ADDING PASSWORD FOR AN ACCOUNT DISABLES PAM 
-#   AUTHENTICATION SETTINGS
-#
 # shoud contain "using password=yes"
 ERROR 1045 (28000): Access denied for user 'unknown'@'localhost' (using password: YES)
 # shoud contain "using password=no"
 ERROR 1045 (28000): Access denied for user 'unknown'@'localhost' (using password: NO)
-CREATE USER bug12610784@localhost;
-SET PASSWORD FOR bug12610784@localhost = PASSWORD('secret');
-ERROR 28000: Access denied for user 'bug12610784'@'localhost' (using password: NO)
-DROP USER bug12610784@localhost;
+# Bug #12818542: PAM: ADDING PASSWORD FOR AN ACCOUNT DISABLES PAM 
+#   AUTHENTICATION SETTINGS
+#
 CREATE USER bug12818542@localhost 
 IDENTIFIED WITH 'test_plugin_server' AS 'bug12818542_dest';
 CREATE USER bug12818542_dest@localhost 

=== modified file 'mysql-test/suite/federated/federated_plugin-master.opt'
--- a/mysql-test/suite/federated/federated_plugin-master.opt	2010-06-14 09:23:49 +0000
+++ b/mysql-test/suite/federated/federated_plugin-master.opt	2011-09-05 12:57:48 +0000
@@ -1 +1,2 @@
 --plugin_dir=$FEDERATED_PLUGIN_DIR
+--loose-federated=ON

=== modified file 'mysql-test/suite/federated/federated_plugin.result'
--- a/mysql-test/suite/federated/federated_plugin.result	2010-05-05 07:35:38 +0000
+++ b/mysql-test/suite/federated/federated_plugin.result	2011-09-05 12:57:48 +0000
@@ -0,0 +1,19 @@
+CREATE TABLE t2(a int);
+CREATE TABLE t1(a int) ENGINE=FEDERATED
+CONNECTION='mysql://root@localhost:$MASTER_MYPORT/test/t2';
+Warnings:
+Warning	1286	Unknown storage engine 'FEDERATED'
+Warning	1266	Using storage engine MyISAM for table 't1'
+DROP TABLE t1;
+INSTALL PLUGIN federated SONAME 'FEDERATED_PLUGIN';
+INSTALL PLUGIN FEDERATED SONAME 'FEDERATED_PLUGIN';
+ERROR HY000: Function 'FEDERATED' already exists
+UNINSTALL PLUGIN federated;
+INSTALL PLUGIN federated SONAME 'FEDERATED_PLUGIN';
+CREATE TABLE t1(a int) ENGINE=FEDERATED
+CONNECTION='mysql://root@localhost:$MASTER_MYPORT/test/t2';
+DROP TABLE t1;
+UNINSTALL PLUGIN federated;
+UNINSTALL PLUGIN federated;
+ERROR 42000: PLUGIN federated does not exist
+DROP TABLE t2;

=== modified file 'mysql-test/suite/federated/federated_plugin.test'
--- a/mysql-test/suite/federated/federated_plugin.test	2010-06-14 09:23:49 +0000
+++ b/mysql-test/suite/federated/federated_plugin.test	2011-09-15 11:09:24 +0000
@@ -1,24 +1,37 @@
---source include/not_windows.inc
 --source include/have_federated_plugin.inc
 
---skip federated plugin is disabled
+# Uninstall will not uninstall if ps has been used
+--disable_ps_protocol
 
-CREATE TABLE t1(a int) ENGINE=FEDERATED;
+connect (master,localhost,root,,test,$MASTER_MYPORT,);
+connect (slave,localhost,root,,test,$SLAVE_MYPORT,);
+
+connection master;
+CREATE TABLE t2(a int);
+
+connection slave;
+CREATE TABLE t1(a int) ENGINE=FEDERATED
+  CONNECTION='mysql://root@localhost:$MASTER_MYPORT/test/t2';
 DROP TABLE t1;
 
-INSTALL PLUGIN federated SONAME 'ha_federated.so';
---error 1125
-INSTALL PLUGIN FEDERATED SONAME 'ha_federated.so';
+--replace_result $FEDERATED_PLUGIN FEDERATED_PLUGIN
+eval INSTALL PLUGIN federated SONAME '$FEDERATED_PLUGIN';
+--replace_result $FEDERATED_PLUGIN FEDERATED_PLUGIN
+--error ER_UDF_EXISTS
+eval INSTALL PLUGIN FEDERATED SONAME '$FEDERATED_PLUGIN';
 
 UNINSTALL PLUGIN federated;
 
-INSTALL PLUGIN federated SONAME 'ha_federated.so';
-
-CREATE TABLE t1(a int) ENGINE=FEDERATED;
+--replace_result $FEDERATED_PLUGIN FEDERATED_PLUGIN
+eval INSTALL PLUGIN federated SONAME '$FEDERATED_PLUGIN';
 
+CREATE TABLE t1(a int) ENGINE=FEDERATED
+  CONNECTION='mysql://root@localhost:$MASTER_MYPORT/test/t2';
 DROP TABLE t1;
 
 UNINSTALL PLUGIN federated;
 --error ER_SP_DOES_NOT_EXIST
 UNINSTALL PLUGIN federated;
 
+connection master;
+DROP TABLE t2;

=== modified file 'mysql-test/suite/rpl/r/rpl_parallel_start_stop.result'
--- a/mysql-test/suite/rpl/r/rpl_parallel_start_stop.result	2011-08-19 13:04:28 +0000
+++ b/mysql-test/suite/rpl/r/rpl_parallel_start_stop.result	2011-09-26 15:39:00 +0000
@@ -59,7 +59,7 @@ set @save.slave_transaction_retries= @@g
 set @@global.slave_transaction_retries= 1;
 start slave sql_thread;
 Warnings:
-Note	1740	Temporary failed transaction retry is not supported in multi-threaded slave mode. Such failure will force the slave to stop.
+Note	1740	slave_transaction_retries is not supported in multi-threaded slave mode. In the event of a transient failure, the slave will not retry the transaction and will stop.
 include/stop_slave.inc
 create table t2 (a int);
 insert into t2 values (1);
@@ -69,7 +69,7 @@ Note	1740	UNTIL condtion is not supporte
 include/wait_for_slave_sql_to_stop.inc
 include/start_slave.inc
 Warnings:
-Note	1740	Temporary failed transaction retry is not supported in multi-threaded slave mode. Such failure will force the slave to stop.
+Note	1740	slave_transaction_retries is not supported in multi-threaded slave mode. In the event of a transient failure, the slave will not retry the transaction and will stop.
 drop table t1;
 drop table t2m;
 drop table t2;

=== 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	2011-09-06 16:34:31 +0000
+++ b/mysql-test/suite/rpl/r/rpl_slave_load_remove_tmpfile.result	2011-09-20 11:07:19 +0000
@@ -7,6 +7,8 @@ insert into t1(b) values (1);
 insert into t1(b) values (2);
 load data infile '../../std_data/rpl_loaddata.dat' into table t1;
 commit;
+call mtr.add_suppression("LOAD DATA INFILE in the slave SQL Thread can only read from --slave-load-tmpdir");
+call mtr.add_suppression("The MySQL server is running with the --slave-load-tmpdir option so it cannot execute this statement.*Error_code: 1290");
 include/wait_for_slave_sql_error.inc [errno=29, 13, 1290]
 drop table t1;
 include/sync_slave_io_with_master.inc

=== 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-09-06 16:34:31 +0000
+++ b/mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test	2011-09-20 11:07:19 +0000
@@ -55,6 +55,8 @@ connection slave;
 #                         data file is removed the server won't be able to 
 #                         resolve the realpath, ending up stating that we 
 #                         have a mismatch)
+call mtr.add_suppression("LOAD DATA INFILE in the slave SQL Thread can only read from --slave-load-tmpdir");
+call mtr.add_suppression("The MySQL server is running with the --slave-load-tmpdir option so it cannot execute this statement.*Error_code: 1290");
 --let $slave_sql_errno= 29, 13, 1290
 --source include/wait_for_slave_sql_error.inc
 

=== added file 'mysql-test/suite/stress/t/wrapper.test'
--- a/mysql-test/suite/stress/t/wrapper.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/stress/t/wrapper.test	2011-09-15 10:34:32 +0000
@@ -0,0 +1,29 @@
+#
+# This is a wrapper "pseudo" test for mtr --stress execution.
+# It should not be run directly (will be skipped)
+# Do not create a result file!
+# 
+
+if (!$MST_OPTIONS) {
+  skip Only to be run with mtr --stress;
+}
+
+# echo Running MST with options $MST_OPTIONS;
+
+perl;
+  my ($mtest)= split " ", $ENV{MYSQL_TEST};
+  open(FILE, ">", "$ENV{MYSQL_TMP_DIR}/mtest.inc") or die;
+  print FILE "let \$MYSQLTEST_BIN= $mtest;\n";
+  close FILE;
+EOF
+
+--source $MYSQL_TMP_DIR/mtest.inc
+--remove_file $MYSQL_TMP_DIR/mtest.inc
+
+exec perl mysql-stress-test.pl --mysqltest=$MYSQLTEST_BIN
+         --server-port=$MASTER_MYPORT --server-socket=$MASTER_MYSOCK
+         --server-user=root --cleanup
+         --server-logs-dir=$MYSQLTEST_VARDIR/log
+         --stress-basedir=$MYSQLTEST_VARDIR
+	 $MST_OPTIONS
+;

=== modified file 'mysql-test/t/func_str.test'
--- a/mysql-test/t/func_str.test	2011-09-22 10:42:10 +0000
+++ b/mysql-test/t/func_str.test	2011-09-26 12:27:06 +0000
@@ -1481,7 +1481,7 @@ SELECT ((rpad(1.0,2048,1)) = ('4(') ^ (0
 
 --error 1690
 SELECT
-pow((rpad(1.0,2048,1)),(b'1111111111111111111111111111111111111111111'));
+pow((rpad(10.0,2048,1)),(b'1111111111111111111111111111111111111111111'));
 SELECT ((rpad(1.0,2048,1)) + (0) ^ ('../'));
 SELECT stddev_samp(rpad(1.0,2048,1));
 SELECT ((127.1) not in ((rpad(1.0,2048,1)),(''),(-1.1)));

=== modified file 'mysql-test/t/group_by.test'
--- a/mysql-test/t/group_by.test	2011-08-30 09:01:05 +0000
+++ b/mysql-test/t/group_by.test	2011-09-26 13:48:06 +0000
@@ -1468,3 +1468,17 @@ DROP TABLE t1,t2;
 
 --echo # End of Bug#12798270
 
+--echo #
+--echo # Bug#12837714: ADDITIONAL NULL IN 5.6 ON GROUPED SELECT
+--echo #
+
+CREATE TABLE t1 (vc varchar(1), INDEX vc_idx (vc)) ;
+INSERT INTO t1 VALUES (NULL), ('o'), (NULL), ('p'), ('c');
+
+FLUSH TABLE t1;
+
+SELECT vc FROM t1 GROUP BY vc;
+
+DROP TABLE t1; 
+
+--echo # End of Bug#12837714

=== modified file 'mysql-test/t/mysql_plugin.test'
--- a/mysql-test/t/mysql_plugin.test	2011-09-23 10:55:10 +0000
+++ b/mysql-test/t/mysql_plugin.test	2011-09-26 09:19:12 +0000
@@ -45,7 +45,6 @@ use File::Basename;
   my $plugindir_ini= "$ENV{PLUGIN_DIR}/daemon_example.ini";
   my $notfound= "";
   open(FILE, ">", "$ENV{MYSQL_TMP_DIR}/mysqld.inc") or die;
-  print FILE "let \$MYSQLD= $mysqld;\n";
   print FILE "let \$MYSQLD_BASEDIR= $mysqld_basedir;\n";
   print FILE "let \$MYSQL_MY_PRINT_DEFAULTS_BASEDIR= $my_print_defaults_basedir;\n";
   if ((!-e $daemonexample_ini) || (!-r $daemonexample_ini))

=== modified file 'mysql-test/t/mysqld--defaults-file.test'
--- a/mysql-test/t/mysqld--defaults-file.test	2011-02-09 22:34:20 +0000
+++ b/mysql-test/t/mysqld--defaults-file.test	2011-09-15 12:19:58 +0000
@@ -5,21 +5,6 @@
 source include/not_embedded.inc;
 source include/not_windows.inc;
 
-# We need to use a plain "mysqld" without any other options to trigger
-# the bug. In particular, it seems that passing --bootstrap does not
-# trigger the bug. To do that, we extract the "command name" from the
-# MYSQLD_BOOTSTRAP_CMD variable and store that in a file, which we
-# then load into the test case.
-
-perl;
-  my ($mysqld)= split " ", $ENV{MYSQLD_BOOTSTRAP_CMD};
-  open(FILE, ">", "$ENV{MYSQL_TMP_DIR}/mysqld.inc") or die;
-  print FILE "let \$MYSQLD= $mysqld;\n";
-  close FILE;
-EOF
-
-source $MYSQL_TMP_DIR/mysqld.inc;
-
 # All these tests refer to configuration files that do not exist
 
 --error 1
@@ -44,4 +29,3 @@ exec $MYSQLD --defaults-file=with.ext --
 --error 1
 exec $MYSQLD --defaults-file=no_extension --print-defaults 2>&1;
 
-remove_file $MYSQL_TMP_DIR/mysqld.inc;

=== modified file 'mysql-test/t/mysqltest.test'
--- a/mysql-test/t/mysqltest.test	2011-08-22 13:24:38 +0000
+++ b/mysql-test/t/mysqltest.test	2011-09-15 12:19:58 +0000
@@ -354,6 +354,14 @@ eval select $mysql_errno as "after_!errn
 EOF
 
 # ----------------------------------------------------------------------------
+# Check backtick and query_get_value, result should be empty
+# ----------------------------------------------------------------------------
+let $empty= `garbage`;
+echo $empty is empty;
+let $empty= query_get_value(nonsense, blabla, 1);
+echo $empty is empty;
+
+# ----------------------------------------------------------------------------
 # Switch the abort on error on and check the effect on $mysql_errno
 # ----------------------------------------------------------------------------
 --error ER_PARSE_ERROR
@@ -383,6 +391,71 @@ select 3 from t1 ;
 --error 1
 --exec echo "disable_abort_on_error; enable_abort_on_error; error 1064; select 3 from t1; select 3 from t1;" | $MYSQL_TEST  2>&1
 
+# ----------------------------------------------------------------------------
+# Test --enable and --disable with ONCE
+# ----------------------------------------------------------------------------
+
+--disable_abort_on_error ONCE
+garbage;
+--disable_abort_on_error ONCE
+--remove_file DoesNotExist
+
+--disable_result_log
+select 2;
+--enable_result_log ONCE
+select 3;
+select 5;
+--enable_result_log
+
+# ----------------------------------------------------------------------------
+# Test cumulative ONCE
+# ----------------------------------------------------------------------------
+
+--disable_abort_on_error ONCE
+--disable_query_log ONCE
+select 3 from t1;
+select 7;
+
+--error 1
+--exec echo "--disable_info OCNE" | $MYSQL_TEST 2>&1
+
+--enable_connect_log ONCE
+connect (con1,localhost,root,,);
+connection default;
+disconnect con1;
+
+# ----------------------------------------------------------------------------
+# Test ONCE can be combined with --error or modifiers like lowercase
+# ----------------------------------------------------------------------------
+
+--disable_result_log ONCE
+--error ER_NO_SUCH_TABLE
+select 5 from t1;
+
+--disable_query_log ONCE
+--lowercase_result
+select "CASE" as "LOWER";
+
+--sorted_result
+--disable_query_log ONCE
+select "xyz" as name union select "abc" as name order by name desc;
+
+# ----------------------------------------------------------------------------
+# Test --error with backtick operator or query_get_value
+# ----------------------------------------------------------------------------
+
+--error 0,ER_NO_SUCH_TABLE
+let $empty= `SELECT foo from bar`;
+echo $empty is empty;
+
+--error 0,ER_BAD_FIELD_ERROR
+let $empty= query_get_value(SELECT bar as foo, baz, 1);
+echo $empty is empty;
+
+--error 0,ER_NO_SUCH_TABLE
+if (!`SELECT foo from bar`) {
+  echo "Yes it's empty";
+}
 
 # ----------------------------------------------------------------------------
 # Test comments
@@ -952,10 +1025,9 @@ while ($outer)
     --source $MYSQLTEST_VARDIR/tmp/sourced.inc
     --error ER_NO_SUCH_TABLE
     SELECT * from nowhere;
-    --disable_abort_on_error
+    --disable_abort_on_error ONCE
 # Statement giving a different error, to make sure we don't mask it
     SELECT * FROM nowhere else;
-    --enable_abort_on_error
   }
   dec $outer;
   inc $ifval;
@@ -2506,10 +2578,9 @@ INSERT INTO t1 SELECT f1 - 64 FROM t1;
 INSERT INTO t1 SELECT f1 - 128 FROM t1;
 INSERT INTO t1 SELECT f1 - 256 FROM t1;
 INSERT INTO t1 SELECT f1 - 512 FROM t1;
---disable_result_log
+--disable_result_log ONCE
 --sorted_result
 SELECT * FROM t1;
---enable_result_log
 DROP TABLE t1;
 
 # ----------------------------------------------------------------------------
@@ -2557,11 +2628,9 @@ SELECT 0 as "WILL NOT lower case ���";
 --exec $MYSQL_TEST --help 2>&1 > /dev/null
 --exec $MYSQL_TEST --version 2>&1 > /dev/null
 --enable_query_log
---disable_abort_on_error
+--disable_abort_on_error ONCE
 --error 1
 --exec $MYSQL_TEST a b c 2>&1 > /dev/null
---enable_abort_on_error
---enable_query_log
 
 # ----------------------------------------------------------------------------
 # test for query_get_value

=== modified file 'mysql-test/t/plugin_auth.test'
--- a/mysql-test/t/plugin_auth.test	2011-09-21 11:02:24 +0000
+++ b/mysql-test/t/plugin_auth.test	2011-09-26 10:34:49 +0000
@@ -540,15 +540,10 @@ connection default;
 disconnect b12610784;
 DROP USER bug12610784@localhost;
 
-
 --echo #
 --echo # Bug # 11766641: 59792: BIN/MYSQL -UUNKNOWN -PUNKNOWN 
 --echo #  .-> USING PASSWORD: NO 
 
---echo # Bug #12818542: PAM: ADDING PASSWORD FOR AN ACCOUNT DISABLES PAM 
---echo #   AUTHENTICATION SETTINGS
---echo #
-
 --echo # shoud contain "using password=yes"
 --error 1
 --exec $MYSQL -uunknown -punknown 2>&1
@@ -557,6 +552,10 @@ DROP USER bug12610784@localhost;
 --error 1
 --exec $MYSQL -uunknown 2>&1
 
+--echo # Bug #12818542: PAM: ADDING PASSWORD FOR AN ACCOUNT DISABLES PAM 
+--echo #   AUTHENTICATION SETTINGS
+--echo #
+
 CREATE USER bug12818542@localhost 
   IDENTIFIED WITH 'test_plugin_server' AS 'bug12818542_dest';
 CREATE USER bug12818542_dest@localhost 

=== modified file 'sql/item_buff.cc'
--- a/sql/item_buff.cc	2011-06-30 15:50:45 +0000
+++ b/sql/item_buff.cc	2011-09-26 13:48:06 +0000
@@ -137,16 +137,34 @@ bool Cached_item_int::cmp(void)
 bool Cached_item_field::cmp(void)
 {
   DBUG_ENTER("Cached_item_field::cmp");
-  bool tmp= field->cmp(buff) != 0;		// This is not a blob!
   DBUG_EXECUTE("info", dbug_print(););
-  if (tmp)
-    field->get_image(buff,length,field->charset());
-  if (null_value != field->is_null())
+
+  bool different= false;
+
+  if (field->is_null())
   {
-    null_value= !null_value;
-    tmp=TRUE;
+    if (!null_value)
+    {
+      different= true;
+      null_value= true;
+    }
   }
-  DBUG_RETURN(tmp);
+  else
+  {
+    if (null_value)
+    {
+      different= true;
+      null_value= false;
+      field->get_image(buff, length, field->charset());
+    }
+    else if (field->cmp(buff))                  // Not a blob: cmp() is OK
+    {
+      different= true;
+      field->get_image(buff, length, field->charset());
+    }
+  }
+
+  DBUG_RETURN(different);
 }
 
 

=== modified file 'sql/rpl_rli_pdb.cc'
--- a/sql/rpl_rli_pdb.cc	2011-08-19 13:04:28 +0000
+++ b/sql/rpl_rli_pdb.cc	2011-09-26 15:39:00 +0000
@@ -1352,7 +1352,11 @@ int wait_for_workers_to_finish(Relay_log
   DBUG_ENTER("wait_for_workers_to_finish");
 
   llstr(const_cast<Relay_log_info*>(rli)->get_event_relay_log_pos(), llbuf);
-  sql_print_information("Coordinator enter synchronization when distributes event relay-log: %s pos: %s", const_cast<Relay_log_info*>(rli)->get_event_relay_log_name(), llbuf);
+  if (global_system_variables.log_warnings > 1)
+    sql_print_information("Coordinator and workers enter synchronization procedure "
+                          "when scheduling event relay-log: %s pos: %s", 
+                          const_cast<Relay_log_info*>(rli)->get_event_relay_log_name(), 
+                          llbuf);
 
   for (uint i= 0, ret= 0; i < hash->records; i++)
   {
@@ -1406,7 +1410,10 @@ int wait_for_workers_to_finish(Relay_log
 
   if (!ignore)
   {
-    sql_print_information("Coordinator synchronized with Workers, waited entries: %d, cant_sync: %d", ret, cant_sync);
+    if (global_system_variables.log_warnings > 1)
+      sql_print_information("Coordinator synchronized with Workers, "
+                            "waited entries: %d, cant_sync: %d", 
+                            ret, cant_sync);
 
     const_cast<Relay_log_info*>(rli)->mts_group_status= Relay_log_info::MTS_NOT_IN_GROUP;
   }
@@ -1801,10 +1808,12 @@ int slave_worker_exec_job(Slave_worker *
 err:
   if (error)
   {
-    sql_print_information("Worker %lu is exiting: killed %i, error %i, "
-                          "running_status %d",
-                          worker->id, thd->killed, thd->is_error(),
-                          worker->running_status);
+
+    if (global_system_variables.log_warnings > 1)
+      sql_print_information("Worker %lu is exiting: killed %i, error %i, "
+                            "running_status %d",
+                            worker->id, thd->killed, thd->is_error(),
+                            worker->running_status);
     worker->slave_worker_ends_group(ev, error);
   }
   

=== modified file 'sql/rpl_slave.cc'
--- a/sql/rpl_slave.cc	2011-09-15 17:18:21 +0000
+++ b/sql/rpl_slave.cc	2011-09-26 15:39:00 +0000
@@ -3871,12 +3871,13 @@ pthread_handler_t handle_slave_worker(vo
   mysql_mutex_lock(&w->jobs_lock);
 
   w->running_status= Slave_worker::NOT_RUNNING;
-  sql_print_information("Worker %lu statistics: "
-                        "events processed = %lu "
-                        "hungry waits = %lu "
-                        "priv queue overfills = %llu ",
-                        w->id, w->events_done, w->wq_size_waits_cnt,
-                        w->jobs.waited_overfill);
+  if (global_system_variables.log_warnings > 1)
+    sql_print_information("Worker %lu statistics: "
+                          "events processed = %lu "
+                          "hungry waits = %lu "
+                          "priv queue overfills = %llu ",
+                          w->id, w->events_done, w->wq_size_waits_cnt,
+                          w->jobs.waited_overfill);
   mysql_cond_signal(&w->jobs_cond);  // famous last goodbye
 
   mysql_mutex_unlock(&w->jobs_lock);
@@ -4517,8 +4518,9 @@ void slave_stop_workers(Relay_log_info *
 
     mysql_mutex_unlock(&w->jobs_lock);
 
-    sql_print_information("Notifying Worker %lu to exit, thd %p", w->id,
-                          w->info_thd);
+    if (global_system_variables.log_warnings > 1)
+      sql_print_information("Notifying Worker %lu to exit, thd %p", w->id,
+                            w->info_thd);
   }
 
   thd_proc_info(thd, "Waiting for workers to exit");
@@ -4550,15 +4552,16 @@ void slave_stop_workers(Relay_log_info *
     delete w;
   }
 
-  sql_print_information("MTS coordinator statistics: "
-                        "events processed = %lu "
-                        "Worker queues filled over overrun level = %lu "
-                        "waited due a Worker queue full = %lu "
-                        "waited due the total size = %lu "
-                        "sleept when Workers occupied = %lu ",
-                        rli->mts_events_assigned, rli->mts_wq_overrun_cnt,
-                        rli->mts_wq_overfill_cnt, rli->wq_size_waits_cnt,
-                        rli->mts_wq_no_underrun_cnt);
+  if (global_system_variables.log_warnings > 1)
+    sql_print_information("Multi-threaded slave statistics: "
+                          "events processed = %lu ;"
+                          "worker queues filled over overrun level = %lu ;"
+                          "waited due a Worker queue full = %lu ;"
+                          "waited due the total size = %lu ;"
+                          "slept when Workers occupied = %lu ",
+                          rli->mts_events_assigned, rli->mts_wq_overrun_cnt,
+                          rli->mts_wq_overfill_cnt, rli->wq_size_waits_cnt,
+                          rli->mts_wq_no_underrun_cnt);
 
   DBUG_ASSERT(rli->pending_jobs == 0);
   DBUG_ASSERT(rli->mts_pending_jobs_size == 0);
@@ -6800,8 +6803,9 @@ int start_slave(THD* thd , Master_info*
           push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
                               ER_MTS_FEATURE_IS_NOT_SUPPORTED,
                               ER(ER_MTS_FEATURE_IS_NOT_SUPPORTED),
-                              "Temporary failed transaction retry",
-                              "Such failure will force the slave to stop.");
+                              "slave_transaction_retries",
+                              "In the event of a transient failure, the slave will "
+                              "not retry the transaction and will stop.");
         }
       }
       else if (thd->lex->mi.pos || thd->lex->mi.relay_log_pos)

=== modified file 'sql/table.cc'
--- a/sql/table.cc	2011-08-26 13:26:33 +0000
+++ b/sql/table.cc	2011-09-26 13:48:06 +0000
@@ -1981,9 +1981,6 @@ int open_table_from_share(THD *thd, TABL
   {
     memcpy(outparam->record[0], share->default_values, share->rec_buff_length);
     memcpy(outparam->record[1], share->default_values, share->null_bytes);
-    if (records > 2)
-      memcpy(outparam->record[1], share->default_values,
-             share->rec_buff_length);
   }
 #endif
 

=== modified file 'storage/innobase/log/log0log.c'
--- a/storage/innobase/log/log0log.c	2011-08-10 06:26:39 +0000
+++ b/storage/innobase/log/log0log.c	2011-09-23 13:49:13 +0000
@@ -3487,15 +3487,20 @@ log_print(
 
 	current_time = time(NULL);
 
-	time_elapsed = 0.001 + difftime(current_time,
-					log_sys->last_printout_time);
+	time_elapsed = difftime(current_time,
+				log_sys->last_printout_time);
+
+	if (time_elapsed <= 0) {
+		time_elapsed = 1;
+	}
+
 	fprintf(file,
 		"%lu pending log writes, %lu pending chkp writes\n"
 		"%lu log i/o's done, %.2f log i/o's/second\n",
 		(ulong) log_sys->n_pending_writes,
 		(ulong) log_sys->n_pending_checkpoint_writes,
 		(ulong) log_sys->n_log_ios,
-		((log_sys->n_log_ios - log_sys->n_log_ios_old)
+		((double)(log_sys->n_log_ios - log_sys->n_log_ios_old)
 		 / time_elapsed));
 
 	log_sys->n_log_ios_old = log_sys->n_log_ios;

=== modified file 'storage/innobase/row/row0purge.c'
--- a/storage/innobase/row/row0purge.c	2011-09-21 00:24:59 +0000
+++ b/storage/innobase/row/row0purge.c	2011-09-26 07:19:04 +0000
@@ -516,7 +516,7 @@ row_purge_upd_exist_or_extern_func(
 
 	ut_ad(node);
 
-	if ((node->rec_type == TRX_UNDO_UPD_DEL_REC)
+	if (node->rec_type == TRX_UNDO_UPD_DEL_REC
 	    || (node->cmpl_info & UPD_NODE_NO_ORD_CHANGE)) {
 
 		goto skip_secondaries;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk branch (marc.alff:3421 to 3422) Marc Alff28 Sep