~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/transaction_services.h

  • Committer: Joseph Daly
  • Date: 2010-10-18 03:10:56 UTC
  • mto: (1856.2.16 transaction_id_innodb)
  • mto: This revision was merged to the branch mainline in revision 1900.
  • Revision ID: skinny.moey@gmail.com-20101018031056-nfbsjmibqovhedez
use transaction_id in innodb for transaction log

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
class Session;
43
43
class NamedSavepoint;
44
44
class Field;
45
 
 
 
45
 
46
46
/**
47
47
 * This is a class which manages the XA transaction processing
48
48
 * in the server
51
51
{
52
52
public:
53
53
  static const size_t DEFAULT_RECORD_SIZE= 100;
54
 
  typedef uint64_t TransactionId;
55
54
  /**
56
55
   * Constructor
57
56
   */
58
57
  TransactionServices()
59
58
  {
60
 
    /**
61
 
     * @todo set transaction ID to the last one from an applier...
62
 
     */
63
 
    current_transaction_id= 0;
64
59
  }
65
60
 
66
61
  /**
413
408
                                      plugin::MonitoredInTransaction *monitored,
414
409
                                      plugin::TransactionalStorageEngine *engine,
415
410
                                      plugin::XaResourceManager *resource_manager);
416
 
  TransactionId getNextTransactionId()
417
 
  {
418
 
    return current_transaction_id.increment();
419
 
  }
420
 
  TransactionId getCurrentTransactionId()
421
 
  {
422
 
    return current_transaction_id;
423
 
  }
 
411
 
 
412
  uint64_t getCurrentTransactionId(Session *session);
 
413
 
424
414
  /**
425
415
   * DEBUG ONLY.  See plugin::TransactionLog::truncate()
426
416
   */
427
417
  void resetTransactionId()
428
418
  {
429
 
    current_transaction_id= 0;
430
419
  }
431
420
 
432
421
  /**************
454
443
  bool sendShutdownEvent(Session *session);
455
444
 
456
445
private:
457
 
  atomic<TransactionId> current_transaction_id;
458
446
 
459
447
  /**
460
448
   * Checks if a field has been updated