Commit 14394109 authored by cmiller@zippy.cornsilk.net's avatar cmiller@zippy.cornsilk.net
Browse files

Merge bk-internal.mysql.com:/home/bk/mysql-5.0

into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
parents 374ff97c b56f668c
Loading
Loading
Loading
Loading
+11 −10
Original line number Diff line number Diff line
@@ -4,8 +4,6 @@
*.bb
*.bbg
*.bin
*.vcproj.cmake
cmake_install.cmake
*.cdf
*.core
*.d
@@ -33,6 +31,7 @@ cmake_install.cmake
*.spec
*.user
*.vcproj
*.vcproj.cmake
*/*.dir/*
*/*_pure_*warnings
*/.deps
@@ -347,6 +346,7 @@ client/tmp.diff
client_debug/*
client_release/*
client_test
cmake_install.cmake
cmd-line-utils/libedit/common.h
cmd-line-utils/libedit/makelist
comon.h
@@ -366,6 +366,9 @@ contrib/*.vcproj
core
core.*
core.2430
cscope.in.out
cscope.out
cscope.po.out
db-*.*.*
dbug/*.ds?
dbug/*.vcproj
@@ -377,6 +380,8 @@ dbug/main.r
dbug/output*.r
dbug/user.ps
dbug/user.t
debian/control
debian/defs.mk
depcomp
emacs.h
examples/*.ds?
@@ -413,6 +418,7 @@ heap/hp_test2
help
help.c
help.h
include/abi_check
include/check_abi
include/my_config.h
include/my_global.h
@@ -472,6 +478,7 @@ libmysql/release/libmysql.exp
libmysql/vio_priv.h
libmysql_r/*.c
libmysql_r/acconfig.h
libmysql_r/client_settings.h
libmysql_r/conf_to_src
libmysql_r/my_static.h
libmysql_r/mysys_priv.h
@@ -1257,6 +1264,7 @@ support-files/mysql-3.23.29-gamma.spec
support-files/mysql-log-rotate
support-files/mysql.server
support-files/mysql.spec
support-files/mysqld_multi.server
support-files/ndb-config-2-node.ini
tags
test/ndbapi/bank/bankCreator
@@ -1315,6 +1323,7 @@ test_xml
tests/*.ds?
tests/*.vcproj
tests/.libs -prune
tests/bug25714
tests/client_test
tests/connect_test
tests/mysql_client_test
@@ -1342,11 +1351,3 @@ win/vs71cache.txt
win/vs8cache.txt
zlib/*.ds?
zlib/*.vcproj
debian/control
debian/defs.mk
include/abi_check
support-files/mysqld_multi.server
tests/bug25714
cscope.in.out
cscope.out
cscope.po.out
+26 −0
Original line number Diff line number Diff line
#!/usr/bin/perl
my $status = 0;

my $pending = $ENV{'BK_PENDING'};
exit 0 unless -f $pending;

open FI, "<", $pending || exit 0;
while(<FI>) {
	my ($file, $stuff) = split /\|/, $_, 2;
	next unless -f $file;
	$file =~ s/^(.*)\/([^\/]*)$/$2/;
	my $path = $1;
	opendir DIR, $path;
	my @files = sort map { lc } readdir DIR;
	closedir DIR;
	my %count = ();
	$count{$_}++ for @files;
	@files = grep { $count{$_} > 1 } keys %count;
	if(@files > 0) {
		print "$path/$file: duplicate file names: " . (join " ", @files) . "\n";
		$status = 1;
	}
}
close FI;

exit $status;
+9 −8
Original line number Diff line number Diff line
@@ -109,6 +109,15 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR
    STRING(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS_INIT       ${CMAKE_CXX_FLAGS_INIT})
    STRING(REPLACE "/EHsc" "" CMAKE_CXX_FLAGS_DEBUG_INIT ${CMAKE_CXX_FLAGS_DEBUG_INIT})

    # Disable automatic manifest generation.
    STRING(REPLACE "/MANIFEST" "/MANIFEST:NO" CMAKE_EXE_LINKER_FLAGS 
    	   ${CMAKE_EXE_LINKER_FLAGS})
    # Explicitly disable it since it is the default for newer versions of VS
    STRING(REGEX MATCH "MANIFEST:NO" tmp_manifest ${CMAKE_EXE_LINKER_FLAGS})
    IF(NOT tmp_manifest)
        SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO")
    ENDIF(NOT tmp_manifest)

ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR 
      CMAKE_GENERATOR MATCHES "Visual Studio 8")

@@ -156,14 +165,6 @@ IF(EMBED_MANIFESTS)
        MESSAGE(FATAL_ERROR "Sign tool, signtool.exe, can't be found.")
    ENDIF(HAVE_SIGN_TOOL)

    # Disable automatic manifest generation.
    STRING(REPLACE "/MANIFEST" "/MANIFEST:NO" CMAKE_EXE_LINKER_FLAGS 
    	   ${CMAKE_EXE_LINKER_FLAGS})
    # Explicitly disable it since it is the default for newer versions of VS
    STRING(REGEX MATCH "MANIFEST:NO" tmp_manifest ${CMAKE_EXE_LINKER_FLAGS})
    IF(NOT tmp_manifest)
        SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO")
    ENDIF(NOT tmp_manifest)
    # Set the processor architecture.
    IF(CMAKE_GENERATOR MATCHES "Visual Studio 8 2005 Win64")
    	SET(PROCESSOR_ARCH "amd64") 
+1 −1
Original line number Diff line number Diff line
@@ -51,5 +51,5 @@ enum options_client
  OPT_TRIGGERS,
  OPT_IGNORE_TABLE,OPT_INSERT_IGNORE,OPT_SHOW_WARNINGS,OPT_DROP_DATABASE,
  OPT_TZ_UTC, OPT_AUTO_CLOSE, OPT_SSL_VERIFY_SERVER_CERT,
  OPT_DEBUG_INFO, OPT_ERROR_LOG_FILE
  OPT_DEBUG_INFO, OPT_ERROR_LOG_FILE, OPT_DUMP_DATE
};
+124 −43
Original line number Diff line number Diff line
@@ -140,6 +140,7 @@ static my_bool info_flag=0,ignore_errors=0,wait_flag=0,quick=0,
               default_pager_set= 0, opt_sigint_ignore= 0,
               show_warnings= 0;
static volatile int executing_query= 0, interrupted_query= 0;
static my_bool preserve_comments= 0;
static ulong opt_max_allowed_packet, opt_net_buffer_length;
static uint verbose=0,opt_silent=0,opt_mysql_port=0, opt_local_infile=0;
static my_string opt_mysql_unix_port=0;
@@ -759,6 +760,10 @@ static struct my_option my_long_options[] =
  {"show-warnings", OPT_SHOW_WARNINGS, "Show warnings after every statement.",
    (gptr*) &show_warnings, (gptr*) &show_warnings, 0, GET_BOOL, NO_ARG, 
    0, 0, 0, 0, 0, 0},
  {"comments", 'c', "Preserve comments. Send comments to the server."
   " Comments are discarded by default, enable with --enable-comments",
   (gptr*) &preserve_comments, (gptr*) &preserve_comments,
   0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
  { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};

@@ -1136,10 +1141,6 @@ static int read_and_execute(bool interactive)
      status.exit_status=0;
      break;
    }
    if (!in_string && (line[0] == '#' ||
		       (line[0] == '-' && line[1] == '-') ||
		       line[0] == 0))
      continue;					// Skip comment lines

    /*
      Check if line is a mysql command line
@@ -1265,15 +1266,21 @@ static bool add_line(String &buffer,char *line,char *in_string,

  for (pos=out=line ; (inchar= (uchar) *pos) ; pos++)
  {
    if (my_isspace(charset_info,inchar) && out == line && 
    if (!preserve_comments)
    {
      // Skip spaces at the beggining of a statement
      if (my_isspace(charset_info,inchar) && (out == line) &&
          buffer.is_empty())
        continue;
    }
        
#ifdef USE_MB
    // Accept multi-byte characters as-is
    int length;
    if (use_mb(charset_info) &&
        (length= my_ismbchar(charset_info, pos, end_of_line)))
    {
      if (!*ml_comment)
      if (!*ml_comment || preserve_comments)
      {
        while (length--)
          *out++ = *pos++;
@@ -1299,8 +1306,13 @@ static bool add_line(String &buffer,char *line,char *in_string,
      }
      if ((com=find_command(NullS,(char) inchar)))
      {
        const String tmp(line,(uint) (out-line), charset_info);
        buffer.append(tmp);
        // Flush previously accepted characters
        if (out != line)
        {
          buffer.append(line, (uint) (out-line));
          out= line;
        }
        
        if ((*com->func)(&buffer,pos-1) > 0)
          DBUG_RETURN(1);                       // Quit
        if (com->takes_params)
@@ -1328,7 +1340,6 @@ static bool add_line(String &buffer,char *line,char *in_string,
              pos+= delimiter_length - 1; // Point at last delim char
          }
        }
        out=line;
      }
      else
      {
@@ -1341,26 +1352,68 @@ static bool add_line(String &buffer,char *line,char *in_string,
      }
    }
    else if (!*ml_comment && !*in_string &&
             (*pos == *delimiter && is_prefix(pos + 1, delimiter + 1) ||
              buffer.length() == 0 && (out - line) >= 9 &&
              !my_strcasecmp(charset_info, line, "delimiter")))
             strlen(pos) >= 10 &&
             !my_strnncoll(charset_info, (uchar*) pos, 10,
                           (const uchar*) "delimiter ", 10))
    {
      uint old_delimiter_length= delimiter_length;
      // Flush previously accepted characters
      if (out != line)
	buffer.append(line, (uint) (out - line));	// Add this line
      if ((com= find_command(buffer.c_ptr(), 0)))
      {
        if (com->func == com_delimiter)
        buffer.append(line, (uint32) (out - line));
        out= line;
      }

      // Flush possible comments in the buffer
      if (!buffer.is_empty())
      {
        if (com_go(&buffer, 0) > 0) // < 0 is not fatal
          DBUG_RETURN(1);
        buffer.length(0);
      }

      /*
        Delimiter wants the get rest of the given line as argument to
        allow one to change ';' to ';;' and back
      */
          char *end= strend(pos);
          buffer.append(pos, (uint) (end - pos));
          /* Ensure pos will point at \0 after the pos+= below */
          pos= end - old_delimiter_length + 1;
      buffer.append(pos);
      if (com_delimiter(&buffer, pos) > 0)
        DBUG_RETURN(1);

      buffer.length(0);
      break;
    }
    else if (!*ml_comment && !*in_string && is_prefix(pos, delimiter))
    {
      // Found a statement. Continue parsing after the delimiter
      pos+= delimiter_length;

      if (preserve_comments)
      {
        while (my_isspace(charset_info, *pos))
          *out++= *pos++;
      }
      // Flush previously accepted characters
      if (out != line)
      {
        buffer.append(line, (uint32) (out-line));
        out= line;
      }

      if (preserve_comments && ((*pos == '#') ||
                                ((*pos == '-') &&
                                 (pos[1] == '-') &&
                                 my_isspace(charset_info, pos[2]))))
      {
        // Add trailing single line comments to this statement
        buffer.append(pos);
        pos+= strlen(pos);
      }

      pos--;

      if ((com= find_command(buffer.c_ptr(), 0)))
      {
          
        if ((*com->func)(&buffer, buffer.c_ptr()) > 0)
          DBUG_RETURN(1);                       // Quit 
      }
@@ -1370,16 +1423,33 @@ static bool add_line(String &buffer,char *line,char *in_string,
          DBUG_RETURN(1);
      }
      buffer.length(0);
      out= line;
      pos+= old_delimiter_length - 1;
    }
    else if (!*ml_comment && (!*in_string && (inchar == '#' ||
			      inchar == '-' && pos[1] == '-' &&
			      my_isspace(charset_info,pos[2]))))
      break;					// comment to end of line
    {
      // Flush previously accepted characters
      if (out != line)
      {
        buffer.append(line, (uint32) (out - line));
        out= line;
      }

      // comment to end of line
      if (preserve_comments)
        buffer.append(pos);

      break;
    }
    else if (!*in_string && inchar == '/' && *(pos+1) == '*' &&
	     *(pos+2) != '!')
    {
      if (preserve_comments)
      {
        *out++= *pos++;                       // copy '/'
        *out++= *pos;                         // copy '*'
      }
      else
        pos++;
      *ml_comment= 1;
      if (out != line)
@@ -1390,8 +1460,21 @@ static bool add_line(String &buffer,char *line,char *in_string,
    }
    else if (*ml_comment && !ss_comment && inchar == '*' && *(pos + 1) == '/')
    {
      if (preserve_comments)
      {
        *out++= *pos++;                       // copy '*'
        *out++= *pos;                         // copy '/'
      }
      else
        pos++;
      *ml_comment= 0;
      if (out != line)
      {
        buffer.append(line, (uint32) (out - line));
        out= line;
      }
      // Consumed a 2 chars or more, and will add 1 at most,
      // so using the 'line' buffer to edit data in place is ok.
      need_space= 1;
    }      
    else
@@ -1406,13 +1489,11 @@ static bool add_line(String &buffer,char *line,char *in_string,
      else if (!*ml_comment && !*in_string &&
	       (inchar == '\'' || inchar == '"' || inchar == '`'))
	*in_string= (char) inchar;
      if (!*ml_comment)
      if (!*ml_comment || preserve_comments)
      {
        if (need_space && !my_isspace(charset_info, (char)inchar))
        {
          *out++= ' ';
        need_space= 0;
        }
        *out++= (char) inchar;
      }
    }
@@ -1423,7 +1504,7 @@ static bool add_line(String &buffer,char *line,char *in_string,
    uint length=(uint) (out-line);
    if (buffer.length() + length >= buffer.alloced_length())
      buffer.realloc(buffer.length()+length+IO_SIZE);
    if (!(*ml_comment) && buffer.append(line,length))
    if ((!*ml_comment || preserve_comments) && buffer.append(line, length))
      DBUG_RETURN(1);
  }
  DBUG_RETURN(0);
Loading