Commit afd8a6db authored by monty@hundin.mysql.fi's avatar monty@hundin.mysql.fi
Browse files

Merge work:/home/bk/mysql into hundin.mysql.fi:/my/bk/mysql

parents aac4bdef 733f865f
Loading
Loading
Loading
Loading
+46 −6
Original line number Diff line number Diff line
@@ -10714,6 +10714,10 @@ ld: fatal: library -ldl: not found
or
undefined reference to `dlopen'
or
cannot find -lrt
@end example
If too many processes try to connect very rapidly to @code{mysqld}, you will
@@ -19875,8 +19879,8 @@ will be incremented. If you are using @code{--log-slow-queries}, the query
will be logged to the slow query logfile. @xref{Slow query log}.
@item @code{lower_case_table_names}
If set to 1 table names are stored in lowercase on disk. This will enable
you to access the table names case-insensitive also on Unix.
If set to 1 table names are stored in lowercase on disk and table
names will be case-insensitive.
@xref{Name case sensitivity}.
@item @code{max_allowed_packet}
@@ -38431,6 +38435,8 @@ is to upgrade to MyODBC Version 2.50.33 and MySQL Version
You should also get and apply the Microsoft Jet 4.0 Service Pack 5 (SP5)
which can be found here
@uref{http://support.microsoft.com/support/kb/articles/Q 239/1/14.ASP}.
This will fix some cases where columns are marked as @code{#deleted#}
in Access.
Note that if you are using MySQL Version 3.22, you must to apply the
MDAC patch and use MyODBC 2.50.32 or 2.50.34 and above to go around
@@ -43273,6 +43279,11 @@ expecting to store the full length of a @code{BLOB} into a table, you'll need
to start the server with the @code{--set-variable=max_allowed_packet=16M}
option.
You can also get strange problems with large packets if you are using
big blobs, but you haven't given @code{mysqld} access to enough memory
to handle the query.  If you suspect this is the case, try adding
@code{ulimit -d 256000} to the beginning of the @code{safe_mysqld} script
and restart @code{mysqld}.
@node Communication errors, Full table, Packet too large, Common errors
@appendixsubsec Communication Errors / Aborted Connection
@@ -43344,6 +43355,9 @@ Badly configured TCP/IP.
@item
Faulty Ethernets or hubs or switches, cables ... This can be diagnosed
properly only by replacing hardware.
@item
@code{max_allowed_packet} is too small or queries require more memory
than you have alloacated for @code{mysqld}. @xref{Packet too large}.
@end itemize
@@ -45719,7 +45733,7 @@ By Steve Shreeve.
Perl program to convert Oracle databases to MySQL. Has same
output format as mysqldump. By Johan Andersson.
@item @uref{http://www.mysql.com/Downloads/Contrib/excel2mysql, excel2mysql}
@item @uref{http://www.mysql.com/Downloads/Contrib/excel2mysql.pl, excel2mysql.pl}
Perl program to import Excel spreadsheets into a MySQL database. By Stephen Hurd @email{shurd@@sk.sympatico.ca}
@item @uref{http://www.mysql.com/Downloads/Contrib/T2S_100.ZIP, T2S_100.ZIP}.
@@ -46141,6 +46155,8 @@ incredible help we got in managing the MySQL mailing lists.
@item Igor Romanenko @email{igor@@frog.kiev.ua}
@code{mysqldump} (previously @code{msqldump}, but ported and enhanced by
Monty).
@item Yuri Dario
For keeping up and extending the MySQL OS/2 port.
@item Tim Bunce, Alligator Descartes
For the @code{DBD} (Perl) interface.
@item Tim Bunce
@@ -46268,6 +46284,8 @@ MySQL server.
@item Albert Chin-A-Young.
Configure updates for Tru64, large file support and better TCP wrappers
support.
@item John Birrell
Emulation of pthread_mutex() for OS/2.
@end table
Other contributors, bugfinders, and testers: James H. Thompson, Maurizio
@@ -46529,12 +46547,24 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.42
@itemize @bullet
@item
Applied large patch for OS/2 from Yuri Dario.
@item
Fixed problem with InnoDB when one could get the error @code{Can't
execute the given command...} even when one didn't have an active
transaction.
@item
Applied some fixes for Gemini.
@item
Use real arithmetic operations even in integer context if not
all arguments are integers. (Fixes uncommon bug in some integer
context).
@item
Don't force everything to lower cases on windows. (To fix problem
with windows and @code{ALTER TABLE}).
with windows and @code{ALTER TABLE}).  Now @code{--lower_case_names}
also works on Unix.
@item
Fixed that automatic rollback that is done when thread end doesn't lock
other threads.
@end itemize
@node News-3.23.41, News-3.23.40, News-3.23.42, News-3.23.x
@@ -52045,9 +52075,19 @@ Start the @code{mysqld} server with a trace log in @file{/tmp/mysqld.trace}
@code{mysqld --debug}
On Windows you should also use the @code{--standalone} flag to not start
@code{mysqld} as a service.
Note that the trace file will get very @emph{BIG}!
@code{mysqld} as a service:
In a DOS window do:
@example
mysqld --debug --standalone
@end example
After this you can use the @code{mysql.exe} command line tool in a
second DOS window to reproduce the problem. You can take down the above
@code{mysqld} server with @code{mysqladmin shutdown}.
Note that the trace file will get very @emph{BIG}!
If you want to have a smaller trace file, you can use something like:
@code{mysqld --debug=d,info,error,query,general,where:O,/tmp/mysqld.trace}
+30 −8
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ extern "C" {

#undef bcmp				// Fix problem with new readline
#undef bzero
#ifdef __WIN__
#if defined( __WIN__) || defined(OS2)
#include <conio.h>
#else
#include <readline/readline.h>
@@ -569,7 +569,7 @@ static int get_options(int argc, char **argv)

  set_all_changeable_vars(changeable_vars);
  while ((c=getopt_long(argc,argv,
			"?ABCD:LfgGHinNoqrstTU::vVw::WEe:h:O:P:S:u:#::p::",
			(char*) "?ABCD:LfgGHinNoqrstTU::vVw::WEe:h:O:P:S:u:#::p::",
			long_options, &option_index)) != EOF)
  {
    switch(c) {
@@ -767,10 +767,20 @@ static int get_options(int argc, char **argv)
  return(0);
}

#if  defined(OS2)
static char* readline( char* prompt)
{
#if defined(OS2)
   static char linebuffer[254];
#endif
   puts( prompt);
   return gets( linebuffer);
}
#endif

static int read_lines(bool execute_commands)
{
#ifdef __WIN__
#if defined( __WIN__) || defined(OS2)
  char linebuffer[254];
#endif
  char	*line;
@@ -790,7 +800,7 @@ static int read_lines(bool execute_commands)
    }
    else
    {
#ifdef __WIN__
#if defined( __WIN__) || defined(OS2)
      if (opt_outfile && glob_buffer.is_empty())
	fflush(OUTFILE);
      tee_fputs(glob_buffer.is_empty() ? "mysql> " :
@@ -1483,7 +1493,7 @@ com_go(String *buffer,char *line __attribute__((unused)))

static void init_pager()
{
#ifndef __WIN__
#if !defined( __WIN__) && !defined( OS2)
  if (!opt_nopager)
  {
    if (!(PAGER= popen(pager, "w")))
@@ -1499,7 +1509,7 @@ static void init_pager()

static void end_pager()
{
#ifndef __WIN__
#if !defined( __WIN__) && !defined( OS2)
  if (!opt_nopager)
    pclose(PAGER);
#endif
@@ -2337,6 +2347,9 @@ void tee_fprintf(FILE *file, const char *fmt, ...)

  va_start(args, fmt);
  (void) vfprintf(file, fmt, args);
#ifdef OS2
  fflush( file);
#endif
  if (opt_outfile)
    (void) vfprintf(OUTFILE, fmt, args);
  va_end(args);
@@ -2346,6 +2359,9 @@ void tee_fprintf(FILE *file, const char *fmt, ...)
void tee_fputs(const char *s, FILE *file)
{
  fputs(s, file);
#ifdef OS2
  fflush( file);
#endif
  if (opt_outfile)
    fputs(s, OUTFILE);
}
@@ -2355,6 +2371,9 @@ void tee_puts(const char *s, FILE *file)
{
  fputs(s, file);
  fputs("\n", file);
#ifdef OS2
  fflush( file);
#endif
  if (opt_outfile)
  {
    fputs(s, OUTFILE);
@@ -2365,11 +2384,14 @@ void tee_puts(const char *s, FILE *file)
void tee_putc(int c, FILE *file)
{
  putc(c, file);
#ifdef OS2
  fflush( file);
#endif
  if (opt_outfile)
    putc(c, OUTFILE);
}

#ifdef __WIN__
#if defined( __WIN__) || defined( OS2)
#include <time.h>
#else
#include <sys/times.h>
@@ -2379,7 +2401,7 @@ void tee_putc(int c, FILE *file)

static ulong start_timer(void)
{
#ifdef __WIN__
#if defined( __WIN__) || defined( OS2)
 return clock();
#else
  struct tms tms_tmp;
+7 −5
Original line number Diff line number Diff line
@@ -132,7 +132,7 @@ static struct option long_options[] = {
  {0, 0, 0, 0}
};

CHANGEABLE_VAR changeable_vars[] = {
static CHANGEABLE_VAR changeable_vars[] = {
  { "connect_timeout", (long*) &opt_connect_timeout, 0, 0, 3600*12, 0, 1},
  { "shutdown_timeout", (long*) &opt_shutdown_timeout, SHUTDOWN_DEF_TIMEOUT, 0,
    3600*12, 0, 1},
@@ -152,7 +152,8 @@ int main(int argc,char *argv[])
  load_defaults("my",load_default_groups,&argc,&argv);
  set_all_changeable_vars( changeable_vars );

  while ((c=getopt_long(argc,argv,"h:i:p::u:#::P:sS:Ct:fq?vVw::WrEO:",
  while ((c=getopt_long(argc,argv,
			(char*) "h:i:p::u:#::P:sS:Ct:fq?vVw::WrEO:",
			long_options, &option_index)) != EOF)
  {
    switch(c) {
@@ -1121,14 +1122,15 @@ static void wait_pidfile(char *pidfile)
  uint count=0;

  system_filename(buff,pidfile);
  while ((fd = open(buff, O_RDONLY)) >= 0 && count++ < opt_shutdown_timeout)
  while ((fd = my_open(buff, O_RDONLY, MYF(0))) >= 0 &&
	 count++ < opt_shutdown_timeout)
  {
    close(fd);
    my_close(fd,MYF(0));
    sleep(1);
  }
  if (fd >= 0)
  {
    close(fd);
    my_close(fd,MYF(0));
    fprintf(stderr,
	    "Warning;  Aborted waiting on pid file: '%s' after %d seconds\n",
	    buff, count-1);
+0 −2
Original line number Diff line number Diff line
@@ -41,8 +41,6 @@ uint32 server_id = 0;
// needed by net_serv.c
ulong bytes_sent = 0L, bytes_received = 0L;
ulong mysqld_net_retry_count = 10L;
ulong net_read_timeout=  NET_READ_TIMEOUT;
ulong net_write_timeout= NET_WRITE_TIMEOUT;
uint test_flags = 0; 
FILE *result_file;

+42 −42
Original line number Diff line number Diff line
@@ -85,11 +85,11 @@ static int first_error=0;
extern ulong net_buffer_length;
static DYNAMIC_STRING extended_row;
#include "sslopt-vars.h"
FILE  *result_file;
FILE  *md_result_file;

enum options {OPT_FTB=256, OPT_LTB, OPT_ENC, OPT_O_ENC, OPT_ESC, OPT_KEYWORDS,
	      OPT_LOCKS, OPT_DROP, OPT_OPTIMIZE, OPT_DELAYED, OPT_TABLES,
              OPT_CHARSETS_DIR, OPT_DEFAULT_CHARSET};
enum md_options {OPT_FTB=256, OPT_LTB, OPT_ENC, OPT_O_ENC, OPT_ESC,
		 OPT_KEYWORDS, OPT_LOCKS, OPT_DROP, OPT_OPTIMIZE, OPT_DELAYED,
		 OPT_TABLES, MD_OPT_CHARSETS_DIR, MD_OPT_DEFAULT_CHARSET};

static struct option long_options[] =
{
@@ -98,12 +98,12 @@ static struct option long_options[] =
  {"add-drop-table",	no_argument,    0, 	OPT_DROP},
  {"add-locks",    	no_argument,    0,	OPT_LOCKS},
  {"allow-keywords",	no_argument,    0, 	OPT_KEYWORDS},
  {"character-sets-dir",required_argument,0,    OPT_CHARSETS_DIR},
  {"character-sets-dir",required_argument,0,    MD_OPT_CHARSETS_DIR},
  {"complete-insert",	no_argument,    0, 	'c'},
  {"compress",          no_argument,    0, 	'C'},
  {"databases",         no_argument,    0,      'B'},
  {"debug",		optional_argument, 	0, '#'},
  {"default-character-set", required_argument,  0, OPT_DEFAULT_CHARSET},
  {"default-character-set", required_argument,  0, MD_OPT_DEFAULT_CHARSET},
  {"delayed-insert",	no_argument,    0, 	OPT_DELAYED},
  {"extended-insert",   no_argument,    0, 	'e'},
  {"fields-terminated-by", required_argument,   0, (int) OPT_FTB},
@@ -145,7 +145,7 @@ static struct option long_options[] =

static const char *load_default_groups[]= { "mysqldump","client",0 };

CHANGEABLE_VAR changeable_vars[] = {
CHANGEABLE_VAR md_changeable_vars[] = {
  { "max_allowed_packet", (long*) &max_allowed_packet,24*1024*1024,4096,
    24*1024L*1024L,MALLOC_OVERHEAD,1024},
  { "net_buffer_length", (long*) &net_buffer_length,1024*1024L-1025,4096,
@@ -265,10 +265,10 @@ puts("\
  print_defaults("my",load_default_groups);

  printf("\nPossible variables for option --set-variable (-O) are:\n");
  for (i=0 ; changeable_vars[i].name ; i++)
  for (i=0 ; md_changeable_vars[i].name ; i++)
    printf("%-20s  current value: %lu\n",
     changeable_vars[i].name,
     (ulong) *changeable_vars[i].varptr);
     md_changeable_vars[i].name,
     (ulong) *md_changeable_vars[i].varptr);
} /* usage */


@@ -290,9 +290,9 @@ static int get_options(int *argc,char ***argv)
  int c,option_index;
  my_bool tty_password=0;

  result_file=stdout;
  md_result_file=stdout;
  load_defaults("my",load_default_groups,argc,argv);
  set_all_changeable_vars(changeable_vars);
  set_all_changeable_vars(md_changeable_vars);
  while ((c=getopt_long(*argc,*argv,
			"#::p::h:u:O:P:r:S:T:EBaAcCdefFlnqtvVw:?Ix",
			long_options, &option_index)) != EOF)
@@ -307,10 +307,10 @@ static int get_options(int *argc,char ***argv)
    case 'A':
      opt_alldbs=1;
      break;
    case OPT_DEFAULT_CHARSET:
    case MD_OPT_DEFAULT_CHARSET:
      default_charset= optarg;
      break;
    case OPT_CHARSETS_DIR:
    case MD_OPT_CHARSETS_DIR:
      charsets_dir= optarg;
      break;
    case 'f':
@@ -332,7 +332,7 @@ static int get_options(int *argc,char ***argv)
      break;
#endif
    case 'O':
      if (set_changeable_var(optarg, changeable_vars))
      if (set_changeable_var(optarg, md_changeable_vars))
      {
	usage();
	return(1);
@@ -355,7 +355,7 @@ static int get_options(int *argc,char ***argv)
      opt_mysql_port= (unsigned int) atoi(optarg);
      break;
    case 'r':
      if (!(result_file = my_fopen(optarg, O_WRONLY | O_BINARY,
      if (!(md_result_file = my_fopen(optarg, O_WRONLY | O_BINARY,
				   MYF(MY_WME))))
	exit(1);
      break;
@@ -602,7 +602,7 @@ static uint getTableStructure(char *table, char* db)
  char 	     *strpos, *table_name;
  const char *delayed;
  char 	     name_buff[NAME_LEN+3],table_buff[NAME_LEN+3];
  FILE       *sql_file = result_file;
  FILE       *sql_file = md_result_file;
  DBUG_ENTER("getTableStructure");

  delayed= opt_delayed ? " DELAYED " : "";
@@ -973,14 +973,14 @@ static void dumpTable(uint numFields, char *table)
  }
  else
  {
    fprintf(result_file,"\n#\n# Dumping data for table '%s'\n", table);
    fprintf(md_result_file,"\n#\n# Dumping data for table '%s'\n", table);
    sprintf(query, "SELECT * FROM %s", quote_name(table,table_buff));
    if (where)
    {
      fprintf(result_file,"# WHERE:  %s\n",where);
      fprintf(md_result_file,"# WHERE:  %s\n",where);
      strxmov(strend(query), " WHERE ",where,NullS);
    }
    fputs("#\n\n", result_file);
    fputs("#\n\n", md_result_file);

    if (mysql_query(sock, query))
    {
@@ -1007,7 +1007,7 @@ static void dumpTable(uint numFields, char *table)
    }

    if (opt_lock)
      fprintf(result_file,"LOCK TABLES %s WRITE;\n",
      fprintf(md_result_file,"LOCK TABLES %s WRITE;\n",
	      quote_name(table,table_buff));

    total_length=net_buffer_length;		/* Force row break */
@@ -1021,7 +1021,7 @@ static void dumpTable(uint numFields, char *table)
      ulong *lengths=mysql_fetch_lengths(res);
      rownr++;
      if (!extended_insert)
	fputs(insert_pat,result_file);
	fputs(insert_pat,md_result_file);
      mysql_field_seek(res,0);

      for (i = 0; i < mysql_num_fields(res); i++)
@@ -1075,17 +1075,17 @@ static void dumpTable(uint numFields, char *table)
	else
	{
	  if (i)
	    fputc(',',result_file);
	    fputc(',',md_result_file);
	  if (row[i])
	  {
	    if (!IS_NUM_FIELD(field))
	      unescape(result_file, row[i], lengths[i]);
	      unescape(md_result_file, row[i], lengths[i]);
	    else
	      fputs(row[i],result_file);
	      fputs(row[i],md_result_file);
	  }
	  else
	  {
	    fputs("NULL",result_file);
	    fputs("NULL",md_result_file);
	  }
	}
      }
@@ -1098,25 +1098,25 @@ static void dumpTable(uint numFields, char *table)
        if (total_length + row_length < net_buffer_length)
        {
	  total_length += row_length;
	  fputc(',',result_file);		/* Always row break */
	  fputs(extended_row.str,result_file);
	  fputc(',',md_result_file);		/* Always row break */
	  fputs(extended_row.str,md_result_file);
	}
        else
        {
	  if (row_break)
	    fputs(";\n", result_file);
	    fputs(";\n", md_result_file);
	  row_break=1;				/* This is first row */
	  fputs(insert_pat,result_file);
	  fputs(extended_row.str,result_file);
	  fputs(insert_pat,md_result_file);
	  fputs(extended_row.str,md_result_file);
	  total_length = row_length+init_length;
        }
      }
      else
	fputs(");\n", result_file);
	fputs(");\n", md_result_file);
    }
    if (extended_insert && row_break)
      fputs(";\n", result_file);		/* If not empty table */
    fflush(result_file);
      fputs(";\n", md_result_file);		/* If not empty table */
    fflush(md_result_file);
    if (mysql_errno(sock))
    {
      sprintf(query,"%s: Error %d: %s when dumping table '%s' at row: %ld\n",
@@ -1130,7 +1130,7 @@ static void dumpTable(uint numFields, char *table)
      return;
    }
    if (opt_lock)
      fputs("UNLOCK TABLES;\n", result_file);
      fputs("UNLOCK TABLES;\n", md_result_file);
    mysql_free_result(res);
  }
} /* dumpTable */
@@ -1206,11 +1206,11 @@ static int init_dumping(char *database)
  {
    if (opt_databases || opt_alldbs)
    {
      fprintf(result_file,"\n#\n# Current Database: %s\n#\n", database);
      fprintf(md_result_file,"\n#\n# Current Database: %s\n#\n", database);
      if (!opt_create_db)
	fprintf(result_file,"\nCREATE DATABASE /*!32312 IF NOT EXISTS*/ %s;\n",
	fprintf(md_result_file,"\nCREATE DATABASE /*!32312 IF NOT EXISTS*/ %s;\n",
		database);
      fprintf(result_file,"\nUSE %s;\n", database);
      fprintf(md_result_file,"\nUSE %s;\n", database);
    }
  }
  if (extended_insert)
@@ -1342,7 +1342,7 @@ int main(int argc, char **argv)
  if (dbConnect(current_host, current_user, opt_password))
    exit(EX_MYSQLERR);
  if (!path)
    write_heder(result_file, *argv);
    write_heder(md_result_file, *argv);

   if (opt_first_slave)
   {
@@ -1378,9 +1378,9 @@ int main(int argc, char **argv)
   }
  }
  dbDisconnect(current_host);
  fputs("\n", result_file);
  if (result_file != stdout)
    my_fclose(result_file, MYF(0));
  fputs("\n", md_result_file);
  if (md_result_file != stdout)
    my_fclose(md_result_file, MYF(0));
  my_free(opt_password, MYF(MY_ALLOW_ZERO_PTR));
  if (extended_insert)
    dynstr_free(&extended_row);
Loading