~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_delete.cc

  • Committer: Brian Aker
  • Date: 2009-05-05 00:40:45 UTC
  • mfrom: (1003.2.7 mordred)
  • Revision ID: brian@gaz-20090505004045-yns4biv63thufj1b
Tags: 2009.05.1005
Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
152
152
  /* Update the table->file->stats.records number */
153
153
  table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);
154
154
 
155
 
  table->covering_keys.clear_all();
156
 
  table->quick_keys.clear_all();                // Can't use 'only index'
 
155
  table->covering_keys.reset();
 
156
  table->quick_keys.reset();            // Can't use 'only index'
157
157
  select=make_select(table, 0, 0, conds, 0, &error);
158
158
  if (error)
159
159
    goto err;
173
173
  }
174
174
 
175
175
  /* If running in safe sql mode, don't allow updates without keys */
176
 
  if (table->quick_keys.is_clear_all())
 
176
  if (table->quick_keys.none())
177
177
  {
178
178
    session->server_status|=SERVER_QUERY_NO_INDEX_USED;
179
179
    if (safe_update && !using_limit)
194
194
    SORT_FIELD  *sortorder;
195
195
    ha_rows examined_rows;
196
196
 
197
 
    if ((!select || table->quick_keys.is_clear_all()) && limit != HA_POS_ERROR)
 
197
    if ((!select || table->quick_keys.none()) && limit != HA_POS_ERROR)
198
198
      usable_index= get_index_for_order(table, (order_st*)(order->first), limit);
199
199
 
200
200
    if (usable_index == MAX_KEY)
504
504
      tbl->no_keyread=1;
505
505
      /* Don't use record cache */
506
506
      tbl->no_cache= 1;
507
 
      tbl->covering_keys.clear_all();
 
507
      tbl->covering_keys.reset();
508
508
      if (tbl->file->has_transactions())
509
509
        transactional_tables= 1;
510
510
      else
795
795
  /* If it is a temporary table, close and regenerate it */
796
796
  if (!dont_send_ok && (table= find_temporary_table(session, table_list)))
797
797
  {
798
 
    handlerton *table_type= table->s->db_type();
799
 
    TABLE_SHARE *share= table->s;
 
798
    StorageEngine *table_type= table->s->db_type();
 
799
    TableShare *share= table->s;
800
800
 
801
 
    if (!ha_check_storage_engine_flag(table_type, HTON_BIT_CAN_RECREATE))
 
801
    if (!table_type->check_flag(HTON_BIT_CAN_RECREATE))
802
802
      goto trunc_by_del;
803
803
 
804
804
    table->file->info(HA_STATUS_AUTO | HA_STATUS_NO_LOCK);
812
812
                                             share->table_name.str, 1,
813
813
                                             OTM_OPEN))))
814
814
      (void) rm_temporary_table(table_type, path);
815
 
    free_table_share(share);
 
815
    share->free_table_share();
816
816
    free((char*) table);
817
817
    /*
818
818
      If we return here we will not have logged the truncation to the bin log