~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/log.h

  • Committer: Brian Aker
  • Date: 2008-10-20 04:28:21 UTC
  • mto: (492.3.21 drizzle-clean-code)
  • mto: This revision was merged to the branch mainline in revision 530.
  • Revision ID: brian@tangent.org-20081020042821-rqqdrccuu8195k3y
Second pass of thd cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
 
40
40
  virtual int open(const char *opt_name)=0;
41
41
  virtual void close()=0;
42
 
  virtual int log_xid(Session *thd, my_xid xid)=0;
 
42
  virtual int log_xid(Session *session, my_xid xid)=0;
43
43
  virtual void unlog(ulong cookie, my_xid xid)=0;
44
44
};
45
45
 
50
50
  int open(const char *opt_name __attribute__((unused)))
51
51
  { return 0; }
52
52
  void close(void)                          { }
53
 
  int log_xid(Session *thd __attribute__((unused)),
 
53
  int log_xid(Session *session __attribute__((unused)),
54
54
              my_xid xid __attribute__((unused)))         { return 1; }
55
55
  void unlog(ulong cookie __attribute__((unused)),
56
56
             my_xid xid __attribute__((unused)))  { }
97
97
  TC_LOG_MMAP(): inited(0) {}
98
98
  int open(const char *opt_name);
99
99
  void close();
100
 
  int log_xid(Session *thd, my_xid xid);
 
100
  int log_xid(Session *session, my_xid xid);
101
101
  void unlog(ulong cookie, my_xid xid);
102
102
  int recover();
103
103
 
272
272
 
273
273
  int open(const char *opt_name);
274
274
  void close();
275
 
  int log_xid(Session *thd, my_xid xid);
 
275
  int log_xid(Session *session, my_xid xid);
276
276
  void unlog(ulong cookie, my_xid xid);
277
277
  int recover(IO_CACHE *log, Format_description_log_event *fdle);
278
278
  bool is_table_mapped(Table *table) const
283
283
  uint64_t table_map_version() const { return m_table_map_version; }
284
284
  void update_table_map_version() { ++m_table_map_version; }
285
285
 
286
 
  int flush_and_set_pending_rows_event(Session *thd, Rows_log_event* event);
 
286
  int flush_and_set_pending_rows_event(Session *session, Rows_log_event* event);
287
287
 
288
288
  void reset_bytes_written()
289
289
  {
297
297
  }
298
298
  void set_max_size(ulong max_size_arg);
299
299
  void signal_update();
300
 
  void wait_for_update_relay_log(Session* thd);
301
 
  int  wait_for_update_bin_log(Session* thd, const struct timespec * timeout);
 
300
  void wait_for_update_relay_log(Session* session);
 
301
  int  wait_for_update_bin_log(Session* session, const struct timespec * timeout);
302
302
  void set_need_start_event() { need_start_event = 1; }
303
303
  void init(bool no_auto_events_arg, ulong max_size);
304
304
  void init_pthread_objects();
315
315
  void new_file();
316
316
 
317
317
  bool write(Log_event* event_info); // binary log write
318
 
  bool write(Session *thd, IO_CACHE *cache, Log_event *commit_event);
 
318
  bool write(Session *session, IO_CACHE *cache, Log_event *commit_event);
319
319
 
320
320
  int  write_cache(IO_CACHE *cache, bool lock_log, bool flush_and_sync);
321
321
 
322
 
  void start_union_events(Session *thd, query_id_t query_id_param);
323
 
  void stop_union_events(Session *thd);
324
 
  bool is_query_in_union(Session *thd, query_id_t query_id_param);
 
322
  void start_union_events(Session *session, query_id_t query_id_param);
 
323
  void stop_union_events(Session *session);
 
324
  bool is_query_in_union(Session *session, query_id_t query_id_param);
325
325
 
326
326
  /*
327
327
    v stands for vector
340
340
                 uint64_t *decrease_log_space);
341
341
  int purge_logs_before_date(time_t purge_time);
342
342
  int purge_first_log(Relay_log_info* rli, bool included);
343
 
  bool reset_logs(Session* thd);
 
343
  bool reset_logs(Session* session);
344
344
  void close(uint32_t exiting);
345
345
 
346
346
  // iterating through the log index file
392
392
  void lock_shared() { rw_rdlock(&LOCK_logger); }
393
393
  void lock_exclusive() { rw_wrlock(&LOCK_logger); }
394
394
  void unlock() { rw_unlock(&LOCK_logger); }
395
 
  bool log_command(Session *thd, enum enum_server_command command);
 
395
  bool log_command(Session *session, enum enum_server_command command);
396
396
 
397
397
  /*
398
398
    We want to initialize all log mutexes as soon as possible,
401
401
    this function.
402
402
  */
403
403
  void init_base();
404
 
  bool flush_logs(Session *thd);
 
404
  bool flush_logs(Session *session);
405
405
  /* Perform basic logger cleanup. this will leave e.g. error log open. */
406
406
  void cleanup_base();
407
407
  /* Free memory. Nothing could be logged after this function is called */