~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzlebinlog.cc

Giant merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 
31
31
#define MYSQL_CLIENT
32
32
#undef MYSQL_SERVER
33
 
#include <my_time.h>
34
 
#include <my_global.h>
35
 
#include <my_sys.h>
36
 
#include <m_string.h>
37
 
#include <drizzle.h>
38
 
#include <errmsg.h>
39
 
#include <my_getopt.h>
 
33
#include <libdrizzle/my_time.h>
 
34
#include <drizzled/global.h>
 
35
#include <mysys/my_sys.h>
 
36
#include <mystrings/m_string.h>
 
37
#include <libdrizzle/drizzle.h>
 
38
#include <libdrizzle/errmsg.h>
 
39
#include <mysys/my_getopt.h>
40
40
/* That one is necessary for defines of OPTION_NO_FOREIGN_KEY_CHECKS etc */
41
 
#include "mysql_priv.h"
42
 
#include "log_event.h"
43
 
#include "sql_common.h"
 
41
#include <drizzled/mysql_priv.h>
 
42
#include <drizzled/log_event.h>
 
43
#include <libdrizzle/sql_common.h>
44
44
 
45
45
 
46
46
enum options_drizzlebinlog
71
71
 
72
72
static const char *load_default_groups[]= { "drizzlebinlog","client",0 };
73
73
 
74
 
static void error(const char *format, ...) ATTRIBUTE_FORMAT(printf, 1, 2);
75
 
static void warning(const char *format, ...) ATTRIBUTE_FORMAT(printf, 1, 2);
 
74
static void error(const char *format, ...) __attribute__((format(printf, 1, 2)));
 
75
static void warning(const char *format, ...) __attribute__((format(printf, 1, 2)));
76
76
 
77
77
static bool one_database=0, to_last_remote_log= 0, disable_log_bin= 0;
78
78
static bool opt_hexdump= 0;
223
223
      {
224
224
        my_free(ptr->fname, MYF(MY_WME));
225
225
        delete ptr->event;
226
 
        bzero((char *)ptr, sizeof(File_name_record));
 
226
        memset((char *)ptr, 0, sizeof(File_name_record));
227
227
      }
228
228
    }
229
229
 
254
254
        return 0;
255
255
      ptr= dynamic_element(&file_names, file_id, File_name_record*);
256
256
      if ((res= ptr->event))
257
 
        bzero((char *)ptr, sizeof(File_name_record));
 
257
        memset((char *)ptr, 0, sizeof(File_name_record));
258
258
      return res;
259
259
    }
260
260
 
284
284
      if (!ptr->event)
285
285
      {
286
286
        res= ptr->fname;
287
 
        bzero((char *)ptr, sizeof(File_name_record));
 
287
        memset((char *)ptr, 0, sizeof(File_name_record));
288
288
      }
289
289
      return res;
290
290
    }
1175
1175
static my_time_t convert_str_to_timestamp(const char* str)
1176
1176
{
1177
1177
  int was_cut;
1178
 
  MYSQL_TIME l_time;
 
1178
  DRIZZLE_TIME l_time;
1179
1179
  long dummy_my_timezone;
1180
1180
  bool dummy_in_dst_time_gap;
1181
1181
  /* We require a total specification (date AND time) */
1182
1182
  if (str_to_datetime(str, strlen(str), &l_time, 0, &was_cut) !=
1183
 
      MYSQL_TIMESTAMP_DATETIME || was_cut)
 
1183
      DRIZZLE_TIMESTAMP_DATETIME || was_cut)
1184
1184
  {
1185
1185
    error("Incorrect date and time argument: %s", str);
1186
1186
    exit(1);
1990
1990
  the server
1991
1991
*/
1992
1992
 
1993
 
#include "log_event.cc"
 
1993
#include <drizzled/log_event.cc>
1994
1994