~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sj_tmp_table.cc

  • Committer: Monty Taylor
  • Date: 2009-05-08 19:27:21 UTC
  • mto: This revision was merged to the branch mainline in revision 1009.
  • Revision ID: mordred@inaugust.com-20090508192721-glbsg850k7wqp1rd
Further reversion of P.

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
  */
82
82
  statistic_increment(session->status_var.created_tmp_tables, &LOCK_status);
83
83
  if (use_temp_pool && !(test_flags & TEST_KEEP_TMP_TABLES))
84
 
    temp_pool_slot = temp_pool.setNextBit();
 
84
    temp_pool_slot = bitmap_lock_set_next(&temp_pool);
85
85
 
86
86
  if (temp_pool_slot != MY_BIT_NONE) // we got a slot
87
87
    sprintf(path, "%s_%lx_%i", TMP_FILE_PREFIX,
116
116
                        NULL))
117
117
  {
118
118
    if (temp_pool_slot != MY_BIT_NONE)
119
 
      temp_pool.resetBit(temp_pool_slot);
 
119
      bitmap_lock_clear_bit(&temp_pool, temp_pool_slot);
120
120
    return(NULL);
121
121
  }
122
122
  strcpy(tmpname,path);
214
214
    table->record[1]= table->record[0]+alloc_length;
215
215
    share->default_values= table->record[1]+alloc_length;
216
216
  }
217
 
  table->setup_tmp_table_column_bitmaps();
 
217
  table->setup_tmp_table_column_bitmaps(bitmaps);
218
218
 
219
219
  recinfo= start_recinfo;
220
220
  null_flags=(unsigned char*) table->record[0];
328
328
  session->mem_root= mem_root_save;
329
329
  table->free_tmp_table(session);                    /* purecov: inspected */
330
330
  if (temp_pool_slot != MY_BIT_NONE)
331
 
    temp_pool.resetBit(temp_pool_slot);
 
331
    bitmap_lock_clear_bit(&temp_pool, temp_pool_slot);
332
332
  return(NULL);        /* purecov: inspected */
333
333
}