~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to server/log.cc

  • Committer: Brian Aker
  • Date: 2008-07-26 18:39:33 UTC
  • mfrom: (212.1.3 codestyle)
  • Revision ID: brian@tangent.org-20080726183933-hueup0fcy2zs1hug
Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
203
203
 
204
204
 
205
205
/* Check if a given table is opened log table */
206
 
int check_if_log_table(uint db_len __attribute__((__unused__)),
207
 
                       const char *db __attribute__((__unused__)),
208
 
                       uint table_name_len __attribute__((__unused__)),
209
 
                       const char *table_name __attribute__((__unused__)),
210
 
                       uint check_if_opened __attribute__((__unused__)))
 
206
int check_if_log_table(uint db_len __attribute__((unused)),
 
207
                       const char *db __attribute__((unused)),
 
208
                       uint table_name_len __attribute__((unused)),
 
209
                       const char *table_name __attribute__((unused)),
 
210
                       uint check_if_opened __attribute__((unused)))
211
211
{
212
212
  return 0;
213
213
}
249
249
*/
250
250
 
251
251
bool Log_to_file_event_handler::
252
 
  log_general(THD *thd __attribute__((__unused__)),
 
252
  log_general(THD *thd __attribute__((unused)),
253
253
              time_t event_time, const char *user_host,
254
254
              uint user_host_len, int thread_id,
255
255
              const char *command_type, uint command_type_len,
256
256
              const char *sql_text, uint sql_text_len,
257
 
              CHARSET_INFO *client_cs __attribute__((__unused__)))
 
257
              CHARSET_INFO *client_cs __attribute__((unused)))
