List:Commits« Previous MessageNext Message »
From:msvensson Date:October 14 2006 7:55pm
Subject:bk commit into 5.0 tree (msvensson:1.2306)
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-14 19:55:06+02:00, msvensson@shellback.(none) +16 -0
  Merge shellback.(none):/home/msvensson/mysql/mysql-4.1-maint
  into  shellback.(none):/home/msvensson/mysql/mysql-5.0-maint
  MERGE: 1.1616.2144.225

  client/mysql.cc@stripped, 2006-10-14 19:53:11+02:00, msvensson@shellback.(none) +0 -0
    Auto merged
    MERGE: 1.121.1.101

  client/mysqldump.c@stripped, 2006-10-14 19:53:11+02:00, msvensson@shellback.(none) +0 -0
    Auto merged
    MERGE: 1.143.13.7

  client/mysqltest.c@stripped, 2006-10-14 19:53:11+02:00, msvensson@shellback.(none) +0 -2
    Auto merged
    MERGE: 1.92.21.23

  include/my_dbug.h@stripped, 2006-10-14 19:53:11+02:00, msvensson@shellback.(none) +0 -2
    Auto merged
    MERGE: 1.10.1.2

  mysql-test/lib/mtr_cases.pl@stripped, 2006-10-14 19:53:12+02:00, msvensson@shellback.(none)
+0 -0
    Auto merged
    MERGE: 1.6.2.10

  mysql-test/lib/mtr_report.pl@stripped, 2006-10-14 19:53:12+02:00, msvensson@shellback.(none)
+0 -0
    Auto merged
    MERGE: 1.11.2.5

  mysql-test/mysql-test-run.pl@stripped, 2006-10-14 19:53:12+02:00,
msvensson@shellback.(none) +2 -2
    Auto merged
    MERGE: 1.8.9.57

  mysql-test/r/csv.result@stripped, 2006-10-14 19:53:12+02:00, msvensson@shellback.(none) +0 -1
    Auto merged
    MERGE: 1.3.1.1

  mysql-test/r/func_time.result@stripped, 2006-10-14 19:53:12+02:00,
msvensson@shellback.(none) +0 -0
    Auto merged
    MERGE: 1.23.6.4

  mysql-test/r/innodb_mysql.result@stripped, 2006-10-14 19:55:02+02:00,
msvensson@shellback.(none) +0 -0
    Manual merge
    MERGE: 1.3.1.3

  mysql-test/t/csv.test@stripped, 2006-10-14 19:53:12+02:00, msvensson@shellback.(none) +0 -1
    Auto merged
    MERGE: 1.4.1.1

  mysql-test/t/func_time.test@stripped, 2006-10-14 19:55:02+02:00, msvensson@shellback.(none)
+0 -19
    Manual merge, test already there
    MERGE: 1.21.5.4

  mysql-test/t/innodb_mysql.test@stripped, 2006-10-14 19:55:02+02:00,
msvensson@shellback.(none) +0 -0
    Manual merge
    MERGE: 1.3.1.3

  sql/field.cc@stripped, 2006-10-14 19:53:12+02:00, msvensson@shellback.(none) +0 -0
    Auto merged
    MERGE: 1.197.1.36

  sql/handler.cc@stripped, 2006-10-14 19:53:12+02:00, msvensson@shellback.(none) +0 -0
    Auto merged
    MERGE: 1.103.19.17

  sql/item_timefunc.cc@stripped, 2006-10-14 19:53:12+02:00, msvensson@shellback.(none) +0 -0
    Auto merged
    MERGE: 1.51.6.5

# 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:	shellback.(none)
# Root:	/home/msvensson/mysql/mysql-5.0-maint/RESYNC

--- 1.10/mysql-test/r/innodb_mysql.result	2006-10-14 19:55:14 +02:00
+++ 1.11/mysql-test/r/innodb_mysql.result	2006-10-14 19:55:14 +02:00
@@ -104,6 +104,16 @@
 id1
 2
 DROP TABLE t1, t2;
+flush status;
+create table t1 (c1 int) engine=innodb;
+handler t1 open;
+handler t1 read first;
+c1
+show /*!50002 GLOBAL */ status like 'Handler_rollback';
+Variable_name	Value
+Handler_rollback	0
+drop table t1;
+End of 4.1 tests
 create table t1m (a int) engine=myisam;
 create table t1i (a int) engine=innodb;
 create table t2m (a int) engine=myisam;

--- 1.9/mysql-test/t/innodb_mysql.test	2006-10-14 19:55:14 +02:00
+++ 1.10/mysql-test/t/innodb_mysql.test	2006-10-14 19:55:14 +02:00
@@ -117,6 +117,22 @@
 
 SELECT `id1` FROM `t1` WHERE `id1` NOT IN (SELECT `id1` FROM `t2` WHERE `id2` = 1 AND
`id3` = 2);
 DROP TABLE t1, t2;
