MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Matthias Leich Date:June 9 2009 7:05pm
Subject:bzr commit into mysql-5.1-bugteam branch (Matthias.Leich:2932)
View as plain text  
#At file:///work2/5.1/mysql-5.1-bugteam-push/ based on revid:matthias.leich@stripped

 2932 Matthias Leich	2009-06-09 [merge]
      Merge of latest changes into GCA tree, no conflicts

    added:
      mysql-test/include/no_valgrind_without_big.inc
    modified:
      client/mysqltest.cc
      mysql-test/collections/default.push
      mysql-test/lib/mtr_report.pm
      mysql-test/mysql-test-run.pl
      mysql-test/r/mysqltest.result
      mysql-test/suite/funcs_1/datadict/charset_collation.inc
      mysql-test/suite/funcs_1/datadict/is_key_column_usage.inc
      mysql-test/suite/funcs_1/datadict/is_routines.inc
      mysql-test/suite/funcs_1/datadict/is_schemata.inc
      mysql-test/suite/funcs_1/datadict/is_tables.inc
      mysql-test/suite/funcs_1/datadict/is_triggers.inc
      mysql-test/suite/funcs_1/datadict/is_views.inc
      mysql-test/suite/funcs_1/datadict/processlist_priv.inc
      mysql-test/suite/funcs_1/datadict/statistics.inc
      mysql-test/suite/funcs_1/datadict/table_constraints.inc
      mysql-test/suite/funcs_1/datadict/tables.inc
      mysql-test/suite/funcs_1/datadict/tables1.inc
      mysql-test/suite/funcs_1/storedproc/storedproc_06.inc
      mysql-test/suite/funcs_1/storedproc/storedproc_10.inc
      mysql-test/suite/funcs_1/t/is_basics_mixed.test
      mysql-test/suite/funcs_1/t/is_column_privileges.test
      mysql-test/suite/funcs_1/t/is_column_privileges_is_mysql_test.test
      mysql-test/suite/funcs_1/t/is_columns.test
      mysql-test/suite/funcs_1/t/is_schema_privileges.test
      mysql-test/suite/funcs_1/t/is_schema_privileges_is_mysql_test.test
      mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test
      mysql-test/suite/funcs_1/t/is_statistics.test
      mysql-test/suite/funcs_1/t/is_table_constraints.test
      mysql-test/suite/funcs_1/t/is_table_privileges.test
      mysql-test/suite/funcs_1/t/is_user_privileges.test
      mysql-test/suite/funcs_1/t/myisam_views.test
      mysql-test/suite/funcs_1/t/storedproc.test
      mysql-test/suite/funcs_1/triggers/triggers_03.inc
      mysql-test/suite/funcs_1/triggers/triggers_03e_columns.inc
      mysql-test/suite/funcs_1/triggers/triggers_03e_db_level.inc
      mysql-test/suite/funcs_1/triggers/triggers_03e_db_table_mix.inc
      mysql-test/suite/funcs_1/triggers/triggers_03e_definer.inc
      mysql-test/suite/funcs_1/triggers/triggers_03e_global_db_mix.inc
      mysql-test/suite/funcs_1/triggers/triggers_03e_prepare.inc
      mysql-test/suite/funcs_1/triggers/triggers_03e_table_level.inc
      mysql-test/suite/funcs_1/triggers/triggers_03e_transaction.inc
      mysql-test/suite/funcs_1/triggers/triggers_0407.inc
      mysql-test/suite/funcs_1/triggers/triggers_08.inc
      mysql-test/t/connect.test
      mysql-test/t/count_distinct3.test
      mysql-test/t/multi_update2.test
      mysql-test/t/mysqltest.test
      sql/field.cc
      sql/field_conv.cc
      sql/gstream.cc
      sql/handler.cc
      sql/item_cmpfunc.cc
      sql/item_func.cc
      sql/item_subselect.cc
      sql/item_sum.cc
      sql/item_timefunc.cc
      sql/log_event.cc
      sql/mysqld.cc
      sql/opt_range.cc
      sql/opt_sum.cc
      sql/slave.cc
      sql/sql_class.cc
      sql/sql_class.h
      sql/sql_connect.cc
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc	2009-06-06 16:41:40 +0000
+++ b/client/mysqltest.cc	2009-06-08 12:55:37 +0000
@@ -280,6 +280,7 @@ enum enum_commands {
   Q_SEND_QUIT, Q_CHANGE_USER, Q_MKDIR, Q_RMDIR,
   Q_LIST_FILES, Q_LIST_FILES_WRITE_FILE, Q_LIST_FILES_APPEND_FILE,
   Q_SEND_SHUTDOWN, Q_SHUTDOWN_SERVER,
+  Q_MOVE_FILE,
 
   Q_UNKNOWN,			       /* Unknown command.   */
   Q_COMMENT,			       /* Comments, ignored. */
@@ -376,6 +377,7 @@ const char *command_names[]=
   "list_files_append_file",
   "send_shutdown",
   "shutdown_server",
+  "move_file",
 
   0
 };
