~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/message/table_writer.cc

  • Committer: Stewart Smith
  • Date: 2011-01-21 01:09:12 UTC
  • mfrom: (2099 staging)
  • mto: (2099.1.3 build)
  • mto: This revision was merged to the branch mainline in revision 2100.
  • Revision ID: stewart@flamingspork.com-20110121010912-x5ogi8rm08nortxp
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
125
125
    field->set_name(buffer);
126
126
    field->set_type(message::Table::Field::VARCHAR);
127
127
 
128
 
    field_constraints->set_is_nullable((x % 2));
 
128
    field_constraints->set_is_notnull((x % 2));
129
129
 
130
130
    string_field_options->set_length(rand() % 100);
131
131
 
166
166
    field->set_type(message::Table::Field::DECIMAL);
167
167
 
168
168
    field_constraints= field->mutable_constraints();
169
 
    field_constraints->set_is_nullable(true);
 
169
    field_constraints->set_is_notnull(false);
170
170
 
171
171
    numeric_field_options= field->mutable_numeric_options();
172
172
    numeric_field_options->set_precision(8);
203
203
  message::Table::TableOptions *tableopts;
204
204
 
205
205
  table->set_name("t1");
 
206
  table->set_catalog("LOCAL");
206
207
  table->set_type(message::Table::INTERNAL);
207
208
 
208
209
  tableopts= table->mutable_options();
263
264
 
264
265
  fstream output(vm["table-name"].as<string>().c_str(),
265
266
                 ios::out | ios::trunc | ios::binary);
266
 
  if (!table.SerializeToOstream(&output))
 
267
  if (not table.SerializeToOstream(&output))
267
268
  {
268
269
    cerr << "Failed to write schema." << endl;
269
270
    return -1;