Commit 2e3ee93d authored by unknown's avatar unknown
Browse files

Merge willster.(none):/home/stewart/Documents/MySQL/5.1/main

into  willster.(none):/home/stewart/Documents/MySQL/5.1/ndb

parents 38edc8ad 16f2de1d
Loading
Loading
Loading
Loading
+29 −6
Original line number Diff line number Diff line
@@ -476,6 +476,30 @@ static bool check_database(const char *log_dbname)
}



static int
write_event_header_and_base64(Log_event *ev, FILE *result_file,
                              PRINT_EVENT_INFO *print_event_info)
{
  DBUG_ENTER("write_event_header_and_base64");
  /* Write header and base64 output to cache */
  IO_CACHE result_cache;
  if (init_io_cache(&result_cache, -1, 0, WRITE_CACHE, 0L, FALSE,
                    MYF(MY_WME | MY_NABP)))
  {
    return 1;
  }

  ev->print_header(&result_cache, print_event_info, FALSE);
  ev->print_base64(&result_cache, print_event_info, FALSE);

  /* Read data from cache and write to result file */
  my_b_copy_to_file(&result_cache, result_file);
  end_io_cache(&result_cache);
  DBUG_RETURN(0);
}


/*
  Process an event

@@ -538,18 +562,18 @@ int process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,

    print_event_info->base64_output= opt_base64_output;

    DBUG_PRINT("debug", ("event_type: %s", ev->get_type_str()));

    switch (ev_type) {
    case QUERY_EVENT:
      if (check_database(((Query_log_event*)ev)->db))
        goto end;
      if (opt_base64_output)
      {
        ev->print_header(result_file, print_event_info);
        ev->print_base64(result_file, print_event_info);
      }
        write_event_header_and_base64(ev, result_file, print_event_info);
      else
        ev->print(result_file, print_event_info);
      break;

    case CREATE_FILE_EVENT:
    {
      Create_file_log_event* ce= (Create_file_log_event*)ev;
@@ -570,8 +594,7 @@ int process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
      */
      if (opt_base64_output)
      {
        ce->print_header(result_file, print_event_info);
        ce->print_base64(result_file, print_event_info);
        write_event_header_and_base64(ce, result_file, print_event_info);
      }
      else
        ce->print(result_file, print_event_info, TRUE);
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ AC_INIT(sql/mysqld.cc)
AC_CANONICAL_SYSTEM
# The Docs Makefile.am parses this line!
# remember to also change ndb version below and update version.c in ndb
AM_INIT_AUTOMAKE(mysql, 5.1.12-beta)
AM_INIT_AUTOMAKE(mysql, 5.1.13-beta)
AM_CONFIG_HEADER(config.h)

PROTOCOL_VERSION=10
+2 −1
Original line number Diff line number Diff line
@@ -39,7 +39,8 @@ int base64_encode(const void *src, size_t src_len, char *dst);
/*
  Decode a base64 string into data
*/
int base64_decode(const char *src, size_t src_len, void *dst);
int base64_decode(const char *src, size_t src_len,
                  void *dst, const char **end_ptr);


#ifdef __cplusplus
+1 −1
Original line number Diff line number Diff line
@@ -196,7 +196,7 @@ typedef struct my_charset_handler_st
  
  /* Charset dependant snprintf() */
  int  (*snprintf)(struct charset_info_st *, char *to, uint n, const char *fmt,
		   ...) ATTRIBUTE_FORMAT(printf, 4, 5);
		   ...) ATTRIBUTE_FORMAT_FPTR(printf, 4, 5);
  int  (*long10_to_str)(struct charset_info_st *, char *to, uint n, int radix,
			long int val);
  int (*longlong10_to_str)(struct charset_info_st *, char *to, uint n,
+13 −3
Original line number Diff line number Diff line
@@ -563,9 +563,6 @@ typedef unsigned short ushort;
#ifndef __attribute__
# if !defined(__GNUC__)
#  define __attribute__(A)
# elif defined (__QNXNTO__)
   /* qcc defines GNUC */
#  define __attribute__(A)
# elif GCC_VERSION < 2008
#  define __attribute__(A)
# elif defined(__cplusplus) && GCC_VERSION < 3004
@@ -582,6 +579,19 @@ typedef unsigned short ushort;
# define ATTRIBUTE_FORMAT(style, m, n) __attribute__((format(style, m, n)))
#endif

/*

   __attribute__((format(...))) on a function pointer is not supported
   until  gcc 3.1
*/
#ifndef ATTRIBUTE_FORMAT_FPTR
# if (GCC_VERSION >= 3001)
#  define ATTRIBUTE_FORMAT_FPTR(style, m, n) ATTRIBUTE_FORMAT(style, m, n)
# else
#  define ATTRIBUTE_FORMAT_FPTR(style, m, n)
# endif /* GNUC >= 3.1 */
#endif

/*
  Wen using the embedded library, users might run into link problems,
  duplicate declaration of __cxa_pure_virtual, solved by declaring it a
Loading