Commit d8d639b3 authored by unknown's avatar unknown
Browse files

Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.1-new-rpl

into  mysql.com:/nfsdisk1/lars/MERGE/mysql-5.1-merge


configure.in:
  Auto merged
sql/CMakeLists.txt:
  Auto merged
sql/field.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/table.cc:
  Auto merged
parents 5d92d2d7 4c04fa4d
Loading
Loading
Loading
Loading
+48 −11
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ static bool opt_hexdump= 0;
static bool opt_base64_output= 0;
static const char* database= 0;
static my_bool force_opt= 0, short_form= 0, remote_opt= 0, info_flag;
static my_bool force_if_open_opt= 1;
static ulonglong offset = 0;
static const char* host = 0;
static int port= 0;
@@ -85,6 +86,7 @@ static short binlog_flags = 0;
static MYSQL* mysql = NULL;
static const char* dirname_for_local_load= 0;
static bool stop_passed= 0;
static my_bool file_not_closed_error= 0;

/*
  check_header() will set the pointer below.
@@ -94,8 +96,10 @@ static bool stop_passed= 0;
*/
Format_description_log_event* description_event; 

static int dump_local_log_entries(const char* logname);
static int dump_remote_log_entries(const char* logname);
static int dump_local_log_entries(PRINT_EVENT_INFO *print_event_info,
                                  const char* logname);
static int dump_remote_log_entries(PRINT_EVENT_INFO *print_event_info,
                                   const char* logname);
static int dump_log_entries(const char* logname);
static int dump_remote_file(NET* net, const char* fname);
static void die(const char* fmt, ...);
@@ -645,6 +649,12 @@ Create_file event for file_id: %u\n",exv->file_id);
        later.
      */
      ev= 0;
      if (!force_if_open_opt &&
          (description_event->flags & LOG_EVENT_BINLOG_IN_USE_F))
      {
        file_not_closed_error= 1;
        DBUG_RETURN(1); 
      }
      break;
    case BEGIN_LOAD_QUERY_EVENT:
      ev->print(result_file, print_event_info);
@@ -724,6 +734,9 @@ static struct my_option my_long_options[] =
    "already have. NOTE: you will need a SUPER privilege to use this option.",
   (gptr*) &disable_log_bin, (gptr*) &disable_log_bin, 0, GET_BOOL,
   NO_ARG, 0, 0, 0, 0, 0, 0},
  {"force-if-open", 'F', "Force if binlog was not closed properly.",
   (gptr*) &force_if_open_opt, (gptr*) &force_if_open_opt, 0, GET_BOOL, NO_ARG,
   1, 0, 0, 0, 0, 0},
  {"force-read", 'f', "Force reading unknown binlog events.",
   (gptr*) &force_opt, (gptr*) &force_opt, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
   0, 0},
@@ -1001,8 +1014,22 @@ static MYSQL* safe_connect()

static int dump_log_entries(const char* logname)
{
  return (remote_opt ? dump_remote_log_entries(logname) :
          dump_local_log_entries(logname));
  int rc;
  PRINT_EVENT_INFO print_event_info;
  /*
     Set safe delimiter, to dump things
     like CREATE PROCEDURE safely
  */
  fprintf(result_file, "DELIMITER /*!*/;\n");
  strcpy(print_event_info.delimiter, "/*!*/;");

  rc= (remote_opt ? dump_remote_log_entries(&print_event_info, logname) :
       dump_local_log_entries(&print_event_info, logname));

  /* Set delimiter back to semicolon */
  fprintf(result_file, "DELIMITER ;\n");
  strcpy(print_event_info.delimiter, ";");
  return rc;
}


@@ -1067,11 +1094,11 @@ static int check_master_version(MYSQL* mysql,
}


static int dump_remote_log_entries(const char* logname)
static int dump_remote_log_entries(PRINT_EVENT_INFO *print_event_info,
                                   const char* logname)

{
  char buf[128];
  PRINT_EVENT_INFO print_event_info;
  ulong len;
  uint logname_len;
  NET* net;
@@ -1194,7 +1221,7 @@ could be out of memory");
          len= 1; // fake Rotate, so don't increment old_off
        }
      }
      if ((error= process_event(&print_event_info, ev, old_off)))
      if ((error= process_event(print_event_info, ev, old_off)))
      {
	error= ((error < 0) ? 0 : 1);
        goto err;
@@ -1213,7 +1240,7 @@ could be out of memory");
        goto err;
      }
      
      if ((error= process_event(&print_event_info, ev, old_off)))
      if ((error= process_event(print_event_info, ev, old_off)))
      {
 	my_close(file,MYF(MY_WME));
	error= ((error < 0) ? 0 : 1);
@@ -1339,11 +1366,11 @@ at offset %lu ; this could be a log format error or read error",
}


