~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/ha_myisam.cc

  • Committer: Brian Aker
  • Date: 2008-08-21 02:21:23 UTC
  • Revision ID: brian@tangent.org-20080821022123-pemld4axwk9qnhvg
No more dead special flags...

Show diffs side-by-side

added added

removed removed

Lines of Context:
1190
1190
  can_enable_indexes= mi_is_all_keys_active(file->s->state.key_map,
1191
1191
                                            file->s->base.keys);
1192
1192
 
1193
 
  if (!(specialflag & SPECIAL_SAFE_MODE))
1194
 
  {
1195
 
    /*
1196
 
      Only disable old index if the table was empty and we are inserting
1197
 
      a lot of rows.
1198
 
      We should not do this for only a few rows as this is slower and
1199
 
      we don't want to update the key statistics based of only a few rows.
1200
 
    */
1201
 
    if (file->state->records == 0 && can_enable_indexes &&
1202
 
        (!rows || rows >= MI_MIN_ROWS_TO_DISABLE_INDEXES))
1203
 
      mi_disable_non_unique_index(file,rows);
1204
 
    else
 
1193
  /*
 
1194
    Only disable old index if the table was empty and we are inserting
 
1195
    a lot of rows.
 
1196
    We should not do this for only a few rows as this is slower and
 
1197
    we don't want to update the key statistics based of only a few rows.
 
1198
  */
 
1199
  if (file->state->records == 0 && can_enable_indexes &&
 
1200
      (!rows || rows >= MI_MIN_ROWS_TO_DISABLE_INDEXES))
 
1201
    mi_disable_non_unique_index(file,rows);
 
1202
  else
1205
1203
    if (!file->bulk_insert &&
1206
1204
        (!rows || rows >= MI_MIN_ROWS_TO_USE_BULK_INSERT))
1207
1205
    {
1208
1206
      mi_init_bulk_insert(file, thd->variables.bulk_insert_buff_size, rows);
1209
1207
    }
1210
 
  }
 
1208
 
1211
1209
  return;
1212
1210
}
1213
1211
 
1545
1543
 
1546
1544
int ha_myisam::extra(enum ha_extra_function operation)
1547
1545
{
1548
 
  if ((specialflag & SPECIAL_SAFE_MODE) && operation == HA_EXTRA_KEYREAD)
1549
 
    return 0;
1550
1546
  return mi_extra(file, operation, 0);
1551
1547
}
1552
1548
 
1563
1559
 
1564
1560
int ha_myisam::extra_opt(enum ha_extra_function operation, uint32_t cache_size)
1565
1561
{
1566
 
  if ((specialflag & SPECIAL_SAFE_MODE) && operation == HA_EXTRA_WRITE_CACHE)
1567
 
    return 0;
1568
1562
  return mi_extra(file, operation, (void*) &cache_size);
1569
1563
}
1570
1564