~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/key.cc

  • Committer: Brian Aker
  • Date: 2010-06-15 13:37:26 UTC
  • Revision ID: brian@gaz-20100615133726-160z0ql8gxi8s3rg
This is a rollup set of patches for modifications to TableIdentifier to have
a getKey() which is now used for open_cache and table_share_def cache. This
also includes additional unittests on TableIdentifier, and makes use of some
cleanup, though not perfect, to TableShare for its contructors.

Show diffs side-by-side

added added

removed removed

Lines of Context:
410
410
    If table handler has primary key as part of the index, check that primary
411
411
    key is not updated
412
412
  */
413
 
  if (idx != table->getShare()->primary_key && table->getShare()->primary_key < MAX_KEY &&
 
413
  if (idx != table->getShare()->getPrimaryKey() && table->getShare()->hasPrimaryKey() &&
414
414
      (table->cursor->getEngine()->check_flag(HTON_BIT_PRIMARY_KEY_IN_READ_INDEX)))
415
 
    return is_key_used(table, table->getShare()->primary_key, fields);
 
415
  {
 
416
    return is_key_used(table, table->getShare()->getPrimaryKey(), fields);
 
417
  }
416
418
  return 0;
417
419
}
418
420