~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/slave.cc

  • Committer: Monty Taylor
  • Date: 2008-08-04 08:36:15 UTC
  • mto: (261.2.2 codestyle)
  • mto: This revision was merged to the branch mainline in revision 262.
  • Revision ID: monty@inaugust.com-20080804083615-x1es88h39th0uwer
Added three more files worth of stuff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
615
615
    if (difftime(time(0), rli->last_event_start_time) > 60)
616
616
    {
617
617
      rli->report(ERROR_LEVEL, 0,
618
 
                  "SQL thread had to stop in an unsafe situation, in "
 
618
                  _("SQL thread had to stop in an unsafe situation, in "
619
619
                  "the middle of applying updates to a "
620
620
                  "non-transactional table without any primary key. "
621
621
                  "There is a risk of duplicate updates when the slave "
622
622
                  "SQL thread is restarted. Please check your tables' "
623
 
                  "contents after restart.");
 
623
                  "contents after restart."));
624
624
      return(1);
625
625
    }
626
626
  }
1690
1690
    {
1691
1691
      char buf[22];
1692
1692
      rli->report(ERROR_LEVEL, ER_UNKNOWN_ERROR,
1693
 
                  "It was not possible to update the positions"
 
1693
                  _("It was not possible to update the positions"
1694
1694
                  " of the relay log information: the slave may"
1695
1695
                  " be in an inconsistent state."
1696
 
                  " Stopped in %s position %s",
 
1696
                  " Stopped in %s position %s"),
1697
1697
                  rli->group_relay_log_name,
1698
1698
                  llstr(rli->group_relay_log_pos, buf));
1699
1699
      return(2);
1862
1862
  }
1863
1863
  pthread_mutex_unlock(&rli->data_lock);
1864
1864
  rli->report(ERROR_LEVEL, ER_SLAVE_RELAY_LOG_READ_FAILURE,
1865
 
              ER(ER_SLAVE_RELAY_LOG_READ_FAILURE), "\
1866
 
Could not parse relay log event entry. The possible reasons are: the master's \
1867
 
binary log is corrupted (you can check this by running 'mysqlbinlog' on the \
1868
 
binary log), the slave's relay log is corrupted (you can check this by running \
1869
 
'mysqlbinlog' on the relay log), a network problem, or a bug in the master's \
1870
 
or slave's DRIZZLE code. If you want to check the master's binary log or slave's \
1871
 
relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' \
1872
 
on this slave.\
1873
 
");
 
1865
              ER(ER_SLAVE_RELAY_LOG_READ_FAILURE),
 
1866
              _("Could not parse relay log event entry. The possible reasons "
 
1867
                "are: the master's binary log is corrupted (you can check this "
 
1868
                "by running 'mysqlbinlog' on the binary log), the slave's "
 
1869
                "relay log is corrupted (you can check this by running "
 
1870
                "'mysqlbinlog' on the relay log), a network problem, or a bug "
 
1871
                "in the master's or slave's DRIZZLE code. If you want to check "
 
1872
                "the master's binary log or slave's relay log, you will be "
 
1873
                "able to know their names by issuing 'SHOW SLAVE STATUS' "
 
1874
                "on this slave."));
1874
1875
  return(1);
1875
1876
}
1876
1877
 
2000
2001
  if (!(mi->drizzle= drizzle = drizzle_create(NULL)))
2001
2002
  {
2002
2003
    mi->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR,
2003
 
               ER(ER_SLAVE_FATAL_ERROR), "error in drizzle_create()");
 
2004
               ER(ER_SLAVE_FATAL_ERROR), _("error in drizzle_create()"));
2004
2005
    goto err;
2005
2006
  }
2006
2007
 
2575
2576
        {
2576
2577
          mi->report(ERROR_LEVEL, ER_SLAVE_RELAY_LOG_WRITE_FAILURE,
2577
2578
                     ER(ER_SLAVE_RELAY_LOG_WRITE_FAILURE),
2578
 
                     "error writing Exec_load event to relay log");
 
2579
                     _("error writing Exec_load event to relay log"));
2579
2580
          goto err;
2580
2581
        }
2581
2582
        mi->rli.relay_log.harvest_bytes_written(&mi->rli.log_space_total);
2589
2590
        {
2590
2591
          mi->report(ERROR_LEVEL, ER_SLAVE_RELAY_LOG_WRITE_FAILURE,
2591
2592
                     ER(ER_SLAVE_RELAY_LOG_WRITE_FAILURE),
2592
 
                     "error writing Create_file event to relay log");
 
2593
                     _("error writing Create_file event to relay log"));
2593
2594
          goto err;
2594
2595
        }
2595
2596
        cev_not_written=0;
2604
2605
        {
2605
2606
          mi->report(ERROR_LEVEL, ER_SLAVE_RELAY_LOG_WRITE_FAILURE,
2606
2607
                     ER(ER_SLAVE_RELAY_LOG_WRITE_FAILURE),
2607
 
                     "error writing Append_block event to relay log");
 
2608
                     _("error writing Append_block event to relay log"));
2608
2609
          goto err;
2609
2610
        }
2610
2611
        mi->rli.relay_log.harvest_bytes_written(&mi->rli.log_space_total) ;
2700
2701
    if (unlikely(!(tmp_buf=(char*)my_malloc(event_len+1,MYF(MY_WME)))))
2701
2702
    {
2702
2703
      mi->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR,
2703
 
                 ER(ER_SLAVE_FATAL_ERROR), "Memory allocation failed");
 
2704
                 ER(ER_SLAVE_FATAL_ERROR), _("Memory allocation failed"));
2704
2705
      return(1);
2705
2706
    }
2706
2707
    memcpy(tmp_buf,buf,event_len);
3082
3083
err:
3083
3084
  pthread_mutex_unlock(&mi->data_lock);
3084
3085
  if (error)
3085
 
    mi->report(ERROR_LEVEL, error, ER(error), 
 
3086
    mi->report(ERROR_LEVEL, error, ER(error),
3086
3087
               (error == ER_SLAVE_RELAY_LOG_WRITE_FAILURE)?
3087
 
               "could not queue event from master" :
 
3088
               _("could not queue event from master") :
3088
3089
               error_msg.ptr());
3089
3090
  return(error);
3090
3091
}
3178
3179
      last_errno=drizzle_errno(drizzle);
3179
3180
      suppress_warnings= 0;
3180
3181
      mi->report(ERROR_LEVEL, last_errno,
3181
 
                 "error %s to master '%s@%s:%d'"
3182
 
                 " - retry-time: %d  retries: %u",
3183
 
                 (reconnect ? "reconnecting" : "connecting"),
 
3182
                 _("error %s to master '%s@%s:%d'"
 
3183
                   " - retry-time: %d  retries: %u"),
 
3184
                 (reconnect ? _("reconnecting") : _("connecting")),
3184
3185
                 mi->user, mi->host, mi->port,
3185
3186
                 mi->connect_retry, master_retry_count);
3186
3187
    }