~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/handler.cc

This patch does a few things:

* Renames the TransactionServices component in the kernel
  to ReplicationServices.
* Renames the transaction.proto to replication proto and
  updates the various programs referencing drizzled/message/transaction.pb.h
* Adds a public method to the kernel's ReplicationServices component:
  getLastAppliedTimestamp() which returns the timestamp of the last Command message
  which was successfully sent to a registered Applier plugin (the Command was "applied")
* Updates ReplicationServices::push() method to update an atomic timestamp
  when a Command is successfully applied by a replicator to an applier.

The ReplicationServices::getLastAppliedTimestamp() is critical to the upcoming
Publisher plugin, as it allows the publisher to ask the kernel when the last Command
message was applied.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
#include "drizzled/cost_vect.h"
33
33
#include "drizzled/session.h"
34
34
#include "drizzled/sql_base.h"
35
 
#include "drizzled/transaction_services.h"
 
35
#include "drizzled/replication_services.h"
36
36
#include "drizzled/lock.h"
37
37
#include "drizzled/item/int.h"
38
38
#include "drizzled/item/empty_string.h"
42
42
 
43
43
using namespace std;
44
44
 
45
 
extern drizzled::TransactionServices transaction_services;
 
45
extern drizzled::ReplicationServices replication_services;
46
46
 
47
47
KEY_CREATE_INFO default_key_create_info= { HA_KEY_ALG_UNDEF, 0, {NULL,0}, {NULL,0} };
48
48
 
3270
3270
  case SQLCOM_REPLACE_SELECT:
3271
3271
  case SQLCOM_INSERT_SELECT:
3272
3272
  case SQLCOM_CREATE_TABLE:
3273
 
    transaction_services.insertRecord(session, table);
 
3273
    replication_services.insertRecord(session, table);
3274
3274
    break;
3275
3275
 
3276
3276
  case SQLCOM_UPDATE:
3277
3277
  case SQLCOM_UPDATE_MULTI:
3278
 
    transaction_services.updateRecord(session, table, before_record, after_record);
 
3278
    replication_services.updateRecord(session, table, before_record, after_record);
3279
3279
    break;
3280
3280
 
3281
3281
  case SQLCOM_DELETE:
3282
3282
  case SQLCOM_DELETE_MULTI:
3283
 
    transaction_services.deleteRecord(session, table);
 
3283
    replication_services.deleteRecord(session, table);
3284
3284
    break;
3285
3285
 
3286
3286
    /*