~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/handler/ha_innodb.cc

  • Committer: Brian Aker
  • Date: 2010-05-29 06:06:10 UTC
  • mfrom: (1574.1.8 new-staging)
  • Revision ID: brian@gir-20100529060610-phsss4stvg0uub22
Merge Brian

Show diffs side-by-side

added added

removed removed

Lines of Context:
3235
3235
  uint    buff_len,/*!< in: buffer length */
3236
3236
  const unsigned char*  record)/*!< in: row in MySQL format */
3237
3237
{
3238
 
  KeyInfo*    key_info  = table->key_info + keynr;
 
3238
  KeyInfo*    key_info  = &table->key_info[keynr];
3239
3239
  KeyPartInfo*  key_part  = key_info->key_part;
3240
3240
  KeyPartInfo*  end   = key_part + key_info->key_parts;
3241
3241
  char*   buff_start  = buff;
4654
4654
        clustered index, even if it was internally
4655
4655
        generated by InnoDB */
4656
4656
{
4657
 
  KeyInfo*    key = 0;
4658
4657
  dict_index_t* index = 0;
4659
4658
 
4660
4659
  ha_statistic_increment(&system_status_var::ha_read_key_count);
4662
4661
  ut_ad(user_session == ha_session());
4663
4662
  ut_a(prebuilt->trx == session_to_trx(user_session));
4664
4663
 
4665
 
  if (keynr != MAX_KEY && table->getShare()->keys > 0) {
4666
 
    key = table->key_info + keynr;
4667
 
 
 
4664
  if (keynr != MAX_KEY && table->getShare()->keys > 0) 
 
4665
  {
4668
4666
    index = dict_table_get_index_on_name(prebuilt->table,
4669
 
                 key->name);
 
4667
                                         table->getShare()->getTableProto()->indexes(keynr).name().c_str());
4670
4668
  } else {
4671
4669
    index = dict_table_get_first_index(prebuilt->table);
4672
4670
  }
4675
4673
    errmsg_printf(ERRMSG_LVL_ERROR, 
4676
4674
      "Innodb could not find key n:o %u with name %s "
4677
4675
      "from dict cache for table %s",
4678
 
      keynr, key ? key->name : "NULL",
 
4676
      keynr, table->getShare()->getTableProto()->indexes(keynr).name().c_str(),
4679
4677
      prebuilt->table->name);
4680
4678
  }
4681
4679
 
5218
5216
  ulint   j;
5219
5217
  ulint*    field_lengths;
5220
5218
 
5221
 
  key = form->key_info + key_num;
 
5219
  key = &form->key_info[key_num];
5222
5220
 
5223
5221
  n_fields = key->key_parts;
5224
5222
 
6037
6035
 
6038
6036
  active_index = keynr;
6039
6037
 
6040
 
  key = table->key_info + active_index;
 
6038
  key = &table->key_info[active_index];
6041
6039
 
6042
 
  index = dict_table_get_index_on_name(prebuilt->table, key->name);
 
6040
  index = dict_table_get_index_on_name(prebuilt->table, table->getShare()->getTableProto()->indexes(active_index).name().c_str());
6043
6041
 
6044
6042
  /* MySQL knows about this index and so we must be able to find it.*/
6045
6043
  ut_a(index);