~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table.cc

  • Committer: Brian Aker
  • Date: 2009-12-01 01:54:04 UTC
  • mto: (1234.1.4 push)
  • mto: This revision was merged to the branch mainline in revision 1235.
  • Revision ID: brian@gaz-20091201015404-19qmqriauoeve2x5
Move max key stuff up to engine.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2633
2633
    share->storage_engine= myisam_engine;
2634
2634
    table->cursor= share->db_type()->getCursor(*share, &table->mem_root);
2635
2635
    if (group &&
2636
 
        (param->group_parts > table->cursor->max_key_parts() ||
2637
 
         param->group_length > table->cursor->max_key_length()))
 
2636
        (param->group_parts > table->cursor->getEngine()->max_key_parts() ||
 
2637
         param->group_length > table->cursor->getEngine()->max_key_length()))
2638
2638
      using_unique_constraint=1;
2639
2639
  }
2640
2640
  else
3181
3181
      goto err;
3182
3182
 
3183
3183
    memset(seg, 0, sizeof(*seg) * keyinfo->key_parts);
3184
 
    if (keyinfo->key_length >= cursor->max_key_length() ||
3185
 
        keyinfo->key_parts > cursor->max_key_parts() ||
 
3184
    if (keyinfo->key_length >= cursor->getEngine()->max_key_length() ||
 
3185
        keyinfo->key_parts > cursor->getEngine()->max_key_parts() ||
3186
3186
        share->uniques)
3187
3187
    {
3188
3188
      /* Can't create a key; Make a unique constraint instead of a key */