~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/information_engine/information_engine.cc

  • Committer: Stewart Smith
  • Author(s): stewart at flamingspork
  • Date: 2009-11-16 02:35:17 UTC
  • mto: (1220.1.11 staging)
  • mto: This revision was merged to the branch mainline in revision 1222.
  • Revision ID: stewart@flamingspork.com-20091116023517-3avzvhny0jr49bsy
[patch 13/17] Remove generic field length from table protoAll field lengths are now either in their specific Options message (e.g. String. i.e. VARCHAR, VARBINARY) or are static and computed on table open.

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
    {
98
98
    case DRIZZLE_TYPE_LONG:
99
99
      proto_field->set_type(message::Table::Field::INTEGER);
100
 
      field_options->set_length(MAX_INT_WIDTH);
101
100
      break;
102
101
    case DRIZZLE_TYPE_DOUBLE:
103
102
      proto_field->set_type(message::Table::Field::DOUBLE);
111
110
      break;
112
111
    case DRIZZLE_TYPE_LONGLONG:
113
112
      proto_field->set_type(message::Table::Field::BIGINT);
114
 
      field_options->set_length(MAX_BIGINT_WIDTH);
115
113
      break;
116
114
    case DRIZZLE_TYPE_DATETIME:
117
115
      proto_field->set_type(message::Table::Field::DATETIME);
127
125
        proto_field->mutable_string_options();
128
126
      proto_field->set_type(message::Table::Field::VARCHAR);
129
127
      str_field_options->set_length(column->getLength());
130
 
      field_options->set_length(column->getLength() * 4);
131
128
      field_options->set_default_value("");
132
129
      str_field_options->set_collation_id(default_charset_info->number);
133
130
      str_field_options->set_collation(default_charset_info->name);