~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/log.cc

  • Committer: Monty Taylor
  • Date: 2009-03-26 09:26:02 UTC
  • mto: (968.2.25 mordred)
  • mto: This revision was merged to the branch mainline in revision 971.
  • Revision ID: mordred@inaugust.com-20090326092602-ddb059yxpxt5dgmc
Moved savepoint stuff to protected virtual methods, moved the offset to private, and moved the logic about adding the offset to the passed-in pointer and adding the offset to the global offset inside of the class.

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
{
77
77
public:
78
78
  BinlogEngine(const string &name_arg)
79
 
    : StorageEngine(name_arg, HTON_NOT_USER_SELECTABLE | HTON_HIDDEN) {}
 
79
    : StorageEngine(name_arg,
 
80
                    HTON_NOT_USER_SELECTABLE | HTON_HIDDEN,
 
81
                    sizeof(my_off_t)) {}
80
82
 
81
83
  virtual int close_connection(Session *)
82
84
  {
229
231
    that case there is no need to have it in the binlog).
230
232
  */
231
233
  
232
 
  virtual int savepoint_set(Session *session, void *sv)
 
234
  virtual int savepoint_set_hook(Session *session, void *sv)
233
235
  {
234
236
    bool error;
235
237
    binlog_trans_log_savepos(session, (my_off_t*) sv);
240
242
    return(error);
241
243
  }
242
244
  
243
 
  virtual int savepoint_rollback(Session *session, void *)
 
245
  virtual int savepoint_rollback_hook(Session *session, void *)
244
246
  {
245
247
    bool error;
246
248
  
270
272
  if (binlog_engine == NULL)
271
273
  {
272
274
    binlog_engine= new BinlogEngine(engine_name);
273
 
    binlog_engine->savepoint_offset= sizeof(my_off_t);
274
275
  }
275
276
 
276
277
  *engine= binlog_engine;