~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table_proto_write.cc

  • Committer: Brian Aker
  • Date: 2011-02-22 23:14:37 UTC
  • mfrom: (2192.1.2 drizzle-staging)
  • Revision ID: brian@tangent.org-20110222231437-s9vawppxyq1s6ldk
Rollup changes in build.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#include <string>
31
31
#include <fstream>
32
32
#include <fcntl.h>
33
 
#include <drizzled/message/schema.pb.h>
34
 
#include <drizzled/message/table.pb.h>
 
33
#include <drizzled/message/schema.h>
 
34
#include <drizzled/message/table.h>
35
35
#include <google/protobuf/io/zero_copy_stream.h>
36
36
#include <google/protobuf/io/zero_copy_stream_impl.h>
37
37
#include <google/protobuf/message.h>
45
45
 
46
46
namespace drizzled {
47
47
 
48
 
bool fill_table_proto(message::Table &table_proto,
 
48
bool fill_table_proto(identifier::Table::const_reference identifier,
 
49
                      message::Table &table_proto,
49
50
                      List<CreateField> &create_fields,
50
51
                      HA_CREATE_INFO *create_info,
51
52
                      uint32_t keys,
64
65
  assert(strcmp(table_proto.engine().name().c_str(),
65
66
                create_info->db_type->getName().c_str())==0);
66
67
 
 
68
  message::schema::shared_ptr schema_message= plugin::StorageEngine::getSchemaDefinition(identifier);
 
69
 
 
70
  if (schema_message and not message::is_replicated(*schema_message))
 
71
  {
 
72
    message::set_is_replicated(table_proto, false);
 
73
  }
 
74
 
67
75
  int field_number= 0;
68
76
  bool use_existing_fields= table_proto.field_size() > 0;
69
77
  while ((field_arg= it++))
583
591
                      uint32_t keys, KeyInfo *key_info)
584
592
{
585
593
  assert(table_proto.has_name());
586
 
  if (fill_table_proto(table_proto, create_fields, create_info,
 
594
 
 
595
  if (fill_table_proto(identifier,
 
596
                       table_proto, create_fields, create_info,
587
597
                       keys, key_info))
588
598
  {
589
599
    return false;