+# Bug #22728 - Handler_rollback value is growing
+#
+flush status;
+create table t1 (c1 int) engine=innodb;
+connect (con1,localhost,root,,);
+connect (con2,localhost,root,,);
+connection con2;
+handler t1 open;
+handler t1 read first;
+disconnect con2;
+connection con1;
+show /*!50002 GLOBAL */ status like 'Handler_rollback';
+connection default;
+drop table t1;
+disconnect con1;
+--echo End of 4.1 tests
 #
 # Bug #12882  	min/max inconsistent on empty table
 #

--- 1.26/mysql-test/lib/mtr_cases.pl	2006-10-14 19:55:14 +02:00
+++ 1.27/mysql-test/lib/mtr_cases.pl	2006-10-14 19:55:14 +02:00
@@ -575,8 +575,6 @@
 
   while ( my $line= <$F> )
   {
-    next if ( $line !~ /^--/ );
-
     # Match this line against tag in "tags" array
     foreach my $tag (@tags)
     {
@@ -588,14 +586,21 @@
     }
 
     # If test sources another file, open it as well
-    if ( $line =~ /^\-\-([[:space:]]*)source(.*)$/ )
+    if ( $line =~ /^\-\-([[:space:]]*)source(.*)$/ or
+	 $line =~ /^([[:space:]]*)source(.*);$/ )
     {
       my $value= $2;
       $value =~ s/^\s+//;  # Remove leading space
       $value =~ s/[[:space:]]+$//;  # Remove ending space
 
       my $sourced_file= "$::glob_mysql_test_dir/$value";
-      mtr_options_from_test_file($tinfo, $sourced_file);
+      if ( -f $sourced_file )
+      {
+	# Only source the file if it exists, we may get
+	# false positives in the regexes above if someone
+	# writes "source nnnn;" in a test case(such as mysqltest.test)
+	mtr_options_from_test_file($tinfo, $sourced_file);
+      }
     }
 
   }

--- 1.26/mysql-test/lib/mtr_report.pl	2006-10-14 19:55:14 +02:00
+++ 1.27/mysql-test/lib/mtr_report.pl	2006-10-14 19:55:14 +02:00
@@ -133,6 +133,7 @@
   if ( $tinfo->{'timeout'} )
   {
     print "[ fail ]  timeout\n";
+    return;
   }
   elsif ( $tinfo->{'ndb_test'} and $::cluster->[0]->{'installed_ok'} eq "NO")
   {

--- 1.130/mysql-test/mysql-test-run.pl	2006-10-14 19:55:14 +02:00
+++ 1.131/mysql-test/mysql-test-run.pl	2006-10-14 19:55:15 +02:00
@@ -468,11 +468,11 @@
   #
 
   # Look for the path where to find the client binaries
-  $path_client_bindir= mtr_path_exists("$glob_basedir/client/release",
+  $path_client_bindir= mtr_path_exists("$glob_basedir/client_release",
+				       "$glob_basedir/client_debug",
+				       "$glob_basedir/client/release",
 				       "$glob_basedir/client/debug",
 				       "$glob_basedir/client",
-				       "$glob_basedir/client_release",
-				       "$glob_basedir/client_debug",
 				       "$glob_basedir/bin");
 
   # Look for the mysqld executable
@@ -484,6 +484,7 @@
 				       "$path_client_bindir/mysqld-debug",
 				       "$path_client_bindir/mysqld-max",
 				       "$glob_basedir/libexec/mysqld",
+				       "$glob_basedir/bin/mysqld",
 				       "$glob_basedir/sql/release/mysqld",
 				       "$glob_basedir/sql/debug/mysqld");
 
@@ -1386,11 +1387,14 @@
       mtr_exe_exists("$ndb_path/src/kernel/ndbd",
 		     "$glob_basedir/bin/ndbd");
 
-    $path_ndb_examples_dir=
-      mtr_path_exists("$ndb_path/ndbapi-examples",
-		      "$ndb_path/examples");
-    $exe_ndb_example=
-      mtr_file_exists("$path_ndb_examples_dir/ndbapi_simple/ndbapi_simple");
+    if ( $mysql_version_id >= 50000 )
+    {
+      $path_ndb_examples_dir=
+	mtr_path_exists("$ndb_path/ndbapi-examples",
+			"$ndb_path/examples");
+      $exe_ndb_example=
+	mtr_file_exists("$path_ndb_examples_dir/ndbapi_simple/ndbapi_simple");
+    }
   }
 
   # Look for the udf_example library
@@ -1413,18 +1417,27 @@
 
   }
 
