~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/table_function.cc

  • Committer: Brian Aker
  • Date: 2010-10-09 00:49:33 UTC
  • mfrom: (1812.5.8 staging)
  • Revision ID: brian@tangent.org-20101009004933-tehugnkubtzp6uy4
Merge in changes for show create table.

Show diffs side-by-side

added added

removed removed

Lines of Context:
115
115
    field_options->set_default_null(false);
116
116
    field_constraints->set_is_nullable(false);
117
117
  case TableFunction::STRING:
118
 
  {
119
 
    drizzled::message::Table::Field::StringFieldOptions *string_field_options;
120
 
    field->set_type(drizzled::message::Table::Field::VARCHAR);
121
 
 
122
 
    string_field_options= field->mutable_string_options();
123
 
    string_field_options->set_length(field_length);
124
 
  }
 
118
    {
 
119
      drizzled::message::Table::Field::StringFieldOptions *string_field_options;
 
120
      if (field_length >= TABLE_FUNCTION_BLOB_SIZE)
 
121
      {
 
122
        field->set_type(drizzled::message::Table::Field::BLOB);
 
123
        string_field_options= field->mutable_string_options();
 
124
        string_field_options->set_collation_id(default_charset_info->number);
 
125
        string_field_options->set_collation(default_charset_info->name);
 
126
      }
 
127
      else
 
128
      {
 
129
        field->set_type(drizzled::message::Table::Field::VARCHAR);
 
130
        string_field_options= field->mutable_string_options();
 
131
        string_field_options->set_length(field_length);
 
132
      }
 
133
    }
125
134
    break;
126
135
  case TableFunction::VARBINARY:
127
 
  {
128
 
    drizzled::message::Table::Field::StringFieldOptions *string_field_options;
129
 
    field->set_type(drizzled::message::Table::Field::VARCHAR);
 
136
    {
 
137
      drizzled::message::Table::Field::StringFieldOptions *string_field_options;
 
138
      field->set_type(drizzled::message::Table::Field::VARCHAR);
130
139
 
131
 
    string_field_options= field->mutable_string_options();
132
 
    string_field_options->set_length(field_length);
133
 
    string_field_options->set_collation(my_charset_bin.csname);
134
 
    string_field_options->set_collation_id(my_charset_bin.number);
135
 
  }
 
140
      string_field_options= field->mutable_string_options();
 
141
      string_field_options->set_length(field_length);
 
142
      string_field_options->set_collation(my_charset_bin.csname);
 
143
      string_field_options->set_collation_id(my_charset_bin.number);
 
144
    }
136
145
    break;
137
146
  case TableFunction::NUMBER: // Currently NUMBER always has a value
138
147
    field->set_type(drizzled::message::Table::Field::BIGINT);