~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to server/log.cc

  • Committer: Brian Aker
  • Date: 2008-07-13 01:28:21 UTC
  • Revision ID: brian@tangent.org-20080713012821-rzjl550us0n27aoi
Code cleanup. Mainly dead stuff :)

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
static int binlog_rollback(handlerton *hton, THD *thd, bool all);
59
59
static int binlog_prepare(handlerton *hton, THD *thd, bool all);
60
60
 
61
 
/**
62
 
  Silence all errors and warnings reported when performing a write
63
 
  to a log table.
64
 
  Errors and warnings are not reported to the client or SQL exception
65
 
  handlers, so that the presence of logging does not interfere and affect
66
 
  the logic of an application.
67
 
*/
68
 
class Silence_log_table_errors : public Internal_error_handler
69
 
{
70
 
  char m_message[MYSQL_ERRMSG_SIZE];
71
 
public:
72
 
  Silence_log_table_errors()
73
 
  {
74
 
    m_message[0]= '\0';
75
 
  }
76
 
 
77
 
  virtual ~Silence_log_table_errors() {}
78
 
 
79
 
  virtual bool handle_error(uint sql_errno, const char *message,
80
 
                            MYSQL_ERROR::enum_warning_level level,
81
 
                            THD *thd);
82
 
  const char *message() const { return m_message; }
83
 
};
84
 
 
85
 
bool
86
 
Silence_log_table_errors::handle_error(uint /* sql_errno */,
87
 
                                       const char *message_arg,
88
 
                                       MYSQL_ERROR::enum_warning_level /* level */,
89
 
                                       THD * /* thd */)
90
 
{
91
 
  strmake(m_message, message_arg, sizeof(m_message)-1);
92
 
  return true;
93
 
}
94
 
 
95
61
 
96
62
sql_print_message_func sql_print_message_handlers[3] =
97
63
{