Commit d4973341 authored by unknown's avatar unknown
Browse files

Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1

into mysql.com:/usr/local/home/marty/MySQL/test/mysql-4.1

parents 80051fa3 b38510ec
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -208,7 +208,7 @@ INCLUDES="$INCLUDES $ZLIB_INCLUDES"
LIBS="$LIBS $ZLIB_LIBS"
AC_CACHE_VAL([mysql_cv_compress],
  [AC_TRY_LINK([#include <zlib.h>],
    [int link_test() { return compress(0, (unsigned long*) 0, "", 0); }],
    [return compress(0, (unsigned long*) 0, "", 0);],
    [mysql_cv_compress="yes"
    AC_MSG_RESULT([ok])],
    [mysql_cv_compress="no"])
+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ static const char *command_names[]= {
};

static TYPELIB command_typelib=
{ array_elements(command_names)-1,"commands", command_names};
{ array_elements(command_names)-1,"commands", command_names, NULL};

static struct my_option my_long_options[] =
{
+16 −12
Original line number Diff line number Diff line
@@ -124,7 +124,7 @@ const char *compatible_mode_names[]=
 (1<<10)   /* ANSI       */\
)
TYPELIB compatible_mode_typelib= {array_elements(compatible_mode_names) - 1,
				  "", compatible_mode_names};
				  "", compatible_mode_names, NULL};


static struct my_option my_long_options[] =
@@ -317,7 +317,7 @@ static struct my_option my_long_options[] =
  {"comments", 'i', "Write additional information.",
   (gptr*) &opt_comments, (gptr*) &opt_comments, 0, GET_BOOL, NO_ARG,
   1, 0, 0, 0, 0, 0},
  {"hex-blob", OPT_HEXBLOB, "Dump BLOBs in HEX. this mode does not work with extended-insert",
  {"hex-blob", OPT_HEXBLOB, "Dump BLOBs in HEX.",
   (gptr*) &opt_hex_blob, (gptr*) &opt_hex_blob, 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}
};
@@ -1523,10 +1523,11 @@ static void dumpTable(uint numFields, char *table)
	/*
	   63 is my_charset_bin. If charsetnr is not 63,
	   we have not a BLOB but a TEXT column. 
	   we'll dump it in hex only BLOB columns.
	   we'll dump in hex only BLOB columns.
	*/
        is_blob= (opt_hex_blob && field->charsetnr == 63 &&
                  (field->type == FIELD_TYPE_BLOB ||
                  (field->type == FIELD_TYPE_STRING ||
                   field->type == FIELD_TYPE_BLOB ||
                   field->type == FIELD_TYPE_LONG_BLOB ||
                   field->type == FIELD_TYPE_MEDIUM_BLOB ||
                   field->type == FIELD_TYPE_TINY_BLOB)) ? 1 : 0;
@@ -1544,6 +1545,13 @@ static void dumpTable(uint numFields, char *table)
	    {
	      if (!IS_NUM_FIELD(field))
	      {
	        /*
	          "length * 2 + 2" is OK for both HEX and non-HEX modes:
	          - In HEX mode we need exactly 2 bytes per character
	          plus 2 bytes for '0x' prefix.
	          - In non-HEX mode we need up to 2 bytes per character,
	          plus 2 bytes for leading and trailing '\'' characters.
	        */
		if (dynstr_realloc(&extended_row,length * 2+2))
		{
		  fputs("Aborting dump (out of memory)",stderr);
@@ -1552,15 +1560,11 @@ static void dumpTable(uint numFields, char *table)
		}
                if (opt_hex_blob && is_blob)
                {
                  ulong counter;
                  unsigned char *ptr= row[i];
                  dynstr_append(&extended_row, "0x");
                  for (counter = 0; counter < lengths[i]; counter++)
                  {
                    char xx[3];
                    sprintf(xx, "%02X", ptr[counter]);
                    dynstr_append(&extended_row, xx);
                  }
                  extended_row.length+= mysql_hex_string(extended_row.str + 
                                                         extended_row.length,
                                                         row[i], length);
                  extended_row.str[extended_row.length]= '\0';
                }
                else
                {
+10 −4
Original line number Diff line number Diff line
@@ -949,8 +949,11 @@ static void do_exec(struct st_query* q)
    while (fgets(buf, sizeof(buf), res_file))
      replace_dynstr_append_mem(ds, buf, strlen(buf));
  }

#ifndef __WIN__
  error= pclose(res_file);
#else  
  error= _pclose(res_file);
#endif  

  if (error != 0)
    die("command \"%s\" failed", cmd);
@@ -4516,8 +4519,7 @@ static void get_replace_column(struct st_query *q)
  my_free(start, MYF(0));
}

#ifdef __NETWARE__

#if defined(__NETWARE__) || defined(__WIN__)
/*
  Substitute environment variables with text.

@@ -4608,9 +4610,13 @@ FILE *my_popen(const char *cmd, const char *mode __attribute__((unused)))
  FILE *res_file;

  subst_cmd= subst_env_var(cmd);
#ifndef __WIN__
  res_file= popen(subst_cmd, "r0");
#else
  res_file= _popen(subst_cmd, "r0");
#endif
  my_free(subst_cmd, MYF(0));
  return res_file;
}

#endif /* __NETWARE__ */
#endif /* __NETWARE__ or  __WIN__*/
+8 −0
Original line number Diff line number Diff line
@@ -463,6 +463,14 @@ lock_rec_hash(
	ulint	space,	/* in: space */
	ulint	page_no);/* in: page number */
/*************************************************************************
Gets the table covered by an IX table lock. */

dict_table_t*
lock_get_ix_table(
/*==============*/
			/* out: the table covered by the lock */
	lock_t*	lock);	/* in: table lock */
/*************************************************************************
Checks that a transaction id is sensible, i.e., not in the future. */

ibool
Loading