258
258
{
259
259
  return mysql_log.write(event_time, user_host, user_host_len,
260
260
                         thread_id, command_type, command_type_len,
366
366
}
367
367
 
368
368
 
369
 
bool LOGGER::flush_logs(THD *thd __attribute__((__unused__)))
 
369
bool LOGGER::flush_logs(THD *thd __attribute__((unused)))
370
370
{
371
371
  int rc= 0;
372
372
 
577
577
}
578
578
 
579
579
 
580
 
bool LOGGER::activate_log_handler(THD* thd __attribute__((__unused__)),
 
580
bool LOGGER::activate_log_handler(THD* thd __attribute__((unused)),
581
581
                                  uint log_type)
582
582
{
583
583
  MYSQL_QUERY_LOG *file_log;
612
612
}
613
613
 
614
614
 
615
 
void LOGGER::deactivate_log_handler(THD *thd __attribute__((__unused__)),
 
615
void LOGGER::deactivate_log_handler(THD *thd __attribute__((unused)),
616
616
                                    uint log_type)
617
617
{
618
618
  bool *tmp_opt= 0;
739
739
  return 0;
740
740
}
741
741
 
742
 
static int binlog_close_connection(handlerton *hton __attribute__((__unused__)),
 
742
static int binlog_close_connection(handlerton *hton __attribute__((unused)),
743
743
                                   THD *thd)
744
744
{
745
745
  binlog_trx_data *const trx_data=
846
846
  return(error);
847
847
}
848
848
 
849
 
static int binlog_prepare(handlerton *hton __attribute__((__unused__)),
850
 
                          THD *thd __attribute__((__unused__)),
851
 
                          bool all __attribute__((__unused__)))
 
849
static int binlog_prepare(handlerton *hton __attribute__((unused)),
 
850
                          THD *thd __attribute__((unused)),
 
851
                          bool all __attribute__((unused)))
852
852
{
853
853
  /*
854
854
    do nothing.
874
874
 
875
875
  @see handlerton::commit
876
876
*/
877
 
static int binlog_commit(handlerton *hton __attribute__((__unused__)),
 
877
static int binlog_commit(handlerton *hton __attribute__((unused)),
878
878
                         THD *thd, bool all)
879
879
{
880
880
  binlog_trx_data *const trx_data=
972
972
 
973
973
  @see handlerton::rollback
974
974
*/
975
 
static int binlog_rollback(handlerton *hton __attribute__((__unused__)),
 
975
static int binlog_rollback(handlerton *hton __attribute__((unused)),
976
976
                           THD *thd, bool all)
977
977
{
978
978
  int error=0;
1037
1037
  that case there is no need to have it in the binlog).
1038
1038
*/
1039
1039
 
1040
 
static int binlog_savepoint_set(handlerton *hton __attribute__((__unused__)),
 
1040
static int binlog_savepoint_set(handlerton *hton __attribute__((unused)),
1041
1041
                                THD *thd, void *sv)
1042
1042
{
1043
1043
  binlog_trans_log_savepos(thd, (my_off_t*) sv);
1049
1049
  return(error);
1050
1050
}
1051
1051
 
1052
 
static int binlog_savepoint_rollback(handlerton *hton __attribute__((__unused__)),
 
1052
static int binlog_savepoint_rollback(handlerton *hton __attribute__((unused)),
1053
1053
                                     THD *thd, void *sv)
1054
1054
{
1055
1055
  /*
1428
1428
*/
1429
1429
 
1430
1430
bool MYSQL_QUERY_LOG::write(time_t event_time,
1431
 
                            const char *user_host __attribute__((__unused__)),
1432
 
                            uint user_host_len __attribute__((__unused__)),
 
1431
                            const char *user_host __attribute__((unused)),
 
1432
                            uint user_host_len __attribute__((unused)),
1433
1433
                            int thread_id,
1434
1434
                            const char *command_type, uint command_type_len,
1435
1435
                            const char *sql_text, uint sql_text_len)
1530
1530
*/
1531
1531
 
1532
1532
bool MYSQL_QUERY_LOG::write(THD *thd, time_t current_time,
1533
 
                            time_t query_start_arg __attribute__((__unused__)),
 
1533
                            time_t query_start_arg __attribute__((unused)),
1534
1534
                            const char *user_host,
1535
1535
                            uint user_host_len, uint64_t query_utime,
1536
1536
                            uint64_t lock_utime, bool is_command,
3896
3896
    return an error (e.g. logging to the log tables)
3897
3897
*/
3898
3898
static void print_buffer_to_file(enum loglevel level,
3899
 
                                 int error_code __attribute__((__unused__)),
 
3899
                                 int error_code __attribute__((unused)),
3900
3900
                                 const char *buffer,
3901
 
                                 size_t buffer_length __attribute__((__unused__)))
 
3901
                                 size_t buffer_length __attribute__((unused)))
3902
3902
{
3903
3903
  time_t skr;
3904
3904
  struct tm tm_tmp;
4227
4227
    to the position in memory where xid was logged to.
4228
4228
*/
4229
4229
 
4230
 
int TC_LOG_MMAP::log_xid(THD *thd __attribute__((__unused__)), my_xid xid)
 
4230
int TC_LOG_MMAP::log_xid(THD *thd __attribute__((unused)), my_xid xid)
4231
4231
{
4232
4232
  int err;
4233
4233
  PAGE *p;
4339
4339
  cookie points directly to the memory where xid was logged.
4340
4340
*/
4341
4341
 
4342
 
void TC_LOG_MMAP::unlog(ulong cookie, my_xid xid __attribute__((__unused__)))
 
4342
void TC_LOG_MMAP::unlog(ulong cookie, my_xid xid __attribute__((unused)))
4343
4343
{
4344
4344
  PAGE *p=pages+(cookie/tc_log_page_size);
4345
4345
  my_xid *x=(my_xid *)(data+cookie);
4597
4597
  return(!binlog_end_trans(thd, trx_data, &xle, true));
4598
4598
}
4599
4599
 
4600
 
void TC_LOG_BINLOG::unlog(ulong cookie __attribute__((__unused__)),
4601
 
                          my_xid xid __attribute__((__unused__)))
 
4600
void TC_LOG_BINLOG::unlog(ulong cookie __attribute__((unused)),
 
4601
                          my_xid xid __attribute__((unused)))
4602
4602
{
4603
4603
  pthread_mutex_lock(&LOCK_prep_xids);
4604
4604
  assert(prepared_xids > 0);