~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/mysqlbinlog.cc

  • Committer: Brian Aker
  • Date: 2008-07-13 22:21:51 UTC
  • Revision ID: brian@tangent.org-20080713222151-fv2tcpbsc829j2oc
Ulonglong to uint64_t

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
static bool force_opt= 0, short_form= 0, remote_opt= 0;
72
72
static bool debug_info_flag, debug_check_flag;
73
73
static bool force_if_open_opt= 1;
74
 
static ulonglong offset = 0;
 
74
static uint64_t offset = 0;
75
75
static const char* host = 0;
76
76
static int port= 0;
77
77
static uint my_end_arg;
80
80
static char* pass = 0;
81
81
static char *charset= 0;
82
82
 
83
 
static ulonglong start_position, stop_position;
 
83
static uint64_t start_position, stop_position;
84
84
#define start_position_mot ((my_off_t)start_position)
85
85
#define stop_position_mot  ((my_off_t)stop_position)
86
86
 
87
87
static char *start_datetime_str, *stop_datetime_str;
88
88
static my_time_t start_datetime= 0, stop_datetime= MY_TIME_T_MAX;
89
 
static ulonglong rec_count= 0;
 
89
static uint64_t rec_count= 0;
90
90
static short binlog_flags = 0; 
91
91
static MYSQL* mysql = NULL;
92
92
static const char* dirname_for_local_load= 0;
985
985
   (char**) &start_position, (char**) &start_position, 0, GET_ULL,
986
986
   REQUIRED_ARG, BIN_LOG_HEADER_SIZE, BIN_LOG_HEADER_SIZE,
987
987
   /* COM_BINLOG_DUMP accepts only 4 bytes for the position */
988
 
   (ulonglong)(~(uint32)0), 0, 0, 0},
 
988
   (uint64_t)(~(uint32)0), 0, 0, 0},
989
989
  {"protocol", OPT_MYSQL_PROTOCOL,
990
990
   "The protocol of connection (tcp,socket,pipe,memory).",
991
991
   0, 0, 0, GET_STR,  REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1024
1024
   (char**) &start_position, (char**) &start_position, 0, GET_ULL,
1025
1025
   REQUIRED_ARG, BIN_LOG_HEADER_SIZE, BIN_LOG_HEADER_SIZE,
1026
1026
   /* COM_BINLOG_DUMP accepts only 4 bytes for the position */
1027
 
   (ulonglong)(~(uint32)0), 0, 0, 0},
 
1027
   (uint64_t)(~(uint32)0), 0, 0, 0},
1028
1028
  {"stop-datetime", OPT_STOP_DATETIME,
1029
1029
   "Stop reading the binlog at first event having a datetime equal or "
1030
1030
   "posterior to the argument; the argument must be a date and time "
1037
1037
   "Stop reading the binlog at position N. Applies to the last binlog "
1038
1038
   "passed on the command line.",
1039
1039
   (char**) &stop_position, (char**) &stop_position, 0, GET_ULL,
1040
 
   REQUIRED_ARG, (ulonglong)(~(my_off_t)0), BIN_LOG_HEADER_SIZE,
1041
 
   (ulonglong)(~(my_off_t)0), 0, 0, 0},
 
1040
   REQUIRED_ARG, (uint64_t)(~(my_off_t)0), BIN_LOG_HEADER_SIZE,
 
1041
   (uint64_t)(~(my_off_t)0), 0, 0, 0},
1042
1042
  {"to-last-log", 't', "Requires -R. Will not stop at the end of the \
1043
1043
requested binlog but rather continue printing until the end of the last \
1044
1044
binlog of the MySQL server. If you send the output to the same MySQL server, \
1658
1658
      if (file->error)
1659
1659
      {
1660
1660
        error("Could not read entry at offset %lu: "
1661
 
              "Error in log format or read error.", (ulonglong)tmp_pos);
 
1661
              "Error in log format or read error.", (uint64_t)tmp_pos);
1662
1662
        return ERROR_STOP;
1663
1663
      }
1664
1664
      /*
1710
1710
        {
1711
1711
          error("Could not read a Format_description_log_event event at "
1712
1712
                "offset %lu; this could be a log format error or read error.",
1713
 
                (ulonglong)tmp_pos);
 
1713
                (uint64_t)tmp_pos);
1714
1714
          return ERROR_STOP;
1715
1715
        }
1716
1716
        if (opt_base64_output_mode == BASE64_OUTPUT_AUTO
1742
1742
          /* EOF can't be hit here normally, so it's a real error */
1743
1743
          error("Could not read a Rotate_log_event event at offset %lu;"
1744
1744
                " this could be a log format error or read error.",
1745
 
                (ulonglong)tmp_pos);
 
1745
                (uint64_t)tmp_pos);
1746
1746
          return ERROR_STOP;
1747
1747
        }
1748
1748
        delete ev;
1875
1875
{
1876
1876
  char **defaults_argv;
1877
1877
  Exit_status retval= OK_CONTINUE;
1878
 
  ulonglong save_stop_position;
 
1878
  uint64_t save_stop_position;
1879
1879
  MY_INIT(argv[0]);
1880
1880
 
1881
1881
  init_time(); // for time functions