-  # Look for mysql_client_test executable
-  if ( $glob_use_embedded_server )
+  if ( $glob_win32 and $mysql_version_id < 50000 )
   {
-    $exe_mysql_client_test=
-      mtr_exe_exists("$glob_basedir/libmysqld/examples/mysql_client_test_embedded");
+    # Skip looking for exe_mysql_client_test as its not built by default
+    # in 4.1 for windows.
+    $exe_mysql_client_test= "unavailable";
   }
   else
   {
-    $exe_mysql_client_test=
-      mtr_exe_exists("$glob_basedir/tests/mysql_client_test",
-		     "$glob_basedir/tests/release/mysql_client_test",
-		     "$glob_basedir/tests/debug/mysql_client_test");
+    # Look for mysql_client_test executable
+    if ( $glob_use_embedded_server )
+    {
+      $exe_mysql_client_test=
+	mtr_exe_exists("$glob_basedir/libmysqld/examples/mysql_client_test_embedded");
+    }
+    else
+    {
+	$exe_mysql_client_test=
+	  mtr_exe_exists("$glob_basedir/tests/mysql_client_test",
+			 "$glob_basedir/tests/release/mysql_client_test",
+			 "$glob_basedir/tests/debug/mysql_client_test");
+      }
   }
 }
 
@@ -1548,8 +1561,11 @@
     $ENV{'NDB_TOOLS_OUTPUT'}=         $path_ndb_testrun_log;
     $ENV{'NDB_CONNECTSTRING'}=        $opt_ndbconnectstring;
 
-    $ENV{'NDB_EXAMPLES_DIR'}=         $path_ndb_examples_dir;
-    $ENV{'MY_NDB_EXAMPLES_BINARY'}=   $exe_ndb_example;
+    if ( $mysql_version_id >= 50000 )
+    {
+      $ENV{'NDB_EXAMPLES_DIR'}=         $path_ndb_examples_dir;
+      $ENV{'MY_NDB_EXAMPLES_BINARY'}=   $exe_ndb_example;
+    }
     $ENV{'NDB_EXAMPLES_OUTPUT'}=      $path_ndb_testrun_log;
   }
 
@@ -2809,6 +2825,33 @@
 }
 
 
+sub find_testcase_skipped_reason($)
+{
+  my ($tinfo)= @_;
+
+  # Open mysqltest.log
+  my $F= IO::File->new($path_timefile) or
+    mtr_error("can't open file \"$path_timefile\": $!");
+  my $reason;
+
+  while ( my $line= <$F> )
+  {
+    # Look for "reason: <reason fo skiping test>"
+    if ( $line =~ /reason: (.*)/ )
+    {
+      $reason= $1;
+    }
+  }
+
+  if ( ! $reason )
+  {
+    mtr_warning("Could not find reason for skipping test in $path_timefile");
+    $reason= "Detected by testcase(reason unknown) ";
+  }
+  $tinfo->{'comment'}= $reason;
+}
+
+
 ##############################################################################
 #
 #  Run a single test case
@@ -2881,10 +2924,7 @@
       # Testcase itself tell us to skip this one
 
       # Try to get reason from mysqltest.log
-      my $last_line= mtr_lastlinefromfile($path_timefile) if -f $path_timefile;
-      my $reason= mtr_match_prefix($last_line, "reason: ");
-      $tinfo->{'comment'}=
-	defined $reason ? $reason : "Detected by testcase(reason unknown) ";
+      find_testcase_skipped_reason($tinfo);
       mtr_report_test_skipped($tinfo);
     }
     elsif ( $res == 63 )

--- 1.59/mysql-test/t/func_time.test	2006-10-14 19:55:15 +02:00
+++ 1.60/mysql-test/t/func_time.test	2006-10-14 19:55:15 +02:00
@@ -488,8 +488,6 @@
 #
 # check if SEC_TO_TIME() handles BIGINT UNSIGNED values correctly
 SELECT SEC_TO_TIME(CAST(-1 AS UNSIGNED));
-
-#
 # 21913: DATE_FORMAT() Crashes mysql server if I use it through
 #        mysql-connector-j driver.
 #

