~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/serialize/table_writer.cc

  • Committer: Monty Taylor
  • Date: 2009-01-28 04:37:46 UTC
  • mto: (779.7.3 devel)
  • mto: This revision was merged to the branch mainline in revision 816.
  • Revision ID: mordred@inaugust.com-20090128043746-d2yukekishwn3ftm
TurnedĀ onĀ -Wshadow.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#include <fstream>
3
3
#include <string>
4
4
#include <drizzled/serialize/table.pb.h>
 
5
 
5
6
using namespace std;
 
7
using namespace drizzle;
6
8
 
7
9
/*
8
10
  Written from Google proto example
9
11
*/
10
12
 
11
 
void fill_engine(drizzle::Table::StorageEngine *engine)
 
13
void fill_engine(::drizzle::Table::StorageEngine *engine)
12
14
{
13
 
  using namespace drizzle;
14
 
  using std::string;
15
15
  int16_t x;
16
16
 
17
17
  engine->set_name("InnoDB");
37
37
  }
38
38
}
39
39
 
40
 
void new_index_to_table( drizzle::Table *table,
41
 
                         const std::string name,
42
 
                         uint16_t num_index_parts,
43
 
                         uint32_t field_indexes[],
44
 
                         uint32_t compare_lengths[],
45
 
                         bool is_primary,
46
 
                         bool is_unique)
 
40
void new_index_to_table(::drizzle::Table *table,
 
41
                        const string name,
 
42
                        uint16_t num_index_parts,
 
43
                        uint32_t field_indexes[],
 
44
                        uint32_t compare_lengths[],
 
45
                        bool is_primary,
 
46
                        bool is_unique)
47
47
{
48
 
  using namespace drizzle;
49
 
  uint16_t x;
 
48
  uint16_t x= 0;
50
49
 
51
50
  Table::Index *index;
52
51
  Table::Field *field;
73
72
  }
74
73
}
75
74
 
76
 
void fill_table(drizzle::Table *table, const char *name)
 
75
void fill_table(::drizzle::Table *table, const char *name)
77
76
{
78
77
  uint16_t x;
79
78
 
80
 
  using namespace drizzle;
81
 
 
82
79
  Table::Field *field;
83
80
  Table::Field::FieldConstraints *field_constraints;
84
 
  Table::Field::FieldOptions *field_options;
85
81
  Table::Field::StringFieldOptions *string_field_options;
86
82
  Table::Field::NumericFieldOptions *numeric_field_options;
87
83
  Table::Field::SetFieldOptions *set_field_options;
185
181
    return -1;
186
182
  }
187
183
 
188
 
  drizzle::Table table;
 
184
  Table table;
189
185
 
190
186
  fill_table(&table, "example_table");
191
187