~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/embedded_innodb/embedded_innodb_engine.cc

  • Committer: Stewart Smith
  • Date: 2010-08-12 19:56:08 UTC
  • mto: (1711.1.10 build)
  • mto: This revision was merged to the branch mainline in revision 1713.
  • Revision ID: stewart@flamingspork.com-20100812195608-jet57ojogsbd57q2
prefix index fix for previosu Table protobuf fix for compare_length()

Show diffs side-by-side

added added

removed removed

Lines of Context:
1056
1056
      const message::Table::Field::FieldType part_type= table_message.field(part.fieldnr()).type();
1057
1057
      uint64_t compare_length= 0;
1058
1058
 
1059
 
      if (part_type == message::Table::Field::BLOB)
 
1059
      if (part_type == message::Table::Field::BLOB
 
1060
          || part_type == message::Table::Field::VARCHAR)
1060
1061
        compare_length= part.compare_length();
1061
 
      else if (part_type == message::Table::Field::VARCHAR)
1062
 
      {
1063
 
        const message::Table::Field::StringFieldOptions field_options= table_message.field(part.fieldnr()).string_options();
1064
 
 
1065
 
        const CHARSET_INFO *cs= get_charset(field_options.has_collation_id() ?
1066
 
                                            field_options.collation_id() : 0);
1067
 
        if (! cs)
1068
 
          cs= default_charset_info;
1069
 
 
1070
 
        compare_length= part.compare_length() / cs->mbmaxlen;
1071
 
      }
1072
1062
 
1073
1063
      innodb_err= ib_index_schema_add_col(innodb_index,
1074
1064
                            table_message.field(part.fieldnr()).name().c_str(),