Commit 98fd2991 authored by unknown's avatar unknown
Browse files

Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint_20061016

into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint


BitKeeper/deleted/.del-collapsed:
  auto-union
BitKeeper/etc/collapsed:
  auto-union
Makefile.am:
  Auto merged
client/mysql.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqltest.c:
  Auto merged
include/my_dbug.h:
  Auto merged
mysql-test/lib/mtr_cases.pl:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/csv.result:
  Auto merged
mysql-test/r/mysql.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/csv.test:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
netware/BUILD/compile-netware-END:
  Auto merged
sql/field.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
sql/sql_view.h:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/time.cc:
  Auto merged
vio/viosocket.c:
  Auto merged
vio/viossl.c:
  Auto merged
mysql-test/include/mix1.inc:
  Manual merge.
mysql-test/r/func_time.result:
  Manual merge.
mysql-test/r/innodb_mysql.result:
  Manual merge.
mysql-test/t/func_time.test:
  Manual merge.
mysql-test/t/view.test:
  Manual merge.
sql/sql_view.cc:
  Manual merge.
parents dd8a33c0 48dfeb4d
Loading
Loading
Loading
Loading
+26 −16
Original line number Diff line number Diff line
@@ -890,7 +890,7 @@ int dyn_string_cmp(DYNAMIC_STRING* ds, const char *fname)
    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 my_ungetc(int c)
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 @@ void do_get_errcodes(struct st_command *command)

      *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 @@ int read_line(char *buf, int size)
  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 @@ int read_line(char *buf, int size)
          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 @@ int read_line(char *buf, int size)
      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 @@ int read_line(char *buf, int size)
      {
        /* 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 @@ int read_line(char *buf, int size)
      {
        /* 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 @@ int read_line(char *buf, int size)
        /* 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 @@ void append_stmt_result(DYNAMIC_STRING *ds, MYSQL_STMT *stmt,
    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 @@ void replace_dynstr_append_uint(DYNAMIC_STRING *ds, uint val)
  char *end= longlong10_to_str(val, buff, 10);
  replace_dynstr_append_mem(ds, buff, end - buff);
}

+2 −1
Original line number Diff line number Diff line
@@ -39,7 +39,8 @@ extern void _db_enter_(const char *_func_,const char *_file_,uint _line_,
extern	void _db_return_(uint _line_,const char **_sfunc_,const char **_sfile_,
			 uint *_slevel_);
extern	void _db_pargs_(uint _line_,const char *keyword);
extern	void _db_doprnt_ _VARARGS((const char *format,...));
extern	void _db_doprnt_ _VARARGS((const char *format,...))
  ATTRIBUTE_FORMAT(printf, 1, 2);
extern	void _db_dump_(uint _line_,const char *keyword,const char *memory,
		       uint length);
extern	void _db_end_(void);
+20 −0
Original line number Diff line number Diff line
@@ -153,6 +153,26 @@ INSERT INTO `t2`(`id1`,`id2`,`id3`,`id4`) VALUES
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
#
+9 −4
Original line number Diff line number Diff line
@@ -575,8 +575,6 @@ sub mtr_options_from_test_file($$) {

  while ( my $line= <$F> )
  {
    next if ( $line !~ /^--/ );

    # Match this line against tag in "tags" array
    foreach my $tag (@tags)
    {
@@ -588,15 +586,22 @@ sub mtr_options_from_test_file($$) {
    }

    # 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";
      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 −0
Original line number Diff line number Diff line
@@ -133,6 +133,7 @@ sub mtr_report_test_failed ($) {
  if ( $tinfo->{'timeout'} )
  {
    print "[ fail ]  timeout\n";
    return;
  }
  elsif ( $tinfo->{'ndb_test'} and $::cluster->[0]->{'installed_ok'} eq "NO")
  {
Loading