List:Commits« Previous MessageNext Message »
From:msvensson Date:October 7 2006 5:12pm
Subject:bk commit into 5.0 tree (msvensson:1.2283)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-10-07 19:12:10+02:00, msvensson@neptunus.(none) +2 -0
  Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
  into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
  MERGE: 1.1616.2144.214

  client/mysqltest.c@stripped, 2006-10-07 19:12:06+02:00, msvensson@neptunus.(none) +0 -0
    Auto merged
    MERGE: 1.92.21.12

  mysql-test/lib/mtr_cases.pl@stripped, 2006-10-07 19:12:06+02:00, msvensson@neptunus.(none) +0 -0
    Auto merged
    MERGE: 1.6.2.8

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/mysql-5.0-maint/RESYNC

--- 1.24/mysql-test/lib/mtr_cases.pl	2006-10-07 19:12:16 +02:00
+++ 1.25/mysql-test/lib/mtr_cases.pl	2006-10-07 19:12:16 +02:00
@@ -143,7 +143,7 @@
       {
         next;
       }
-      
+
       next if $::opt_do_test and ! defined mtr_match_prefix($elem,$::opt_do_test);
 
       collect_one_test_case($testdir,$resdir,$tname,$elem,$cases,\%disabled,
@@ -159,37 +159,71 @@
   {
 
     my %sort_criteria;
-    my $tinfo;
 
     # Make a mapping of test name to a string that represents how that test
     # should be sorted among the other tests.  Put the most important criterion
     # first, then a sub-criterion, then sub-sub-criterion, et c.
-    foreach $tinfo (@$cases)
+    foreach my $tinfo (@$cases)
     {
-      my @this_criteria = ();
-
-      #
-      # Append the criteria for sorting, in order of importance.
-      #
-
-      push(@this_criteria, "ndb=" . ($tinfo->{'ndb_test'} ? "1" : "0"));
-      push(@this_criteria, "restart=" . ($tinfo->{'master_restart'} ? "1" : "0"));
-      # Group test with similar options together.
-      # Ending with "~" makes empty sort later than filled
-      push(@this_criteria, join("!", sort @{$tinfo->{'master_opt'}}) . "~");
+      my @criteria = ();
 
-      # Finally, order by the name
-      push(@this_criteria, $tinfo->{'name'});
+      # Look for tests that muct be in run in a defined order
+      # that is defined by test having the same name except for
+      # the ending digit
+
+      # Put variables into hash
+      my $test_name= $tinfo->{'name'};
+      my $depend_on_test_name;
+      if ( $test_name =~ /^([\D]+)([0-9]{1})$/ )
+      {
+	my $base_name= $1;
+	my $idx= $2;
+	mtr_verbose("$test_name =>  $base_name idx=$idx");
+	if ( $idx > 1 )
+	{
+	  $idx-= 1;
+	  $base_name= "$base_name$idx";
+	  mtr_verbose("New basename $base_name");
+	}
+
+	foreach my $tinfo2 (@$cases)
+	{
+	  if ( $tinfo2->{'name'} eq $base_name )
+	  {
+	    mtr_verbose("found dependent test $tinfo2->{'name'}");
+	    $depend_on_test_name=$base_name;
+	  }
+	}
+      }
+
+      if ( defined $depend_on_test_name )
+      {
+	mtr_verbose("Giving $test_name same critera as $depend_on_test_name");
+	$sort_criteria{$test_name} = $sort_criteria{$depend_on_test_name};
+      }
+      else
+      {
+	#
+	# Append the criteria for sorting, in order of importance.
+	#
+	push(@criteria, "ndb=" . ($tinfo->{'ndb_test'} ? "1" : "0"));
+	push(@criteria, "restart=" . ($tinfo->{'master_restart'} ? "1" : "0"));
+	# Group test with equal options together.
+	# Ending with "~" makes empty sort later than filled
+	push(@criteria, join("!", sort @{$tinfo->{'master_opt'}}) . "~");
 
-      $sort_criteria{$tinfo->{"name"}} = join(" ", @this_criteria);
+	$sort_criteria{$test_name} = join(" ", @criteria);
+      }
     }
 
-    @$cases = sort { $sort_criteria{$a->{"name"}} cmp $sort_criteria{$b->{"name"}}; } @$cases;
+    @$cases = sort {
+      $sort_criteria{$a->{'name'}} . $a->{'name'} cmp
+	$sort_criteria{$b->{'name'}} . $b->{'name'}; } @$cases;
 
     if ( $::opt_script_debug )
     {
       # For debugging the sort-order
-      foreach $tinfo (@$cases)
+      foreach my $tinfo (@$cases)
       {
 	print("$sort_criteria{$tinfo->{'name'}} -> \t$tinfo->{'name'}\n");
       }

--- 1.244/client/mysqltest.c	2006-10-07 19:12:16 +02:00
+++ 1.245/client/mysqltest.c	2006-10-07 19:12:17 +02:00
@@ -2472,17 +2472,13 @@
 #include <mysqld_ername.h>
   { 0, 0 }
 };
-#define HAVE_MYSQLD_ERNAME
-#endif
-
 
 uint get_errcode_from_name(char *error_name, char *error_end)
 {
-  DBUG_ENTER("get_errcode_from_name");
-#ifdef HAVE_MYSQLD_ERNAME
-
   /* SQL error as string */
   st_error *e= global_error_names;
+
+  DBUG_ENTER("get_errcode_from_name");
   DBUG_PRINT("enter", ("error_name: %s", error_name));
 
   /* Loop through the array of known error names */
@@ -2501,13 +2497,17 @@
   }
   if (!e->name)
     die("Unknown SQL error name '%s'", error_name);
+  DBUG_RETURN(0);
+}
 #else
-  LINT_INIT(error_name);
-  LINT_INIT(error_end);
+uint get_errcode_from_name(char *error_name __attribute__((unused)),
+                           char *error_end __attribute__((unused)))
+{
   abort_not_in_this_version();
-#endif
-  DBUG_RETURN(0);;
+  return 0; /* Never reached */
 }
+#endif
+
 
 
 void do_get_errcodes(struct st_command *command)
@@ -2536,6 +2536,8 @@
 
     if (*p == 'S')
     {
+      char *to_ptr= to->code.sqlstate;
+
       /*
         SQLSTATE string
         - Must be SQLSTATE_LENGTH long
@@ -2546,7 +2548,6 @@
         die("The sqlstate must be exactly %d chars long", SQLSTATE_LENGTH);
 
       /* Check sqlstate string validity */
-      char *to_ptr= to->code.sqlstate;
       while (*p && p != end)
       {
         if (my_isdigit(charset_info, *p) || my_isupper(charset_info, *p))
Thread
bk commit into 5.0 tree (msvensson:1.2283)msvensson7 Oct