@@ -966,6 +968,7 @@ void check_command_args(struct st_comman
   for (i= 0; i < num_args; i++)
   {
     const struct command_arg *arg= &args[i];
+    char delimiter;
 
     switch (arg->type) {
       /* A string */
@@ -974,8 +977,15 @@ void check_command_args(struct st_comman
       while (*ptr && *ptr == ' ')
         ptr++;
       start= ptr;
-      /* Find end of arg, terminated by "delimiter_arg" */
-      while (*ptr && *ptr != delimiter_arg)
+      delimiter = delimiter_arg;
+      /* If start of arg is ' ` or " search to matching quote end instead */
+      if (*ptr && strchr ("'`\"", *ptr))
+      {
+	delimiter= *ptr;
+	start= ++ptr;
+      }
+      /* Find end of arg, terminated by "delimiter" */
+      while (*ptr && *ptr != delimiter)
         ptr++;
       if (ptr > start)
       {
@@ -987,6 +997,11 @@ void check_command_args(struct st_comman
         /* Empty string */
         init_dynamic_string(arg->ds, "", 0, 0);
       }
+      /* Find real end of arg, terminated by "delimiter_arg" */
+      /* This will do nothing if arg was not closed by quotes */
+      while (*ptr && *ptr != delimiter_arg)
+        ptr++;      
+
       command->last_argument= (char*)ptr;
 
       /* Step past the delimiter */
@@ -1798,7 +1813,7 @@ void check_result()
           log_file.file_name(), reject_file, errno);
 
     show_diff(NULL, result_file_name, reject_file);
-    die(mess);
+    die("%s", mess);
     break;
   }
   default: /* impossible */
@@ -2895,6 +2910,42 @@ void do_copy_file(struct st_command *com
 
 /*
   SYNOPSIS
+  do_move_file
+  command	command handle
+
+  DESCRIPTION
+  move_file <from_file> <to_file>
+  Move <from_file> to <to_file>
+*/
+
+void do_move_file(struct st_command *command)
+{
+  int error;
+  static DYNAMIC_STRING ds_from_file;
+  static DYNAMIC_STRING ds_to_file;
+  const struct command_arg move_file_args[] = {
+    { "from_file", ARG_STRING, TRUE, &ds_from_file, "Filename to move from" },
+    { "to_file", ARG_STRING, TRUE, &ds_to_file, "Filename to move to" }
+  };
+  DBUG_ENTER("do_move_file");
+
+  check_command_args(command, command->first_argument,
+                     move_file_args,
+                     sizeof(move_file_args)/sizeof(struct command_arg),
+                     ' ');
+
+  DBUG_PRINT("info", ("Move %s to %s", ds_from_file.str, ds_to_file.str));
+  error= (my_rename(ds_from_file.str, ds_to_file.str,
+                    MYF(0)) != 0);
+  handle_command_error(command, error);
+  dynstr_free(&ds_from_file);
+  dynstr_free(&ds_to_file);
+  DBUG_VOID_RETURN;
+}
+
+
+/*
+  SYNOPSIS
   do_chmod_file
   command	command handle
 
@@ -4550,7 +4601,7 @@ void select_connection(struct st_command
   };
   check_command_args(command, command->first_argument, connection_args,
                      sizeof(connection_args)/sizeof(struct command_arg),
-                     ',');
+                     ' ');
 
   DBUG_PRINT("info", ("changing connection: %s", ds_connection.str));
   select_connection_name(ds_connection.str);
@@ -7684,6 +7735,7 @@ int main(int argc, char **argv)
       case Q_CHANGE_USER: do_change_user(command); break;
       case Q_CAT_FILE: do_cat_file(command); break;
       case Q_COPY_FILE: do_copy_file(command); break;
+      case Q_MOVE_FILE: do_move_file(command); break;
       case Q_CHMOD_FILE: do_chmod_file(command); break;
       case Q_PERL: do_perl(command); break;
       case Q_DELIMITER:

=== modified file 'mysql-test/collections/default.push'
--- a/mysql-test/collections/default.push	2009-02-24 11:53:34 +0000
+++ b/mysql-test/collections/default.push	2009-06-03 10:46:04 +0000
@@ -1,5 +1,5 @@
-perl mysql-test-run.pl --timer --force --comment=n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental
-perl mysql-test-run.pl --timer --force --comment=ps_row --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental
-perl mysql-test-run.pl --timer --force --comment=embedded --embedded --experimental=collections/default.experimental
-perl mysql-test-run.pl --timer --force --comment=rpl_binlog_row --suite=rpl,binlog --mysqld=--binlog-format=row --experimental=collections/default.experimental
-perl mysql-test-run.pl --timer --force --comment=funcs_1 --suite=funcs_1 --experimental=collections/default.experimental
+perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental
+perl mysql-test-run.pl --timer --force --parallel=auto --comment=ps_row --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental
+perl mysql-test-run.pl --timer --force --parallel=auto --comment=embedded --embedded --experimental=collections/default.experimental
+perl mysql-test-run.pl --timer --force --parallel=auto --comment=rpl_binlog_row --suite=rpl,binlog --mysqld=--binlog-format=row --experimental=collections/default.experimental
+perl mysql-test-run.pl --timer --force --parallel=auto --comment=funcs_1 --suite=funcs_1 --experimental=collections/default.experimental

=== added file 'mysql-test/include/no_valgrind_without_big.inc'
--- a/mysql-test/include/no_valgrind_without_big.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/no_valgrind_without_big.inc	2009-06-09 14:36:14 +0000
@@ -0,0 +1,12 @@
+# include/no_valgrind_without_big.inc
+#
+# If we are running with Valgrind ($VALGRIND_TEST <> 0) than the resource
+# consumption (storage space needed, runtime ...) will be extreme.
+# Therefore we require that the option "--big-test" is also set.
+#
+
+if (`SELECT $VALGRIND_TEST <> 0 AND '$BIG_TEST' = ''`)
+{
+   --skip Need "--big-test" when running with Valgrind
+}
+

=== modified file 'mysql-test/lib/mtr_report.pm'
--- a/mysql-test/lib/mtr_report.pm	2009-04-23 11:35:02 +0000
+++ b/mysql-test/lib/mtr_report.pm	2009-06-02 08:00:45 +0000
@@ -71,6 +71,8 @@ sub _mtr_report_test_name ($) {
 
   print _name(), _timestamp();
   printf "%-40s ", $tname;
+  my $worker = $tinfo->{worker};
+  printf "w$worker " if $worker;
 
   return $tname;
 }
@@ -219,8 +221,8 @@ sub mtr_report_test ($) {
 }
 
 
-sub mtr_report_stats ($) {
-  my $tests= shift;
+sub mtr_report_stats ($;$) {
+  my ($tests, $dont_error)= @_;
 
   # ----------------------------------------------------------------------
   # Find out how we where doing
@@ -372,7 +374,7 @@ sub mtr_report_stats ($) {
 
   if ( $tot_failed != 0 || $found_problems)
   {
-    mtr_error("there were failing test cases");
+    mtr_error("there were failing test cases") unless $dont_error;
   }
 }
 

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2009-05-25 20:58:31 +0000
+++ b/mysql-test/mysql-test-run.pl	2009-06-03 10:46:04 +0000
@@ -313,7 +313,7 @@ sub main {
 
   #######################################################################
   my $num_tests= @$tests;
-  if ( not defined $opt_parallel ) {
+  if ( $opt_parallel eq "auto" ) {
     # Try to find a suitable value for number of workers
     my $sys_info= My::SysInfo->new();
 
@@ -528,6 +528,8 @@ sub run_test_server ($$$) {
 	    elsif ($opt_max_test_fail > 0 and
 		   $num_failed_test >= $opt_max_test_fail) {
 	      $suite_timeout_proc->kill();
+	      push(@$completed, $result);
+	      mtr_report_stats($completed, 1);
 	      mtr_report("Too many tests($num_failed_test) failed!",
 			 "Terminating...");
 	      return undef;
@@ -659,6 +661,7 @@ sub run_test_server ($$$) {
     # ----------------------------------------------------
     if ( ! $suite_timeout_proc->wait_one(0) )
     {
+      mtr_report_stats($completed, 1);
       mtr_report("Test suite timeout! Terminating...");
       return undef;
     }
@@ -723,6 +726,8 @@ sub run_worker ($) {
       delete($test->{'comment'});
       delete($test->{'logfile'});
 
+      $test->{worker} = $thread_num if $opt_parallel > 1;
+
       run_testcase($test);
       #$test->{result}= 'MTR_RES_PASSED';
       # Send it back, now with results set
@@ -790,7 +795,7 @@ sub command_line_setup {
              'vs-config'                => \$opt_vs_config,
 
 	     # Max number of parallel threads to use
-	     'parallel=i'               => \$opt_parallel,
+	     'parallel=s'               => \$opt_parallel,
 
              # Config file to use as template for all tests
 	     'defaults-file=s'          => \&collect_option,
@@ -1130,9 +1135,9 @@ sub command_line_setup {
   # --------------------------------------------------------------------------
   # Check parallel value
   # --------------------------------------------------------------------------
-  if ($opt_parallel < 1)
+  if ($opt_parallel ne "auto" && $opt_parallel < 1)
   {
-    mtr_error("0 or negative parallel value makes no sense, use positive number");
+    mtr_error("0 or negative parallel value makes no sense, use 'auto' or positive number");
   }
 
   # --------------------------------------------------------------------------
@@ -5197,6 +5202,7 @@ Misc options
   fast                  Run as fast as possible, dont't wait for servers
                         to shutdown etc.
   parallel=N            Run tests in N parallel threads (default=1)
+                        Use parallel=auto for auto-setting of N
   repeat=N              Run each test N number of times
   retry=N               Retry tests that fail N times, limit number of failures
                         to $opt_retry_failure

=== modified file 'mysql-test/r/mysqltest.result'
--- a/mysql-test/r/mysqltest.result	2009-03-06 14:56:17 +0000
+++ b/mysql-test/r/mysqltest.result	2009-05-27 20:54:40 +0000
@@ -545,6 +545,8 @@ mysqltest: At line 1: Failed to open fil
 mysqltest: At line 1: Missing required argument 'filename' to command 'file_exists'
 mysqltest: At line 1: Missing required argument 'from_file' to command 'copy_file'
 mysqltest: At line 1: Missing required argument 'to_file' to command 'copy_file'
+mysqltest: At line 1: Missing required argument 'from_file' to command 'move_file'
+mysqltest: At line 1: Missing required argument 'to_file' to command 'move_file'
 mysqltest: At line 1: Missing required argument 'mode' to command 'chmod'
 mysqltest: At line 1: You must write a 4 digit octal number for mode
 mysqltest: At line 1: You must write a 4 digit octal number for mode
@@ -697,6 +699,7 @@ statement="SHOW COLUMNS FROM t1" row_num
 statement=SHOW COLUMNS FROM t1 row_number=1, column_name=Default, Value=NULL
 value= ->A B<-
 value= 1
+value= 2
 mysqltest: At line 1: query_get_value - argument list started with '(' must be ended with ')'
 mysqltest: At line 1: Missing required argument 'query' to command 'query_get_value'
 mysqltest: At line 1: Missing required argument 'column name' to command 'query_get_value'

=== modified file 'mysql-test/suite/funcs_1/datadict/charset_collation.inc'
--- a/mysql-test/suite/funcs_1/datadict/charset_collation.inc	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/datadict/charset_collation.inc	2009-06-09 16:09:16 +0000
@@ -61,7 +61,6 @@ DROP USER dbdict_test@localhost;
 CREATE USER dbdict_test@localhost;
 
 --echo # Establish connection con (user=dbdict_test)
-let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
 connect (con,localhost,dbdict_test,,);
 ################################################################################

=== modified file 'mysql-test/suite/funcs_1/datadict/is_key_column_usage.inc'
--- a/mysql-test/suite/funcs_1/datadict/is_key_column_usage.inc	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/datadict/is_key_column_usage.inc	2009-06-09 16:09:16 +0000
@@ -126,7 +126,6 @@ ORDER BY constraint_catalog, constraint_
 eval $select;
 
 --echo # Establish connection testuser1 (user=testuser1)
-let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
 connect (testuser1, localhost, testuser1, , db_datadict);
 eval $select;

=== modified file 'mysql-test/suite/funcs_1/datadict/is_routines.inc'
--- a/mysql-test/suite/funcs_1/datadict/is_routines.inc	2009-04-01 08:59:10 +0000
+++ b/mysql-test/suite/funcs_1/datadict/is_routines.inc	2009-06-09 16:09:16 +0000
@@ -179,7 +179,6 @@ GRANT EXECUTE ON db_datadict_2.* TO 'tes
 FLUSH PRIVILEGES;
 
 --echo # Establish connection testuser1 (user=testuser1)
-let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
 connect (testuser1, localhost, testuser1, , db_datadict);
 --replace_column 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss"

=== modified file 'mysql-test/suite/funcs_1/datadict/is_schemata.inc'
--- a/mysql-test/suite/funcs_1/datadict/is_schemata.inc	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/datadict/is_schemata.inc	2009-06-09 16:09:16 +0000
@@ -104,7 +104,6 @@ eval $my_select;
 eval $my_show;
 
 --echo # Establish connection testuser1 (user=testuser1)
-let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
 connect (testuser1, localhost, testuser1, , db_datadict_1);
 # Shows db_datadict_1

=== modified file 'mysql-test/suite/funcs_1/datadict/is_tables.inc'
--- a/mysql-test/suite/funcs_1/datadict/is_tables.inc	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/datadict/is_tables.inc	2009-06-09 16:09:16 +0000
@@ -130,7 +130,6 @@ WHERE table_schema = 'db_datadict' ORDER
 let $my_show = SHOW TABLES FROM db_datadict;
 
 --echo # Establish connection testuser1 (user=testuser1)
-let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
 connect (testuser1, localhost, testuser1, , db_datadict);
 # tb2 is not granted to anyone

=== modified file 'mysql-test/suite/funcs_1/datadict/is_triggers.inc'
--- a/mysql-test/suite/funcs_1/datadict/is_triggers.inc	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/datadict/is_triggers.inc	2009-06-09 16:09:16 +0000
@@ -122,7 +122,6 @@ let $my_select = SELECT * FROM informati
 WHERE trigger_name = 'trg1';
 let $my_show =   SHOW TRIGGERS FROM db_datadict;
 --echo # Establish connection testuser1 (user=testuser1)
-let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
 connect (testuser1, localhost, testuser1, , db_datadict);
 --replace_result $engine_type <engine_type>

=== modified file 'mysql-test/suite/funcs_1/datadict/is_views.inc'
--- a/mysql-test/suite/funcs_1/datadict/is_views.inc	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/datadict/is_views.inc	2009-06-09 16:09:16 +0000
@@ -108,7 +108,6 @@ WHERE table_schema = 'db_datadict' ORDER
 eval $select;
 
 --echo # Establish connection testuser1 (user=testuser1)
-let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
 connect (testuser1, localhost, testuser1, , test);
 eval $select;

=== modified file 'mysql-test/suite/funcs_1/datadict/processlist_priv.inc'
--- a/mysql-test/suite/funcs_1/datadict/processlist_priv.inc	2008-08-21 14:38:49 +0000
+++ b/mysql-test/suite/funcs_1/datadict/processlist_priv.inc	2009-05-27 08:54:59 +0000
@@ -212,7 +212,7 @@ GRANT PROCESS ON *.* TO ''@'localhost';
 --echo     anonymous user with PROCESS privilege
 --echo     SHOW/SELECT shows all processes/threads.
 --echo ####################################################################################
-connect (anonymous1,localhost,'',,information_schema);
+connect (anonymous1,localhost,"''",,information_schema);
 SHOW GRANTS;
 --replace_column 1 ID 3 HOST_NAME 6 TIME
 SHOW processlist;
@@ -253,7 +253,7 @@ REVOKE PROCESS ON *.* FROM ''@'localhost
 
 --echo ####################################################################################
 --echo 7.1 New connection (anonymous2,localhost,'',,information_schema)
-connect (anonymous2,localhost,'',,information_schema);
+connect (anonymous2,localhost,"''",,information_schema);
 --echo     The anonymous user has no more the PROCESS privilege
 --echo     Again only the processes of the anonymous user are visible.
 --echo ####################################################################################

=== modified file 'mysql-test/suite/funcs_1/datadict/statistics.inc'
--- a/mysql-test/suite/funcs_1/datadict/statistics.inc	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/datadict/statistics.inc	2009-06-09 16:09:16 +0000
@@ -42,7 +42,6 @@ ORDER BY table_schema, table_name, index
 eval $my_select;
 
 --echo # Establish connection testuser1 (user=testuser1)
-let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
 connect (testuser1,localhost,testuser1,,db_datadict);
 --replace_column 10 #CARD#

=== modified file 'mysql-test/suite/funcs_1/datadict/table_constraints.inc'
--- a/mysql-test/suite/funcs_1/datadict/table_constraints.inc	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/datadict/table_constraints.inc	2009-06-09 16:09:16 +0000
@@ -33,7 +33,6 @@ ORDER BY table_schema,table_name,constra
 eval $my_select;
 
 --echo # Establish connection testuser1 (user=testuser1)
-let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
 connect (testuser1,localhost,testuser1,,db_datadict);
 eval $my_select;

=== modified file 'mysql-test/suite/funcs_1/datadict/tables.inc'
--- a/mysql-test/suite/funcs_1/datadict/tables.inc	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/datadict/tables.inc	2009-06-09 16:09:16 +0000
@@ -37,7 +37,6 @@ CREATE USER testuser1@localhost;
 GRANT SELECT ON test1.* TO testuser1@localhost;
 
 --echo # Establish connection testuser1 (user=testuser1)
-let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
 connect (testuser1,localhost,testuser1,,test1);
 --source suite/funcs_1/datadict/tables2.inc

=== modified file 'mysql-test/suite/funcs_1/datadict/tables1.inc'
--- a/mysql-test/suite/funcs_1/datadict/tables1.inc	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/datadict/tables1.inc	2009-06-09 16:09:16 +0000
@@ -27,7 +27,6 @@ CREATE USER testuser1@localhost;
 GRANT SELECT ON test1.* TO testuser1@localhost;
 
 --echo # Establish connection testuser1 (user=testuser1)
-let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
 connect (testuser1,localhost,testuser1,,test1);
 --source suite/funcs_1/datadict/tables2.inc

=== modified file 'mysql-test/suite/funcs_1/storedproc/storedproc_06.inc'
--- a/mysql-test/suite/funcs_1/storedproc/storedproc_06.inc	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/storedproc/storedproc_06.inc	2009-06-09 16:09:16 +0000
@@ -53,7 +53,6 @@ flush privileges;
 DROP PROCEDURE IF EXISTS sp1;
 --enable_warnings
 
-let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
 connect (user1a, localhost, user_1, , db_storedproc_1);
 --source suite/funcs_1/include/show_connection.inc

=== modified file 'mysql-test/suite/funcs_1/storedproc/storedproc_10.inc'
--- a/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc	2009-06-09 16:09:16 +0000
@@ -58,7 +58,6 @@ GRANT CREATE ROUTINE ON db_storedproc.*
 GRANT SELECT         ON db_storedproc.* TO 'user_2'@'localhost';
 FLUSH PRIVILEGES;
 
-let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
 connect (user2_1, localhost, user_1, , db_storedproc);
 --source suite/funcs_1/include/show_connection.inc

=== modified file 'mysql-test/suite/funcs_1/t/is_basics_mixed.test'
--- a/mysql-test/suite/funcs_1/t/is_basics_mixed.test	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/t/is_basics_mixed.test	2009-06-09 16:09:16 +0000
@@ -55,7 +55,6 @@ DROP   USER 'testuser1'@'localhost';
 CREATE USER 'testuser1'@'localhost';
 # Low privileged user
 --echo # Establish connection testuser1 (user=testuser1)
-let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
 connect (testuser1, localhost, testuser1, , test);
 SELECT DATABASE();

=== modified file 'mysql-test/suite/funcs_1/t/is_column_privileges.test'
--- a/mysql-test/suite/funcs_1/t/is_column_privileges.test	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/t/is_column_privileges.test	2009-06-09 16:09:16 +0000
@@ -132,7 +132,6 @@ WITH GRANT OPTION;
 eval $select;
 
 --echo # Establish connection testuser1 (user=testuser1)
-let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
 connect (testuser1, localhost, testuser1, , db_datadict);
 eval $select;

=== modified file 'mysql-test/suite/funcs_1/t/is_column_privileges_is_mysql_test.test'
--- a/mysql-test/suite/funcs_1/t/is_column_privileges_is_mysql_test.test	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/t/is_column_privileges_is_mysql_test.test	2009-06-09 16:09:16 +0000
@@ -46,7 +46,6 @@ eval $my_show2;
 eval $my_show3;
 
 --echo # Establish connection testuser1 (user=testuser1)
-let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
 connect (testuser1, localhost, testuser1, , db_datadict);
 eval $my_select;

=== modified file 'mysql-test/suite/funcs_1/t/is_columns.test'
--- a/mysql-test/suite/funcs_1/t/is_columns.test	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/t/is_columns.test	2009-06-09 16:09:16 +0000
@@ -148,7 +148,6 @@ eval $my_show2;
 eval $my_show3;
 
 --echo # Establish connection testuser1 (user=testuser1)
-let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
 connect (testuser1, localhost, testuser1, , db_datadict);
 --source suite/funcs_1/datadict/datadict_bug_12777.inc

=== modified file 'mysql-test/suite/funcs_1/t/is_schema_privileges.test'
--- a/mysql-test/suite/funcs_1/t/is_schema_privileges.test	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/t/is_schema_privileges.test	2009-06-09 16:09:16 +0000
@@ -116,7 +116,6 @@ let $show_testuser1 = SHOW GRANTS FOR 't
 let $show_testuser2 = SHOW GRANTS FOR 'testuser2'@'localhost';
 
 --echo # Establish connection testuser1 (user=testuser1)
-let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
 connect (testuser1, localhost, testuser1, , test);
 GRANT SELECT ON db_datadict_4.*  TO 'testuser2'@'localhost';

=== modified file 'mysql-test/suite/funcs_1/t/is_schema_privileges_is_mysql_test.test'
--- a/mysql-test/suite/funcs_1/t/is_schema_privileges_is_mysql_test.test	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/t/is_schema_privileges_is_mysql_test.test	2009-06-09 16:09:16 +0000
@@ -46,7 +46,6 @@ eval $my_show2;
 eval $my_show3;
 
 --echo # Establish connection testuser1 (user=testuser1)
-let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
 connect (testuser1, localhost, testuser1, , db_datadict);
 eval $my_select;

=== modified file 'mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test'
--- a/mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test	2009-06-09 16:09:16 +0000
@@ -46,7 +46,6 @@ eval $my_show2;
 eval $my_show3;
 
 --echo # Establish connection testuser1 (user=testuser1)
-let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
 connect (testuser1, localhost, testuser1, , db_datadict);
 eval $my_select;

=== modified file 'mysql-test/suite/funcs_1/t/is_statistics.test'
--- a/mysql-test/suite/funcs_1/t/is_statistics.test	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/t/is_statistics.test	2009-06-09 16:09:16 +0000
@@ -140,7 +140,6 @@ eval $my_show1;
 eval $my_show2;
 
 --echo # Establish connection testuser1 (user=testuser1)
-let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
 connect (testuser1, localhost, testuser1, , test);
 # nothing visible for testuser1

=== modified file 'mysql-test/suite/funcs_1/t/is_table_constraints.test'
--- a/mysql-test/suite/funcs_1/t/is_table_constraints.test	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/t/is_table_constraints.test	2009-06-09 16:09:16 +0000
@@ -132,7 +132,6 @@ eval $my_show1;
 eval $my_show2;
 
 --echo # Establish connection testuser1 (user=testuser1)
-let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
 connect (testuser1, localhost, testuser1, , db_datadict);
 SHOW GRANTS FOR 'testuser1'@'localhost';

=== modified file 'mysql-test/suite/funcs_1/t/is_table_privileges.test'
--- a/mysql-test/suite/funcs_1/t/is_table_privileges.test	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/t/is_table_privileges.test	2009-06-09 16:09:16 +0000
@@ -116,7 +116,6 @@ WHERE table_name LIKE 'tb%'
 ORDER BY grantee,table_schema,table_name,privilege_type;
 
 --echo # Establish connection testuser1 (user=testuser1)
-let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
 connect (testuser1, localhost, testuser1, , db_datadict);
 --replace_result $other_engine_type <other_engine_type>

=== modified file 'mysql-test/suite/funcs_1/t/is_user_privileges.test'
--- a/mysql-test/suite/funcs_1/t/is_user_privileges.test	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/t/is_user_privileges.test	2009-06-09 16:09:16 +0000
@@ -114,7 +114,6 @@ eval $my_select1;
 eval $my_select2;
 
 --echo # Establish connection testuser1 (user=testuser1)
-let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
 connect (testuser1, localhost, testuser1, , db_datadict);
 eval $my_select1;

=== modified file 'mysql-test/suite/funcs_1/t/myisam_views.test'
--- a/mysql-test/suite/funcs_1/t/myisam_views.test	2008-06-18 17:23:55 +0000
+++ b/mysql-test/suite/funcs_1/t/myisam_views.test	2009-06-09 14:36:14 +0000
@@ -1,5 +1,7 @@
 #### suite/funcs_1/t/myisam_views.test
 
+--source include/no_valgrind_without_big.inc
+
 # MyISAM tables should be used
 #
 # Set $engine_type

=== modified file 'mysql-test/suite/funcs_1/t/storedproc.test'
--- a/mysql-test/suite/funcs_1/t/storedproc.test	2009-02-13 18:07:56 +0000
+++ b/mysql-test/suite/funcs_1/t/storedproc.test	2009-06-09 16:09:16 +0000
@@ -817,7 +817,6 @@ CREATE PROCEDURE sp11() insert into mysq
 --replace_column 13 created 14 modified
 SELECT security_type from mysql.proc where specific_name='sp11';
 
-let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
 connect (u_1, localhost, user_1, , db_storedproc);
 --source suite/funcs_1/include/show_connection.inc

=== modified file 'mysql-test/suite/funcs_1/triggers/triggers_03.inc'
--- a/mysql-test/suite/funcs_1/triggers/triggers_03.inc	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03.inc	2009-06-09 16:09:16 +0000
@@ -62,7 +62,6 @@ let $message= Testcase 3.5.3.2/6:;
 	grant SELECT on priv_db.t1 to test_yesprivs@localhost;
 	show grants for test_yesprivs@localhost;
 
-        let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 	--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
 	connect (no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
 	--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK

=== modified file 'mysql-test/suite/funcs_1/triggers/triggers_03e_columns.inc'
--- a/mysql-test/suite/funcs_1/triggers/triggers_03e_columns.inc	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_columns.inc	2009-06-09 16:09:16 +0000
@@ -36,7 +36,6 @@ let $message= ####### Testcase for colum
         grant SELECT,UPDATE on priv_db.* to test_noprivs@localhost;
         show grants for test_noprivs@localhost;
 
-	let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 	--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
 	connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
 

=== modified file 'mysql-test/suite/funcs_1/triggers/triggers_03e_db_level.inc'
--- a/mysql-test/suite/funcs_1/triggers/triggers_03e_db_level.inc	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_db_level.inc	2009-06-09 16:09:16 +0000
@@ -37,7 +37,6 @@ let $message= Testcase for db level:;
         show grants for test_noprivs@localhost;
 
 # no trigger privilege->create trigger must fail:
-        let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 	--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
 	connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
 let $message= no trigger privilege on db level for create:;

=== modified file 'mysql-test/suite/funcs_1/triggers/triggers_03e_db_table_mix.inc'
--- a/mysql-test/suite/funcs_1/triggers/triggers_03e_db_table_mix.inc	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_db_table_mix.inc	2009-06-09 16:09:16 +0000
@@ -41,7 +41,6 @@ let $message= ####### Testcase for mix o
         grant SELECT,INSERT on priv2_db.* to test_noprivs@localhost;
         show grants for test_noprivs@localhost;
 
-        let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 	--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
 	connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
 	use priv1_db;

=== modified file 'mysql-test/suite/funcs_1/triggers/triggers_03e_definer.inc'
--- a/mysql-test/suite/funcs_1/triggers/triggers_03e_definer.inc	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_definer.inc	2009-06-09 16:09:16 +0000
@@ -27,7 +27,6 @@ let $message= #########      Testcase fo
 
 	revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
 
-        let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 	--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
 	connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
 

=== modified file 'mysql-test/suite/funcs_1/triggers/triggers_03e_global_db_mix.inc'
--- a/mysql-test/suite/funcs_1/triggers/triggers_03e_global_db_mix.inc	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_global_db_mix.inc	2009-06-09 16:09:16 +0000
@@ -38,7 +38,6 @@ let $message= #### Testcase for mix of u
         grant SELECT,INSERT  on *.* to test_noprivs@localhost;
         show grants for test_noprivs@localhost;
 
-        let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 	--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
 	connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
 

=== modified file 'mysql-test/suite/funcs_1/triggers/triggers_03e_prepare.inc'
--- a/mysql-test/suite/funcs_1/triggers/triggers_03e_prepare.inc	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_prepare.inc	2009-06-09 16:09:16 +0000
@@ -32,7 +32,6 @@ let $message= #### Testcase for trigger
 	revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
         revoke ALL PRIVILEGES, GRANT OPTION FROM test_useprivs@localhost;
 
-	let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 	--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
 	connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
 

=== modified file 'mysql-test/suite/funcs_1/triggers/triggers_03e_table_level.inc'
--- a/mysql-test/suite/funcs_1/triggers/triggers_03e_table_level.inc	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_table_level.inc	2009-06-09 16:09:16 +0000
@@ -30,7 +30,6 @@ let $message= #########      Testcase fo
         set password for test_noprivs@localhost = password('PWD');
         revoke ALL PRIVILEGES, GRANT OPTION FROM test_noprivs@localhost;
 
-        let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 	--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
 	connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
 

=== modified file 'mysql-test/suite/funcs_1/triggers/triggers_03e_transaction.inc'
--- a/mysql-test/suite/funcs_1/triggers/triggers_03e_transaction.inc	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/triggers/triggers_03e_transaction.inc	2009-06-09 16:09:16 +0000
@@ -27,7 +27,6 @@ let $message= #########      Testcase fo
 
 	revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
 
-        let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 	--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
 	connect (yes_privs,localhost,test_yesprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
 

=== modified file 'mysql-test/suite/funcs_1/triggers/triggers_0407.inc'
--- a/mysql-test/suite/funcs_1/triggers/triggers_0407.inc	2009-02-13 18:07:56 +0000
+++ b/mysql-test/suite/funcs_1/triggers/triggers_0407.inc	2009-06-09 16:09:16 +0000
@@ -22,7 +22,6 @@ let $message= Testcase: 3.5:;
 	create User test_super@localhost;
 	set password for test_super@localhost = password('PWD');
 	grant ALL on *.* to test_super@localhost with grant OPTION;
-        let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 	--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
 	connect (con1_general,localhost,test_general,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
 	--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK

=== modified file 'mysql-test/suite/funcs_1/triggers/triggers_08.inc'
--- a/mysql-test/suite/funcs_1/triggers/triggers_08.inc	2009-02-01 17:15:58 +0000
+++ b/mysql-test/suite/funcs_1/triggers/triggers_08.inc	2009-06-09 16:09:16 +0000
@@ -23,7 +23,6 @@ let $message= Testcase: 3.5:;
 	create User test_super@localhost;
 	set password for test_super@localhost = password('PWD');
 	grant ALL on *.* to test_super@localhost with grant OPTION;
-        let $MASTER_MYSOCK= query_get_value(SHOW VARIABLES LIKE 'socket', Value, 1);
 	--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK
 	connect (con2_general,localhost,test_general,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK);
 	--replace_result $MASTER_MYPORT MASTER_MYPORT $MASTER_MYSOCK MASTER_MYSOCK

=== modified file 'mysql-test/t/connect.test'
--- a/mysql-test/t/connect.test	2009-03-06 14:56:17 +0000
+++ b/mysql-test/t/connect.test	2009-05-25 15:19:20 +0000
@@ -55,7 +55,8 @@ disconnect con4;
 connect (fail_con,localhost,test,,test2);
 --replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
 --error ER_ACCESS_DENIED_ERROR
-connect (fail_con,localhost,test,,"");
+# Need to protect "" within '' so it's interpreted literally
+connect (fail_con,localhost,test,,'""');
 --replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
 --error ER_ACCESS_DENIED_ERROR
 connect (fail_con,localhost,test,zorro,test2);

=== modified file 'mysql-test/t/count_distinct3.test'
--- a/mysql-test/t/count_distinct3.test	2009-04-16 17:47:44 +0000
+++ b/mysql-test/t/count_distinct3.test	2009-06-08 23:03:01 +0000
@@ -3,6 +3,8 @@
 # mysql-4.1
 #
 
+--source include/big_test.inc
+
 --disable_warnings
 DROP TABLE IF EXISTS t1, t2;
 --enable_warnings

=== modified file 'mysql-test/t/multi_update2.test'
--- a/mysql-test/t/multi_update2.test	2008-11-19 18:17:26 +0000
+++ b/mysql-test/t/multi_update2.test	2009-06-08 22:18:31 +0000
@@ -2,14 +2,46 @@
 # Test of update statement that uses many tables.
 #
 
---disable_warnings
-DROP TABLE IF EXISTS t1,t2;
---enable_warnings
+#
+# If we are running with
+# - Valgrind           -> $VALGRIND_TEST <> 0
+# - debug tracing      -> @@session.debug LIKE '%trace%'
+# the resource consumption (storage space needed, runtime) will be extreme.
+# Therefore we require that the option "--big-test" is also set.
+#
+
+let $need_big= 0;
+--disable_query_log
+--error 0,ER_UNKNOWN_SYSTEM_VARIABLE
+SET @aux = @@session.debug;
+if (!$mysql_errno)
+{
+  # We have returncode 0 = the server system variable @@session.debug exists.
+  # But we only need "--big-test" in case of tracing.
+  if (`SELECT @@session.debug LIKE '%trace%'`)
+  {
+    let $need_big= 1;
+  }
+}
+--enable_query_log
+if ($VALGRIND_TEST)
+{
+  # We are running with Valgrind
+  inc $need_big;
+}
+if (`SELECT '$BIG_TEST' = '' AND $need_big = 1`)
+{
+  --skip Need "--big-test" when running with the option "--debug" or "--valgrind"
+}
 
 #
 # Bug#1820 Rows not deleted from second table on multi-table delete
 #
 
+--disable_warnings
+DROP TABLE IF EXISTS t1,t2;
+--enable_warnings
+
 CREATE TABLE t1 ( a INT NOT NULL, b INT NOT NULL) ;
 --echo # The protocolling of many inserts into t1 is suppressed.
 --disable_query_log

=== modified file 'mysql-test/t/mysqltest.test'
--- a/mysql-test/t/mysqltest.test	2009-03-06 14:56:17 +0000
+++ b/mysql-test/t/mysqltest.test	2009-05-27 20:54:40 +0000
@@ -1780,6 +1780,56 @@ remove_file $MYSQLTEST_VARDIR/tmp/file2.
 --error 1
 --exec echo "copy_file from_file;" | $MYSQL_TEST 2>&1
 
+
+# ----------------------------------------------------------------------------
+# test for move_file
+# ----------------------------------------------------------------------------
+
+# - Check that if source file does not exist, nothing will be created.
+
+--error 1
+file_exists $MYSQLTEST_VARDIR/tmp/file1.tmp;
+--error 1
+file_exists $MYSQLTEST_VARDIR/tmp/file2.tmp;
+--error 1
+move_file $MYSQLTEST_VARDIR/tmp/file1.tmp $MYSQLTEST_VARDIR/tmp/file2.tmp;
+--error 1
+file_exists $MYSQLTEST_VARDIR/tmp/file1.tmp;
+--error 1
+file_exists $MYSQLTEST_VARDIR/tmp/file2.tmp;
+
+# - Check that if source file exists, everything works properly.
+
+--write_file $MYSQLTEST_VARDIR/tmp/file1.tmp
+file1
+EOF
+
+move_file $MYSQLTEST_VARDIR/tmp/file1.tmp $MYSQLTEST_VARDIR/tmp/file2.tmp;
+--error 1
+file_exists $MYSQLTEST_VARDIR/tmp/file1.tmp;
+file_exists $MYSQLTEST_VARDIR/tmp/file2.tmp;
+
+# - Check that if destination file exists, everything works properly.
+#   (file2.tmp exists from the previous check; file1.tmp needs to be created)
+
+--write_file $MYSQLTEST_VARDIR/tmp/file1.tmp
+file1
+EOF
+
+move_file $MYSQLTEST_VARDIR/tmp/file1.tmp $MYSQLTEST_VARDIR/tmp/file2.tmp;
+--error 1
+file_exists $MYSQLTEST_VARDIR/tmp/file1.tmp;
+file_exists $MYSQLTEST_VARDIR/tmp/file2.tmp;
+remove_file $MYSQLTEST_VARDIR/tmp/file2.tmp;
+
+# - Check usage.
+
+--error 1
+--exec echo "move_file ;" | $MYSQL_TEST 2>&1
+
+--error 1
+--exec echo "move_file from_file;" | $MYSQL_TEST 2>&1
+
 # ----------------------------------------------------------------------------
 # test for chmod
 # ----------------------------------------------------------------------------
@@ -2037,6 +2087,10 @@ let $value= query_get_value(SELECT 'A B'
 let $value= query_get_value(SELECT 1 AS "My Column", My Column, 1);
 --echo value= $value
 #
+# 4.1 Query containing , protected by quotes, quotes also on column
+let $value= query_get_value('SELECT 1 as a, 2 as b', "b", 1);
+--echo value= $value
+#
 #------------ Negative tests ------------
 # 5. Incomplete statement including missing parameters
 # 5.1 incomplete statement

=== modified file 'sql/field.cc'
--- a/sql/field.cc	2009-05-15 08:42:57 +0000
+++ b/sql/field.cc	2009-06-09 16:44:26 +0000
@@ -1165,7 +1165,7 @@ bool Field_num::get_int(CHARSET_INFO *cs
   if (unsigned_flag)
   {
 
-    if (((ulonglong) *rnd > unsigned_max) && (*rnd= (longlong) unsigned_max) ||
+    if ((((ulonglong) *rnd > unsigned_max) && (*rnd= (longlong) unsigned_max)) ||
         error == MY_ERRNO_ERANGE)
     {
       goto out_of_range;
@@ -1350,7 +1350,7 @@ void Field::copy_from_tmp(int row_offset
   if (null_ptr)
   {
     *null_ptr= (uchar) ((null_ptr[0] & (uchar) ~(uint) null_bit) |
-			null_ptr[row_offset] & (uchar) null_bit);
+			(null_ptr[row_offset] & (uchar) null_bit));
   }
 }
 
@@ -4081,8 +4081,8 @@ int Field_float::store(const char *from,
   int error;
   char *end;
   double nr= my_strntod(cs,(char*) from,len,&end,&error);
-  if (error || (!len || (uint) (end-from) != len &&
-                table->in_use->count_cuted_fields))
+  if (error || (!len || ((uint) (end-from) != len &&
+                table->in_use->count_cuted_fields)))
   {
     set_warning(MYSQL_ERROR::WARN_LEVEL_WARN,
                 (error ? ER_WARN_DATA_OUT_OF_RANGE : WARN_DATA_TRUNCATED), 1);
@@ -4343,8 +4343,8 @@ int Field_double::store(const char *from
   int error;
   char *end;
   double nr= my_strntod(cs,(char*) from, len, &end, &error);
-  if (error || (!len || (uint) (end-from) != len &&
-                table->in_use->count_cuted_fields))
+  if (error || (!len || ((uint) (end-from) != len &&
+                table->in_use->count_cuted_fields)))
   {
     set_warning(MYSQL_ERROR::WARN_LEVEL_WARN,
                 (error ? ER_WARN_DATA_OUT_OF_RANGE : WARN_DATA_TRUNCATED), 1);
@@ -5196,7 +5196,7 @@ int Field_time::store(longlong nr, bool
                          MYSQL_TIMESTAMP_TIME, 1);
     error= 1;
   }
-  else if (nr > (longlong) TIME_MAX_VALUE || nr < 0 && unsigned_val)
+  else if (nr > (longlong) TIME_MAX_VALUE || (nr < 0 && unsigned_val))
   {
     tmp= TIME_MAX_VALUE;
     set_datetime_warning(MYSQL_ERROR::WARN_LEVEL_WARN, 
@@ -5361,7 +5361,7 @@ int Field_year::store(const char *from,
   int error;
   longlong nr= cs->cset->strntoull10rnd(cs, from, len, 0, &end, &error);
 
-  if (nr < 0 || nr >= 100 && nr <= 1900 || nr > 2155 || 
+  if (nr < 0 || (nr >= 100 && nr <= 1900) || nr > 2155 ||
       error == MY_ERRNO_ERANGE)
   {
     *ptr=0;
@@ -5405,7 +5405,7 @@ int Field_year::store(double nr)
 int Field_year::store(longlong nr, bool unsigned_val)
 {
   ASSERT_COLUMN_MARKED_FOR_WRITE;
-  if (nr < 0 || nr >= 100 && nr <= 1900 || nr > 2155)
+  if (nr < 0 || (nr >= 100 && nr <= 1900) || nr > 2155)
   {
     *ptr= 0;
     set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1);
@@ -6429,16 +6429,16 @@ int Field_str::store(double nr)
   /* Calculate the exponent from the 'e'-format conversion */
   if (anr < 1.0 && anr > 0)
   {
-    for (exp= 0; anr < 1e-100; exp-= 100, anr*= 1e100);
-    for (; anr < 1e-10; exp-= 10, anr*= 1e10);
-    for (i= 1; anr < 1 / log_10[i]; exp--, i++);
+    for (exp= 0; anr < 1e-100; exp-= 100, anr*= 1e100) ;
+    for (; anr < 1e-10; exp-= 10, anr*= 1e10) ;
+    for (i= 1; anr < 1 / log_10[i]; exp--, i++) ;
     exp--;
   }
   else
   {
-    for (exp= 0; anr > 1e100; exp+= 100, anr/= 1e100);
-    for (; anr > 1e10; exp+= 10, anr/= 1e10);
-    for (i= 1; anr > log_10[i]; exp++, i++);
+    for (exp= 0; anr > 1e100; exp+= 100, anr/= 1e100) ;
+    for (; anr > 1e10; exp+= 10, anr/= 1e10) ;
+    for (i= 1; anr > log_10[i]; exp++, i++) ;
   }
 
   max_length= local_char_length - neg;
@@ -8833,7 +8833,7 @@ bool Field_num::eq_def(Field *field)
   Field_num *from_num= (Field_num*) field;
 
   if (unsigned_flag != from_num->unsigned_flag ||
-      zerofill && !from_num->zerofill && !zero_pack() ||
+      (zerofill && !from_num->zerofill && !zero_pack()) ||
       dec != from_num->dec)
     return 0;
   return 1;
@@ -8974,7 +8974,7 @@ int Field_bit::store(const char *from, u
   ASSERT_COLUMN_MARKED_FOR_WRITE;
   int delta;
 
-  for (; length && !*from; from++, length--);          // skip left 0's
+  for (; length && !*from; from++, length--) ;         // skip left 0's
   delta= bytes_in_rec - length;
 
   if (delta < -1 ||
@@ -9306,7 +9306,7 @@ Field_bit::unpack(uchar *to, const uchar
     and slave have the same sizes, then use the old unpack() method.
   */
   if (param_data == 0 ||
-      (from_bit_len == bit_len) && (from_len == bytes_in_rec))
+      ((from_bit_len == bit_len) && (from_len == bytes_in_rec)))
   {
     if (bit_len > 0)
     {
@@ -9385,7 +9385,7 @@ int Field_bit_as_char::store(const char
   int delta;
   uchar bits= (uchar) (field_length & 7);
 
-  for (; length && !*from; from++, length--);          // skip left 0's
+  for (; length && !*from; from++, length--) ;         // skip left 0's
   delta= bytes_in_rec - length;
 
   if (delta < 0 ||

=== modified file 'sql/field_conv.cc'
--- a/sql/field_conv.cc	2007-10-11 17:29:09 +0000
+++ b/sql/field_conv.cc	2009-06-09 16:44:26 +0000
@@ -99,7 +99,7 @@ static void do_field_to_null_str(Copy_fi
 static void do_outer_field_to_null_str(Copy_field *copy)
 {
   if (*copy->null_row ||
-      copy->from_null_ptr && (*copy->from_null_ptr & copy->from_bit))
+      (copy->from_null_ptr && (*copy->from_null_ptr & copy->from_bit)))
   {
     bzero(copy->to_ptr,copy->from_length);
     copy->to_null_ptr[0]=1;			// Always bit 1
@@ -212,7 +212,7 @@ static void do_copy_null(Copy_field *cop
 static void do_outer_field_null(Copy_field *copy)
 {
   if (*copy->null_row ||
-      copy->from_null_ptr && (*copy->from_null_ptr & copy->from_bit))
+      (copy->from_null_ptr && (*copy->from_null_ptr & copy->from_bit)))
   {
     *copy->to_null_ptr|=copy->to_bit;
     copy->to_field->reset();
@@ -665,9 +665,9 @@ Copy_field::get_copy_func(Field *to,Fiel
       */
       if (to->real_type() != from->real_type() ||
           !compatible_db_low_byte_first ||
-          ((to->table->in_use->variables.sql_mode &
+          (((to->table->in_use->variables.sql_mode &
             (MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE | MODE_INVALID_DATES)) &&
-           to->type() == MYSQL_TYPE_DATE ||
+           to->type() == MYSQL_TYPE_DATE) ||
            to->type() == MYSQL_TYPE_DATETIME))
       {
 	if (from->real_type() == MYSQL_TYPE_ENUM ||
@@ -770,8 +770,8 @@ int field_conv(Field *to,Field *from)
 	to->table->s->db_low_byte_first == from->table->s->db_low_byte_first &&
         (!(to->table->in_use->variables.sql_mode &
            (MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE | MODE_INVALID_DATES)) ||
-         to->type() != MYSQL_TYPE_DATE &&
-         to->type() != MYSQL_TYPE_DATETIME) &&
+         (to->type() != MYSQL_TYPE_DATE &&
+          to->type() != MYSQL_TYPE_DATETIME)) &&
         (from->real_type() != MYSQL_TYPE_VARCHAR ||
          ((Field_varstring*)from)->length_bytes ==
           ((Field_varstring*)to)->length_bytes))

=== modified file 'sql/gstream.cc'
--- a/sql/gstream.cc	2007-10-05 11:33:08 +0000
+++ b/sql/gstream.cc	2009-06-09 16:44:26 +0000
@@ -75,7 +75,7 @@ bool Gis_read_stream::get_next_number(do
   skip_space();
 
   if ((m_cur >= m_limit) ||
-      (*m_cur < '0' || *m_cur > '9') && *m_cur != '-' && *m_cur != '+')
+      ((*m_cur < '0' || *m_cur > '9') && *m_cur != '-' && *m_cur != '+'))
   {
     set_error_msg("Numeric constant expected");
     return 1;

=== modified file 'sql/handler.cc'
--- a/sql/handler.cc	2009-06-05 22:16:54 +0000
+++ b/sql/handler.cc	2009-06-09 16:44:26 +0000
@@ -2291,8 +2291,8 @@ int handler::update_auto_increment()
   DBUG_ASSERT(next_insert_id >= auto_inc_interval_for_cur_row.minimum());
 
   if ((nr= table->next_number_field->val_int()) != 0 ||
-      table->auto_increment_field_not_null &&
-      thd->variables.sql_mode & MODE_NO_AUTO_VALUE_ON_ZERO)
+      (table->auto_increment_field_not_null &&
+      thd->variables.sql_mode & MODE_NO_AUTO_VALUE_ON_ZERO))
   {
     /*
       Update next_insert_id if we had already generated a value in this

=== modified file 'sql/item_cmpfunc.cc'
--- a/sql/item_cmpfunc.cc	2009-05-25 08:00:40 +0000
+++ b/sql/item_cmpfunc.cc	2009-06-09 16:44:26 +0000
@@ -1484,8 +1484,8 @@ longlong Item_func_truth::val_int()
 
 bool Item_in_optimizer::fix_left(THD *thd, Item **ref)
 {
-  if (!args[0]->fixed && args[0]->fix_fields(thd, args) ||
-      !cache && !(cache= Item_cache::get_cache(args[0])))
+  if ((!args[0]->fixed && args[0]->fix_fields(thd, args)) ||
+      (!cache && !(cache= Item_cache::get_cache(args[0]))))
     return 1;
 
   cache->setup(args[0]);
@@ -2996,8 +2996,8 @@ int cmp_longlong(void *cmp_arg,
       One of the args is unsigned and is too big to fit into the 
       positive signed range. Report no match.
     */  
-    if (a->unsigned_flag && ((ulonglong) a->val) > (ulonglong) LONGLONG_MAX ||
-        b->unsigned_flag && ((ulonglong) b->val) > (ulonglong) LONGLONG_MAX)
+    if ((a->unsigned_flag && ((ulonglong) a->val) > (ulonglong) LONGLONG_MAX) ||
+        (b->unsigned_flag && ((ulonglong) b->val) > (ulonglong) LONGLONG_MAX))
       return a->unsigned_flag ? 1 : -1;
     /*
       Although the signedness differs both args can fit into the signed 

=== modified file 'sql/item_func.cc'
--- a/sql/item_func.cc	2009-06-02 07:00:37 +0000
+++ b/sql/item_func.cc	2009-06-09 16:44:26 +0000
@@ -4463,8 +4463,8 @@ int Item_func_set_user_var::save_in_fiel
   update();
 
   if (result_type() == STRING_RESULT ||
-      result_type() == REAL_RESULT &&
-      field->result_type() == STRING_RESULT)
+      (result_type() == REAL_RESULT &&
+      field->result_type() == STRING_RESULT))
   {
     String *result;
     CHARSET_INFO *cs= collation.collation;

=== modified file 'sql/item_subselect.cc'
--- a/sql/item_subselect.cc	2008-07-04 14:02:17 +0000
+++ b/sql/item_subselect.cc	2009-06-09 16:44:26 +0000
@@ -1314,8 +1314,8 @@ Item_in_subselect::row_value_transformer
     Item *item_having_part2= 0;
     for (uint i= 0; i < cols_num; i++)
     {
-      DBUG_ASSERT(left_expr->fixed &&
-                  select_lex->ref_pointer_array[i]->fixed ||
+      DBUG_ASSERT((left_expr->fixed &&
+                  select_lex->ref_pointer_array[i]->fixed) ||
                   (select_lex->ref_pointer_array[i]->type() == REF_ITEM &&
                    ((Item_ref*)(select_lex->ref_pointer_array[i]))->ref_type() ==
                     Item_ref::OUTER_REF));
@@ -1392,8 +1392,8 @@ Item_in_subselect::row_value_transformer
     for (uint i= 0; i < cols_num; i++)
     {
       Item *item, *item_isnull;
-      DBUG_ASSERT(left_expr->fixed &&
-                  select_lex->ref_pointer_array[i]->fixed ||
+      DBUG_ASSERT((left_expr->fixed &&
+                  select_lex->ref_pointer_array[i]->fixed) ||
                   (select_lex->ref_pointer_array[i]->type() == REF_ITEM &&
                    ((Item_ref*)(select_lex->ref_pointer_array[i]))->ref_type() ==
                     Item_ref::OUTER_REF));

=== modified file 'sql/item_sum.cc'
--- a/sql/item_sum.cc	2009-03-11 12:29:59 +0000
+++ b/sql/item_sum.cc	2009-06-09 16:44:26 +0000
@@ -2640,8 +2640,8 @@ bool Item_sum_count_distinct::setup(THD
       enum enum_field_types f_type= f->type();
       tree_key_length+= f->pack_length();
       if ((f_type == MYSQL_TYPE_VARCHAR) ||
-          !f->binary() && (f_type == MYSQL_TYPE_STRING ||
-                           f_type == MYSQL_TYPE_VAR_STRING))
+          (!f->binary() && (f_type == MYSQL_TYPE_STRING ||
+                           f_type == MYSQL_TYPE_VAR_STRING)))
       {
         all_binary= FALSE;
         break;

=== modified file 'sql/item_timefunc.cc'
--- a/sql/item_timefunc.cc	2009-02-13 16:41:47 +0000
+++ b/sql/item_timefunc.cc	2009-06-09 16:44:26 +0000
@@ -446,7 +446,7 @@ static bool extract_date_time(DATE_TIME_
         strict_week_number= (*ptr=='V' || *ptr=='v');
 	tmp= (char*) val + min(val_len, 2);
 	if ((week_number= (int) my_strtoll10(val, &tmp, &error)) < 0 ||
-            strict_week_number && !week_number ||
+            (strict_week_number && !week_number) ||
             week_number > 53)
           goto err;
 	val= tmp;
@@ -542,10 +542,10 @@ static bool extract_date_time(DATE_TIME_
       %V,%v require %X,%x resprectively,
       %U,%u should be used with %Y and not %X or %x
     */
-    if (strict_week_number &&
+    if ((strict_week_number &&
         (strict_week_number_year < 0 ||
-         strict_week_number_year_type != sunday_first_n_first_week_non_iso) ||
-        !strict_week_number && strict_week_number_year >= 0)
+         strict_week_number_year_type != sunday_first_n_first_week_non_iso)) ||
+        (!strict_week_number && strict_week_number_year >= 0))
       goto err;
 
     /* Number of days since year 0 till 1st Jan of this year */

=== modified file 'sql/log_event.cc'
--- a/sql/log_event.cc	2009-05-31 09:15:35 +0000
+++ b/sql/log_event.cc	2009-06-09 16:44:26 +0000
@@ -791,8 +791,8 @@ Log_event::do_shall_skip(Relay_log_info
                       (ulong) server_id, (ulong) ::server_id,
                       rli->replicate_same_server_id,
                       rli->slave_skip_counter));
-  if (server_id == ::server_id && !rli->replicate_same_server_id ||
-      rli->slave_skip_counter == 1 && rli->is_in_group())
+  if ((server_id == ::server_id && !rli->replicate_same_server_id) ||
+      (rli->slave_skip_counter == 1 && rli->is_in_group()))
     return EVENT_SKIP_IGNORE;
   else if (rli->slave_skip_counter > 0)
     return EVENT_SKIP_COUNT;
@@ -2733,7 +2733,8 @@ void Query_log_event::print_query_header
 
   if (!(flags & LOG_EVENT_SUPPRESS_USE_F) && db)
   {
-    if ((different_db= memcmp(print_event_info->db, db, db_len + 1)))
+    different_db= memcmp(print_event_info->db, db, db_len + 1);
+    if (different_db)
       memcpy(print_event_info->db, db, db_len + 1);
     if (db[0] && different_db) 
       my_b_printf(file, "use %s%s\n", db, print_event_info->delimiter);
@@ -6897,8 +6898,8 @@ Rows_log_event::Rows_log_event(THD *thd_
     solution, to be able to terminate a started statement in the
     binary log: the extraneous events will be removed in the future.
    */
-  DBUG_ASSERT(tbl_arg && tbl_arg->s && tid != ~0UL ||
-              !tbl_arg && !cols && tid == ~0UL);
+  DBUG_ASSERT((tbl_arg && tbl_arg->s && tid != ~0UL) ||
+              (!tbl_arg && !cols && tid == ~0UL));
 
   if (thd_arg->options & OPTION_NO_FOREIGN_KEY_CHECKS)
       set_flags(NO_FOREIGN_KEY_CHECKS_F);
@@ -7090,7 +7091,7 @@ int Rows_log_event::do_add_row_data(ucha
 #endif
 
   DBUG_ASSERT(m_rows_buf <= m_rows_cur);
-  DBUG_ASSERT(!m_rows_buf || m_rows_end && m_rows_buf < m_rows_end);
+  DBUG_ASSERT(!m_rows_buf || (m_rows_end && m_rows_buf < m_rows_end));
   DBUG_ASSERT(m_rows_cur <= m_rows_end);
 
   /* The cast will always work since m_rows_cur <= m_rows_end */

=== modified file 'sql/mysqld.cc'
--- a/sql/mysqld.cc	2009-06-02 12:37:47 +0000
+++ b/sql/mysqld.cc	2009-06-08 22:05:24 +0000
@@ -4780,8 +4780,9 @@ void handle_connection_in_main_thread(TH
   safe_mutex_assert_owner(&LOCK_thread_count);
   thread_cache_size=0;			// Safety
   threads.append(thd);
-  (void) pthread_mutex_unlock(&LOCK_thread_count);
-  handle_one_connection((void*) thd);
+  pthread_mutex_unlock(&LOCK_thread_count);
+  thd->start_utime= my_micro_time();
+  handle_one_connection(thd);
 }
 
 
@@ -4806,7 +4807,7 @@ void create_thread_to_handle_connection(
     thread_created++;
     threads.append(thd);
     DBUG_PRINT("info",(("creating thread %lu"), thd->thread_id));
-    thd->connect_utime= thd->start_utime= my_micro_time();
+    thd->prior_thr_create_utime= thd->start_utime= my_micro_time();
     if ((error=pthread_create(&thd->real_id,&connection_attrib,
                               handle_one_connection,
                               (void*) thd)))

=== modified file 'sql/opt_range.cc'
--- a/sql/opt_range.cc	2009-03-24 13:58:52 +0000
+++ b/sql/opt_range.cc	2009-06-09 16:44:26 +0000
@@ -3760,8 +3760,8 @@ TABLE_READ_PLAN *get_best_disjunct_quick
 
   DBUG_PRINT("info", ("index_merge scans cost %g", imerge_cost));
   if (imerge_too_expensive || (imerge_cost > read_time) ||
-      (non_cpk_scan_records+cpk_scan_records >= param->table->file->stats.records) &&
-      read_time != DBL_MAX)
+      ((non_cpk_scan_records+cpk_scan_records >= param->table->file->stats.records) &&
+      read_time != DBL_MAX))
   {
     /*
       Bail out if it is obvious that both index_merge and ROR-union will be
@@ -7950,7 +7950,7 @@ QUICK_RANGE_SELECT *get_quick_select_for
     goto err;
   quick->records= records;
 
-  if (cp_buffer_from_ref(thd, table, ref) && thd->is_fatal_error ||
+  if ((cp_buffer_from_ref(thd, table, ref) && thd->is_fatal_error) ||
       !(range= new(alloc) QUICK_RANGE()))
     goto err;                                   // out of memory
 
@@ -8826,7 +8826,7 @@ int QUICK_RANGE_SELECT::cmp_prev(QUICK_R
 
   cmp= key_cmp(key_part_info, range_arg->min_key,
                range_arg->min_length);
-  if (cmp > 0 || cmp == 0 && !(range_arg->flag & NEAR_MIN))
+  if (cmp > 0 || (cmp == 0 && !(range_arg->flag & NEAR_MIN)))
     return 0;
   return 1;                                     // outside of range
 }
@@ -10886,7 +10886,7 @@ int QUICK_GROUP_MIN_MAX_SELECT::next_min
       /* Compare the found key with max_key. */
       int cmp_res= key_cmp(index_info->key_part, max_key,
                            real_prefix_len + min_max_arg_len);
-      if (!((cur_range->flag & NEAR_MAX) && (cmp_res == -1) ||
+      if (!(((cur_range->flag & NEAR_MAX) && (cmp_res == -1)) ||
             (cmp_res <= 0)))
       {
         result= HA_ERR_KEY_NOT_FOUND;
@@ -11004,7 +11004,7 @@ int QUICK_GROUP_MIN_MAX_SELECT::next_max
       /* Compare the found key with min_key. */
       int cmp_res= key_cmp(index_info->key_part, min_key,
                            real_prefix_len + min_max_arg_len);
-      if (!((cur_range->flag & NEAR_MIN) && (cmp_res == 1) ||
+      if (!(((cur_range->flag & NEAR_MIN) && (cmp_res == 1)) ||
             (cmp_res >= 0)))
         continue;
     }

=== modified file 'sql/opt_sum.cc'
--- a/sql/opt_sum.cc	2009-02-13 16:41:47 +0000
+++ b/sql/opt_sum.cc	2009-06-09 16:44:26 +0000
@@ -744,8 +744,8 @@ static bool matching_cond(bool max_fl, T
   }
   else if (eq_type)
   {
-    if (!is_null && !cond->val_int() ||
-        is_null && !test(part->field->is_null()))  
+    if ((!is_null && !cond->val_int()) ||
+        (is_null && !test(part->field->is_null())))
      return 0;                       // Impossible test
   }
   else if (is_field_part)

=== modified file 'sql/slave.cc'
--- a/sql/slave.cc	2009-05-22 23:29:41 +0000
+++ b/sql/slave.cc	2009-06-09 16:44:26 +0000
@@ -810,7 +810,7 @@ int init_strvar_from_file(char *var, int
         up to and including newline.
       */
       int c;
-      while (((c=my_b_get(f)) != '\n' && c != my_b_EOF));
+      while (((c=my_b_get(f)) != '\n' && c != my_b_EOF)) ;
     }
     DBUG_RETURN(0);
   }
@@ -2235,7 +2235,7 @@ static int exec_relay_log_event(THD* thd
                           "the slave_transaction_retries variable.",
                           slave_trans_retries);
       }
-      else if (exec_res && !temp_err ||
+      else if ((exec_res && !temp_err) ||
                (opt_using_transactions &&
                 rli->group_relay_log_pos == rli->event_relay_log_pos))
       {

=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc	2009-05-30 13:32:28 +0000
+++ b/sql/sql_class.cc	2009-06-08 22:05:24 +0000
@@ -590,7 +590,7 @@ THD::THD()
   // Must be reset to handle error with THD's created for init of mysqld
   lex->current_select= 0;
   start_time=(time_t) 0;
-  start_utime= 0L;
+  start_utime= prior_thr_create_utime= 0L;
   utime_after_lock= 0L;
   current_linfo =  0;
   slave_thread = 0;

=== modified file 'sql/sql_class.h'
--- a/sql/sql_class.h	2009-06-05 22:16:54 +0000
+++ b/sql/sql_class.h	2009-06-08 22:05:24 +0000
@@ -1370,7 +1370,8 @@ public:
   /* remote (peer) port */
   uint16 peer_port;
   time_t     start_time, user_time;
-  ulonglong  connect_utime, thr_create_utime; // track down slow pthread_create
+  // track down slow pthread_create
+  ulonglong  prior_thr_create_utime, thr_create_utime;
   ulonglong  start_utime, utime_after_lock;
   
   thr_lock_type update_lock_default;

=== modified file 'sql/sql_connect.cc'
--- a/sql/sql_connect.cc	2009-02-13 16:41:47 +0000
+++ b/sql/sql_connect.cc	2009-06-08 22:05:24 +0000
@@ -1074,8 +1074,8 @@ static void prepare_new_connection_state
 pthread_handler_t handle_one_connection(void *arg)
 {
   THD *thd= (THD*) arg;
-  ulong launch_time= (ulong) ((thd->thr_create_utime= my_micro_time()) -
-                              thd->connect_utime);
+
+  thd->thr_create_utime= my_micro_time();
 
   if (thread_scheduler.init_new_connection_thread())
   {
@@ -1084,8 +1084,20 @@ pthread_handler_t handle_one_connection(
     thread_scheduler.end_thread(thd,0);
     return 0;
   }
-  if (launch_time >= slow_launch_time*1000000L)
-    statistic_increment(slow_launch_threads,&LOCK_status);
+
+  /*
+    If a thread was created to handle this connection:
+    increment slow_launch_threads counter if it took more than
+    slow_launch_time seconds to create the thread.
+  */
+  if (thd->prior_thr_create_utime)
+  {
+    ulong launch_time= (ulong) (thd->thr_create_utime -
+                                thd->prior_thr_create_utime);
+    if (launch_time >= slow_launch_time*1000000L)
+      statistic_increment(slow_launch_threads, &LOCK_status);
+    thd->prior_thr_create_utime= 0;
+  }
 
   /*
     handle_one_connection() is normally the only way a thread would


Attachment: [text/bzr-bundle] bzr/matthias.leich@sun.com-20090609190531-i6yr10m1s33dlvri.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (Matthias.Leich:2932)Matthias Leich9 Jun