--- 1.251/client/mysqltest.c	2006-10-14 19:55:15 +02:00
+++ 1.252/client/mysqltest.c	2006-10-14 19:55:15 +02:00
@@ -890,7 +890,7 @@
     die(NullS);
   if (!eval_result && (uint) stat_info.st_size != ds->length)
   {
-    DBUG_PRINT("info",("Size differs:  result size: %u  file size: %u",
+    DBUG_PRINT("info",("Size differs:  result size: %u  file size: %llu",
 		       ds->length, stat_info.st_size));
     DBUG_PRINT("info",("result: '%s'", ds->str));
     DBUG_RETURN(RESULT_LENGTH_MISMATCH);
@@ -1810,7 +1810,7 @@
 void read_until_delimiter(DYNAMIC_STRING *ds,
                           DYNAMIC_STRING *ds_delimiter)
 {
-  int c;
+  char c;
   DBUG_ENTER("read_until_delimiter");
   DBUG_PRINT("enter", ("delimiter: %s, length: %d",
                        ds_delimiter->str, ds_delimiter->length));
@@ -2558,7 +2558,7 @@
 
       *to_ptr= 0;
       to->type= ERR_SQLSTATE;
-      DBUG_PRINT("info", ("ERR_SQLSTATE: %d", to->code.sqlstate));
+      DBUG_PRINT("info", ("ERR_SQLSTATE: %s", to->code.sqlstate));
     }
     else if (*p == 's')
     {
@@ -3346,7 +3346,7 @@
   LINT_INIT(last_quote);
 
   start_lineno= cur_file->lineno;
-  DBUG_PRINT("info", ("start_lineno: %d", start_lineno));
+  DBUG_PRINT("info", ("Starting to read at lineno: %d", start_lineno));
   for (; p < buf_end ;)
   {
     skip_char= 0;
@@ -3370,7 +3370,7 @@
           die("Missing end of block");
 
         *p= 0;
-        DBUG_PRINT("info", ("end of file"));
+        DBUG_PRINT("info", ("end of file at line %d", cur_file->lineno));
         DBUG_RETURN(1);
       }
       cur_file--;
@@ -3393,17 +3393,21 @@
       if (end_of_query(c))
       {
 	*p= 0;
-        DBUG_PRINT("exit", ("Found delimiter '%s'", delimiter));
+        DBUG_PRINT("exit", ("Found delimiter '%s' at line %d",
+                            delimiter, cur_file->lineno));
 	DBUG_RETURN(0);
       }
       else if ((c == '{' &&
-                (!strncasecmp(buf, "while", min(5, p - buf)) ||
-                 !strncasecmp(buf, "if", min(2, p - buf)))))
+                (!my_strnncoll_simple(charset_info, "while", 5,
+                                      buf, min(5, p - buf), 0) ||
+                 !my_strnncoll_simple(charset_info, "if", 2,
+                                      buf, min(2, p - buf), 0))))
       {
         /* Only if and while commands can be terminated by { */
         *p++= c;
 	*p= 0;
-        DBUG_PRINT("exit", ("Found '{' indicating begining of block"));
+        DBUG_PRINT("exit", ("Found '{' indicating start of block at line %d",
+                            cur_file->lineno));
 	DBUG_RETURN(0);
       }
       else if (c == '\'' || c == '"' || c == '`')
@@ -3418,7 +3422,8 @@
       {
         /* Comments are terminated by newline */
 	*p= 0;
-        DBUG_PRINT("exit", ("Found newline in comment"));
+        DBUG_PRINT("exit", ("Found newline in comment at line: %d",
+                            cur_file->lineno));
 	DBUG_RETURN(0);
       }
       break;
@@ -3433,13 +3438,19 @@
       {
         /* Skip all space at begining of line */
 	if (c == '\n')
-	  start_lineno= cur_file->lineno; /* Query hasn't started yet */
+        {
+          /* Query hasn't started yet */
+	  start_lineno= cur_file->lineno;
+          DBUG_PRINT("info", ("Query hasn't started yet, start_lineno: %d",
+                              start_lineno));
+        }
 	skip_char= 1;
       }
       else if (end_of_query(c))
       {
 	*p= 0;
-        DBUG_PRINT("exit", ("Found delimiter '%s'", delimiter));
+        DBUG_PRINT("exit", ("Found delimiter '%s' at line: %d",
+                            delimiter, cur_file->lineno));
 	DBUG_RETURN(0);
       }
       else if (c == '}')
@@ -3447,7 +3458,8 @@
         /* A "}" need to be by itself in the begining of a line to terminate */
         *p++= c;
 	*p= 0;
-        DBUG_PRINT("exit", ("Found '}' in begining of a line"));
+        DBUG_PRINT("exit", ("Found '}' in begining of a line at line: %d",
+                            cur_file->lineno));
 	DBUG_RETURN(0);
       }
       else if (c == '\'' || c == '"' || c == '`')
@@ -4317,7 +4329,7 @@
     bind[i].is_null= &is_null[i];
     bind[i].length= &length[i];
 
-    DBUG_PRINT("bind", ("col[%d]: buffer_type: %d, buffer_length: %d",
+    DBUG_PRINT("bind", ("col[%d]: buffer_type: %d, buffer_length: %lu",
 			i, bind[i].buffer_type, bind[i].buffer_length));
   }
 
@@ -7267,5 +7279,3 @@
   char *end= longlong10_to_str(val, buff, 10);
   replace_dynstr_append_mem(ds, buff, end - buff);
 }
-
-
Thread
bk commit into 5.0 tree (msvensson:1.2306)msvensson14 Oct