~shubhamsomani92/drizzle/trunk-bug-995739

« back to all changes in this revision

Viewing changes to drizzled/table/instance/base.cc

  • Committer: Continuous Integration
  • Date: 2013-03-07 03:15:07 UTC
  • mfrom: (2630.1.7 create-tmp-table)
  • Revision ID: ci@drizzle.org-20130307031507-bqgrashrp5m3fw8x
Merge lp:~stewart/drizzle/misc-cleanups Build: jenkins-Drizzle-Builder-175

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
#include <drizzled/key.h>
88
88
#include <drizzled/open_tables_state.h>
89
89
#include <drizzled/catalog/local.h>
 
90
#include <drizzled/key_part_info.h>
90
91
 
91
92
using namespace std;
92
93
 
625
626
      }
626
627
    }
627
628
 
628
 
    switch (indx.type())
629
 
    {
630
 
    case message::Table::Index::UNKNOWN_INDEX:
631
 
      keyinfo->algorithm= HA_KEY_ALG_UNDEF;
632
 
      break;
633
 
    case message::Table::Index::BTREE:
634
 
      keyinfo->algorithm= HA_KEY_ALG_BTREE;
635
 
      break;
636
 
    case message::Table::Index::HASH:
637
 
      keyinfo->algorithm= HA_KEY_ALG_HASH;
638
 
      break;
639
 
 
640
 
    default:
641
 
      /* TODO: suitable warning ? */
642
 
      keyinfo->algorithm= HA_KEY_ALG_UNDEF;
643
 
      break;
644
 
    }
 
629
    keyinfo->algorithm= indx.type();
645
630
 
646
631
    keyinfo->key_length= indx.key_length();
647
632
 
1315
1300
        if (local_field->key_length() == key_part->length &&
1316
1301
            !(local_field->flags & BLOB_FLAG))
1317
1302
        {
1318
 
          enum ha_key_alg algo= key_info[key].algorithm;
 
1303
          message::Table::Index::IndexType algo= key_info[key].algorithm;
1319
1304
          if (db_type()->index_flags(algo) & HA_KEYREAD_ONLY)
1320
1305
          {
1321
1306
            keys_for_keyread.set(key);