~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/myisam/ha_myisam.cc

  • Committer: Monty Taylor
  • Date: 2009-05-09 22:13:47 UTC
  • mto: This revision was merged to the branch mainline in revision 1009.
  • Revision ID: mordred@inaugust.com-20090509221347-l712szviusbobro0
Re-added bitset<> as a replacement for Bitmap<>

Show diffs side-by-side

added added

removed removed

Lines of Context:
579
579
  if (file->s->options & (HA_OPTION_CHECKSUM | HA_OPTION_COMPRESS_RECORD))
580
580
    int_table_flags|=HA_HAS_CHECKSUM;
581
581
 
582
 
  keys_with_parts.clear_all();
 
582
  keys_with_parts.reset();
583
583
  for (i= 0; i < table->s->keys; i++)
584
584
  {
585
585
    table->key_info[i].block_size= file->s->keyinfo[i].block_length;
588
588
    KEY_PART_INFO *kp_end= kp + table->key_info[i].key_parts;
589
589
    for (; kp != kp_end; kp++)
590
590
    {
591
 
      if (!kp->field->part_of_key.is_set(i))
 
591
      if (!kp->field->part_of_key.test(i))
592
592
      {
593
 
        keys_with_parts.set_bit(i);
 
593
        keys_with_parts.set(i);
594
594
        break;
595
595
      }
596
596
    }
997
997
  KEY_CACHE *new_key_cache= check_opt->key_cache;
998
998
  const char *errmsg= 0;
999
999
  int error= HA_ADMIN_OK;
1000
 
  uint64_t map;
1001
1000
  TableList *table_list= table->pos_in_table_list;
1002
1001
 
1003
 
  table->keys_in_use_for_query.clear_all();
 
1002
  table->keys_in_use_for_query.reset();
1004
1003
 
1005
1004
  if (table_list->process_index_hints(table))
1006
1005
    return(HA_ADMIN_FAILED);
1007
 
  map= ~(uint64_t) 0;
1008
 
  if (!table->keys_in_use_for_query.is_clear_all())
1009
 
    /* use all keys if there's no list specified by the user through hints */
1010
 
    map= table->keys_in_use_for_query.to_uint64_t();
1011
1006
 
1012
 
  if ((error= mi_assign_to_key_cache(file, map, new_key_cache)))
 
1007
  if ((error= mi_assign_to_key_cache(file, new_key_cache)))
1013
1008
  {
1014
1009
    char buf[STRING_BUFFER_USUAL_SIZE];
1015
1010
    snprintf(buf, sizeof(buf),
1364
1359
  return ((table_share->key_info[inx].algorithm == HA_KEY_ALG_FULLTEXT) ?
1365
1360
          0 : HA_READ_NEXT | HA_READ_PREV | HA_READ_RANGE |
1366
1361
          HA_READ_ORDER | HA_KEYREAD_ONLY |
1367
 
          (keys_with_parts.is_set(inx)?0:HA_DO_INDEX_COND_PUSHDOWN));
 
1362
          (keys_with_parts.test(inx)?0:HA_DO_INDEX_COND_PUSHDOWN));
1368
1363
}
1369
1364
 
1370
1365
 
1541
1536
    /* Update share */
1542
1537
    if (share->tmp_table == NO_TMP_TABLE)
1543
1538
      pthread_mutex_lock(&share->mutex);
1544
 
    share->keys_in_use.set_prefix(share->keys);
1545
 
    share->keys_in_use.intersect_extended(misam_info.key_map);
1546
 
    share->keys_for_keyread.intersect(share->keys_in_use);
 
1539
    set_prefix(share->keys_in_use, share->keys);
 
1540
    share->keys_in_use&= misam_info.key_map;
 
1541
    share->keys_for_keyread&= share->keys_in_use;
1547
1542
    share->db_record_offset= misam_info.record_offset;
1548
1543
    if (share->key_parts)
1549
1544
      memcpy(table->key_info[0].rec_per_key,