static int dump_local_log_entries(const char* logname)
static int dump_local_log_entries(PRINT_EVENT_INFO *print_event_info,
                                  const char* logname)
{
  File fd = -1;
  IO_CACHE cache,*file= &cache;
  PRINT_EVENT_INFO print_event_info;
  byte tmp_buff[BIN_LOG_HEADER_SIZE];
  int error= 0;

@@ -1430,7 +1457,7 @@ static int dump_local_log_entries(const char* logname)
      // file->error == 0 means EOF, that's OK, we break in this case
      break;
    }
    if ((error= process_event(&print_event_info, ev, old_off)))
    if ((error= process_event(print_event_info, ev, old_off)))
    {
      if (error < 0)
        error= 0;
@@ -1547,6 +1574,16 @@ int main(int argc, char** argv)
  my_free_open_file_info();
  /* We cannot free DBUG, it is used in global destructors after exit(). */
  my_end((info_flag ? MY_CHECK_ERROR : 0) | MY_DONT_FREE_DBUG);

  if (file_not_closed_error)
  {
    fprintf(stderr,
"\nError: attempting to dump binlog '%s' which was not closed properly.\n"
"Most probably mysqld is still writting it, or crashed.\n"
"Your current options specify --disable-force-if-open\n"
"which means to abort on this problem.\n"
"You can rerun using --force-if-open to ignore this problem.\n\n", argv[-1]);
  }
  exit(exit_value);
  DBUG_RETURN(exit_value);			// Keep compilers happy
}
+1 −4
Original line number Diff line number Diff line
@@ -228,12 +228,9 @@ AC_DEFUN([MYSQL_SETUP_NDBCLUSTER], [
  have_ndb_binlog="no"
  if test X"$ndb_binlog" = Xdefault ||
     test X"$ndb_binlog" = Xyes
  then
    if test X"$have_row_based" = Xyes
  then
    have_ndb_binlog="yes"
  fi
  fi

  if test X"$have_ndb_binlog" = Xyes
  then

config/ac-macros/replication.m4

deleted100644 → 0
+0 −30
Original line number Diff line number Diff line
dnl This file contains configuration parameters for replication.

dnl ---------------------------------------------------------------------------
dnl Macro: MYSQL_CHECK_REPLICATION
dnl Sets HAVE_ROW_BASED_REPLICATION if --with-row-based-replication is used
dnl ---------------------------------------------------------------------------

AC_DEFUN([MYSQL_CHECK_REPLICATION], [
  AC_ARG_WITH([row-based-replication],
              AC_HELP_STRING([--without-row-based-replication],
                             [Don't include row-based replication]),
              [row_based="$withval"],
              [row_based=yes])
  AC_MSG_CHECKING([for row-based replication])

  case "$row_based" in
  yes )
    AC_DEFINE([WITH_ROW_BASED_REPLICATION], [1], [Define to have row-based replication])
    AC_MSG_RESULT([-- including row-based replication])
    [have_row_based=yes]
    ;;
  * )
    AC_MSG_RESULT([-- not including row-based replication])
    [have_row_based=no]
    ;;
  esac
])
dnl ---------------------------------------------------------------------------
dnl END OF MYSQL_CHECK_REPLICATION
dnl ---------------------------------------------------------------------------
+0 −2
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@ sinclude(config/ac-macros/ha_ndbcluster.m4)
sinclude(config/ac-macros/large_file.m4)
sinclude(config/ac-macros/misc.m4)
sinclude(config/ac-macros/readline.m4)
sinclude(config/ac-macros/replication.m4)
sinclude(config/ac-macros/ssl.m4)
sinclude(config/ac-macros/zlib.m4)

@@ -2172,7 +2171,6 @@ AC_MSG_RESULT("$netinet_inc")

MYSQL_CHECK_BIG_TABLES
MYSQL_CHECK_MAX_INDEXES
MYSQL_CHECK_REPLICATION
MYSQL_CHECK_VIO
MYSQL_CHECK_SSL

+0 −1
Original line number Diff line number Diff line
@@ -435,7 +435,6 @@ inline double ulonglong2double(ulonglong value)

#define HAVE_SPATIAL 1
#define HAVE_RTREE_KEYS 1
#define HAVE_ROW_BASED_REPLICATION 1

#define HAVE_OPENSSL 1
#define HAVE_YASSL 1
Loading