~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/log.cc

  • Committer: Brian Aker
  • Date: 2008-10-08 02:16:25 UTC
  • Revision ID: brian@tangent.org-20081008021625-3756823nqs1phvsn
More effort around master.info (and relay.info)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1650
1650
 
1651
1651
  assert(is_open());
1652
1652
  assert(rli->slave_running == 1);
1653
 
  assert(!strcmp(rli->linfo.log_file_name,rli->event_relay_log_name));
 
1653
  assert(!strcmp(rli->linfo.log_file_name,rli->event_relay_log_name.c_str()));
1654
1654
 
1655
1655
  pthread_mutex_lock(&LOCK_index);
1656
1656
  pthread_mutex_lock(&rli->log_space_lock);
1657
 
  rli->relay_log.purge_logs(rli->group_relay_log_name, included,
 
1657
  rli->relay_log.purge_logs(rli->group_relay_log_name.c_str(), included,
1658
1658
                            0, 0, &rli->log_space_total);
1659
1659
  // Tell the I/O thread to take the relay_log_space_limit into account
1660
1660
  rli->ignore_log_space_limit= 0;
1675
1675
  */
1676
1676
  if ((included && (error=find_log_pos(&rli->linfo, NULL, 0))) ||
1677
1677
      (!included &&
1678
 
       ((error=find_log_pos(&rli->linfo, rli->event_relay_log_name, 0)) ||
 
1678
       ((error=find_log_pos(&rli->linfo, rli->event_relay_log_name.c_str(), 0)) ||
1679
1679
        (error=find_next_log(&rli->linfo, 0)))))
1680
1680
  {
1681
1681
    char buff[22];
1682
1682
    sql_print_error(_("next log error: %d  offset: %s  log: %s included: %d"),
1683
1683
                    error,
1684
1684
                    llstr(rli->linfo.index_file_offset,buff),
1685
 
                    rli->group_relay_log_name,
 
1685
                    rli->group_relay_log_name.c_str(),
1686
1686
                    included);
1687
1687
    goto err;
1688
1688
  }
1691
1691
    Reset rli's coordinates to the current log.
1692
1692
  */
1693
1693
  rli->event_relay_log_pos= BIN_LOG_HEADER_SIZE;
1694
 
  strmake(rli->event_relay_log_name,rli->linfo.log_file_name,
1695
 
          sizeof(rli->event_relay_log_name)-1);
 
1694
  rli->event_relay_log_name.assign(rli->linfo.log_file_name);
1696
1695
 
1697
1696
  /*
1698
1697
    If we removed the rli->group_relay_log_name file,
1702
1701
  if (included)
1703
1702
  {
1704
1703
    rli->group_relay_log_pos = BIN_LOG_HEADER_SIZE;
1705
 
    strmake(rli->group_relay_log_name,rli->linfo.log_file_name,
1706
 
            sizeof(rli->group_relay_log_name)-1);
 
1704
    rli->group_relay_log_name.assign(rli->linfo.log_file_name);
1707
1705
    rli->notify_group_relay_log_name_update();
1708
1706
  }
1709
1707