~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/replication_services.cc

  • Committer: Brian Aker
  • Date: 2010-02-09 21:18:30 UTC
  • mfrom: (1273.2.42)
  • Revision ID: brian@gaz-20100209211830-7vf91n0yasi0r28y
Merge Stewart.

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
#include "drizzled/plugin/transaction_applier.h"
57
57
#include "drizzled/message/transaction.pb.h"
58
58
#include "drizzled/message/table.pb.h"
 
59
#include "drizzled/message/statement_transform.h"
59
60
#include "drizzled/gettext.h"
60
61
#include "drizzled/session.h"
61
62
#include "drizzled/error.h"
67
68
namespace drizzled
68
69
{
69
70
 
70
 
static message::Table::Field::FieldType internalFieldTypeToFieldProtoType(enum enum_field_types in_type);
71
 
 
72
71
ReplicationServices::ReplicationServices()
73
72
{
74
73
  is_active= false;
392
391
  {
393
392
    field_metadata= header->add_field_metadata();
394
393
    field_metadata->set_name(current_field->field_name);
395
 
    field_metadata->set_type(internalFieldTypeToFieldProtoType(current_field->type()));
 
394
    field_metadata->set_type(message::internalFieldTypeToFieldProtoType(current_field->type()));
396
395
  }
397
396
}
398
397
 
513
512
    {
514
513
      field_metadata= header->add_key_field_metadata();
515
514
      field_metadata->set_name(current_field->field_name);
516
 
      field_metadata->set_type(internalFieldTypeToFieldProtoType(current_field->type()));
 
515
      field_metadata->set_type(message::internalFieldTypeToFieldProtoType(current_field->type()));
517
516
    }
518
517
 
519
518
    /*
531
530
      /* Field is changed from old to new */
532
531
      field_metadata= header->add_set_field_metadata();
533
532
      field_metadata->set_name(current_field->field_name);
534
 
      field_metadata->set_type(internalFieldTypeToFieldProtoType(current_field->type()));
 
533
      field_metadata->set_type(message::internalFieldTypeToFieldProtoType(current_field->type()));
535
534
    }
536
535
  }
537
536
}
687
686
    {
688
687
      field_metadata= header->add_key_field_metadata();
689
688
      field_metadata->set_name(current_field->field_name);
690
 
      field_metadata->set_type(internalFieldTypeToFieldProtoType(current_field->type()));
 
689
      field_metadata->set_type(message::internalFieldTypeToFieldProtoType(current_field->type()));
691
690
    }
692
691
  }
693
692
}
824
823
  }
825
824
}
826
825
 
827
 
static message::Table::Field::FieldType internalFieldTypeToFieldProtoType(enum enum_field_types in_type)
828
 
{
829
 
  switch (in_type)
830
 
  {
831
 
    case DRIZZLE_TYPE_LONGLONG:
832
 
      return message::Table::Field::BIGINT;
833
 
    case DRIZZLE_TYPE_LONG:
834
 
      return message::Table::Field::INTEGER;
835
 
    case DRIZZLE_TYPE_DECIMAL:
836
 
      return message::Table::Field::DECIMAL;
837
 
    case DRIZZLE_TYPE_DOUBLE:
838
 
      return message::Table::Field::DOUBLE;
839
 
    case DRIZZLE_TYPE_DATE:
840
 
      return message::Table::Field::DATE;
841
 
    case DRIZZLE_TYPE_DATETIME:
842
 
      return message::Table::Field::DATETIME;
843
 
    case DRIZZLE_TYPE_TIMESTAMP:
844
 
      return message::Table::Field::TIMESTAMP;
845
 
    case DRIZZLE_TYPE_VARCHAR:
846
 
      return message::Table::Field::VARCHAR;
847
 
    case DRIZZLE_TYPE_BLOB:
848
 
      return message::Table::Field::BLOB;
849
 
    case DRIZZLE_TYPE_ENUM:
850
 
      return message::Table::Field::ENUM;
851
 
    default:
852
 
      return message::Table::Field::VARCHAR;
853
 
  }
854
 
}
855
 
 
856
826
} /* namespace drizzled */