~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to server/sql_repl.cc

MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
    part.
43
43
*/
44
44
static int fake_rotate_event(NET* net, String* packet, char* log_file_name,
45
 
                             ulonglong position, const char** errmsg)
 
45
                             uint64_t position, const char** errmsg)
46
46
{
47
47
  char header[LOG_EVENT_HEADER_LEN], buf[ROTATE_HEADER_LEN+100];
48
48
  /*
312
312
 
313
313
  @param[in]    thd  THD to access a user variable
314
314
 
315
 
  @return        heartbeat period an ulonglong of nanoseconds
 
315
  @return        heartbeat period an uint64_t of nanoseconds
316
316
                 or zero if heartbeat was not demanded by slave
317
317
*/ 
318
 
static ulonglong get_heartbeat_period(THD * thd)
 
318
static uint64_t get_heartbeat_period(THD * thd)
319
319
{
320
320
  my_bool null_value;
321
321
  LEX_STRING name=  { C_STRING_WITH_LEN("master_heartbeat_period")};
396
396
  /* 
397
397
     heartbeat_period from @master_heartbeat_period user variable
398
398
  */
399
 
  ulonglong heartbeat_period= get_heartbeat_period(thd);
 
399
  uint64_t heartbeat_period= get_heartbeat_period(thd);
400
400
  struct timespec heartbeat_buf;
401
401
  struct event_coordinates coord_buf;
402
402
  struct timespec *heartbeat_ts= NULL;
692
692
              set_timespec_nsec(*heartbeat_ts, heartbeat_period);
693
693
            }
694
694
            ret= mysql_bin_log.wait_for_update_bin_log(thd, heartbeat_ts);
695
 
            assert(ret == 0 || heartbeat_period != 0LL && coord != NULL);
 
695
            assert(ret == 0 || (heartbeat_period != 0LL && coord != NULL));
696
696
            if (ret == ETIMEDOUT || ret == ETIME)
697
697
            {
698
698
              if (send_heartbeat_event(net, packet, coord))
1347
1347
  return mysql_bin_log.reset_logs(thd);
1348
1348
}
1349
1349
 
1350
 
int cmp_master_pos(const char* log_file_name1, ulonglong log_pos1,
1351
 
                   const char* log_file_name2, ulonglong log_pos2)
 
1350
int cmp_master_pos(const char* log_file_name1, uint64_t log_pos1,
 
1351
                   const char* log_file_name2, uint64_t log_pos2)
1352
1352
{
1353
1353
  int res;
1354
1354
  uint log_file_name1_len=  strlen(log_file_name1);
1535
1535
    mysql_bin_log.get_current_log(&li);
1536
1536
    int dir_len = dirname_length(li.log_file_name);
1537
1537
    protocol->store(li.log_file_name + dir_len, &my_charset_bin);
1538
 
    protocol->store((ulonglong) li.pos);
 
1538
    protocol->store((uint64_t) li.pos);
1539
1539
    protocol->store(binlog_filter->get_do_db());
1540
1540
    protocol->store(binlog_filter->get_ignore_db());
1541
1541
    if (protocol->write())
1597
1597
  while ((length=my_b_gets(index_file, fname, sizeof(fname))) > 1)
1598
1598
  {
1599
1599
    int dir_len;
1600
 
    ulonglong file_length= 0;                   // Length if open fails
 
1600
    uint64_t file_length= 0;                   // Length if open fails
1601
1601
    fname[--length] = '\0';                     // remove the newline
1602
1602
 
1603
1603
    protocol->prepare_for_resend();
1613
1613
      if ((file= my_open(fname, O_RDONLY | O_SHARE | O_BINARY,
1614
1614
                         MYF(0))) >= 0)
1615
1615
      {
1616
 
        file_length= (ulonglong) my_seek(file, 0L, MY_SEEK_END, MYF(0));
 
1616
        file_length= (uint64_t) my_seek(file, 0L, MY_SEEK_END, MYF(0));
1617
1617
        my_close(file, MYF(0));
1618
1618
      }
1619
1619
    }
1833
1833
bool sys_var_sync_binlog_period::update(THD *thd __attribute__((__unused__)),
1834
1834
                                        set_var *var)
1835
1835
{
1836
 
  sync_binlog_period= (ulong) var->save_result.ulonglong_value;
 
1836
  sync_binlog_period= (ulong) var->save_result.uint64_t_value;
1837
1837
  return 0;
1838
1838
}
1839
1839